/* ==========================================================================
   TapTag Coming Soon — Card Awakening cinematic teaser
   ========================================================================== */

:root {
    --tt-black: #050608;
    --tt-graphite-950: #080a0e;
    --tt-graphite-900: #0c0e12;
    --tt-graphite-800: #141820;
    --tt-teal-600: #0f766e;
    --tt-teal-500: #0d9488;
    --tt-teal-400: #14b8a6;
    --tt-teal-300: #2dd4bf;
    --tt-teal-glow: rgba(13, 148, 136, 0.55);
    --tt-teal-soft: rgba(13, 148, 136, 0.12);
    --tt-amber: #f59e0b;
    --tt-text-ivory: #f4f1ea;
    --tt-text-primary: #e8edf4;
    --tt-text-secondary: #94a3b8;
    --tt-text-muted: #64748b;
    --tt-glass-bg: rgba(12, 14, 18, 0.75);
    --tt-glass-border: rgba(148, 163, 184, 0.12);
    --tt-radius-sm: 8px;
    --tt-space-xs: 0.5rem;
    --tt-space-sm: 0.75rem;
    --tt-space-md: 1rem;
    --tt-space-lg: 1.5rem;
    --tt-space-xl: 2rem;
    --tt-space-2xl: 3rem;
    --tt-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --tt-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --tt-card-w: clamp(200px, 68vw, 360px);
    --tt-card-ratio: 1.586;
    --tt-flip-duration: 3s;
}

/* Reset
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
}

body.tt-body {
    font-family: var(--tt-font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--tt-text-primary);
    background: var(--tt-black);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Page
   -------------------------------------------------------------------------- */

.tt-page {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    padding: var(--tt-space-lg) var(--tt-space-md) var(--tt-space-xl);
}

/* Cinematic background
   -------------------------------------------------------------------------- */

.tt-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background: var(--tt-black);
}

.tt-bg__gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 55% 45% at 68% 38%, rgba(13, 148, 136, 0.28) 0%, transparent 58%),
        radial-gradient(ellipse 40% 35% at 20% 80%, rgba(13, 148, 136, 0.06) 0%, transparent 55%),
        linear-gradient(175deg, var(--tt-black) 0%, var(--tt-graphite-950) 40%, var(--tt-graphite-900) 100%);
}

.tt-bg__breath {
    position: absolute;
    top: 25%;
    right: 15%;
    width: min(600px, 70vw);
    height: min(600px, 70vw);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(13, 148, 136, 0.18) 0%, transparent 65%);
    filter: blur(60px);
    animation: tt-bg-breathe 8s ease-in-out infinite;
}

@keyframes tt-bg-breathe {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50%      { opacity: 1; transform: scale(1.08); }
}

.tt-bg__vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 85% 80% at 50% 50%, transparent 35%, rgba(0, 0, 0, 0.65) 100%);
}

/* Hero grid
   -------------------------------------------------------------------------- */

.tt-hero {
    position: relative;
    z-index: 1;
    flex: 1;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
        "lead"
        "scene"
        "body";
    gap: var(--tt-space-lg);
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    align-content: center;
}

.tt-hero__lead   { grid-area: lead; }
.tt-awakening    { grid-area: scene; }
.tt-hero__body   { grid-area: body; }

/* Lead copy — teaser + headline
   -------------------------------------------------------------------------- */

@keyframes tt-dot-blink {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.35; }
}

.tt-hero__lead {
    opacity: 0;
    animation: tt-fade-up 0.9s var(--tt-ease) 0.1s forwards;
}

@media (max-width: 899px) {
    .tt-hero__lead,
    .tt-hero__body {
        text-align: center;
    }

    .tt-headline {
        align-items: center;
    }

    .tt-description,
    .tt-status-list {
        margin-left: auto;
        margin-right: auto;
    }

    .tt-actions {
        align-items: stretch;
    }
}

.tt-teaser {
    font-size: clamp(0.8125rem, 2.2vw, 0.9375rem);
    font-weight: 500;
    font-style: italic;
    letter-spacing: 0.06em;
    color: var(--tt-teal-400);
    margin-bottom: var(--tt-space-md);
}

.tt-headline {
    display: flex;
    flex-direction: column;
    gap: 0.15em;
    font-size: clamp(2rem, 7vw, 3.75rem);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.035em;
    color: var(--tt-text-ivory);
    margin-bottom: 0;
    max-width: none;
}

.tt-headline__line {
    display: block;
}

.tt-headline__line--accent {
    font-weight: 700;
    background: linear-gradient(135deg, var(--tt-text-ivory) 0%, var(--tt-teal-300) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Body copy
   -------------------------------------------------------------------------- */

.tt-hero__body {
    opacity: 0;
    animation: tt-fade-up 0.9s var(--tt-ease) 0.48s forwards;
}

.tt-description {
    font-size: clamp(0.9375rem, 2.2vw, 1.0625rem);
    line-height: 1.75;
    color: var(--tt-text-secondary);
    margin-bottom: var(--tt-space-lg);
    max-width: 46ch;
}

@keyframes tt-fade-up {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Status list
   -------------------------------------------------------------------------- */

.tt-status-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    margin-bottom: var(--tt-space-lg);
}

.tt-status-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--tt-text-secondary);
}

.tt-status-item__dot {
    flex-shrink: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--tt-text-muted);
}

.tt-status-item__dot--active {
    background: var(--tt-teal-400);
    box-shadow: 0 0 8px var(--tt-teal-glow);
    animation: tt-dot-blink 2.5s ease-in-out infinite;
}

/* Actions
   -------------------------------------------------------------------------- */

.tt-actions {
    display: flex;
    flex-direction: column;
    gap: var(--tt-space-sm);
}

.tt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9375rem 1.375rem;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--tt-radius-sm);
    transition: transform 0.25s var(--tt-ease), box-shadow 0.25s var(--tt-ease), background 0.25s var(--tt-ease), border-color 0.25s var(--tt-ease);
    cursor: pointer;
}

.tt-btn:focus-visible {
    outline: 2px solid var(--tt-teal-400);
    outline-offset: 2px;
}

.tt-btn--primary {
    color: var(--tt-graphite-900);
    background: linear-gradient(135deg, var(--tt-teal-300) 0%, var(--tt-teal-500) 100%);
    border: 1px solid transparent;
    box-shadow: 0 8px 28px -8px var(--tt-teal-glow);
}

.tt-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 36px -8px var(--tt-teal-glow);
}

.tt-btn--secondary {
    color: var(--tt-text-primary);
    background: var(--tt-glass-bg);
    border: 1px solid var(--tt-glass-border);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.tt-btn--secondary:hover {
    border-color: rgba(20, 184, 166, 0.45);
    background: var(--tt-teal-soft);
}

/* Awakening scene
   -------------------------------------------------------------------------- */

.tt-awakening {
    position: relative;
    width: 100%;
    max-width: 520px;
    height: clamp(280px, 52vw, 480px);
    margin: 0 auto;
    perspective: 1400px;
    perspective-origin: 50% 45%;
    opacity: 0;
    animation: tt-scene-reveal 1.4s var(--tt-ease) 0.35s forwards;
}

@keyframes tt-scene-reveal {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}

/* Holographic grid behind card
   -------------------------------------------------------------------------- */

.tt-awakening__holo {
    position: absolute;
    inset: 8% 5%;
    overflow: hidden;
    border-radius: 20px;
    mask-image: radial-gradient(ellipse 80% 75% at 50% 50%, black 20%, transparent 75%);
}

.tt-awakening__holo-grid {
    position: absolute;
    inset: -20%;
    background-image:
        linear-gradient(rgba(20, 184, 166, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(20, 184, 166, 0.12) 1px, transparent 1px);
    background-size: 28px 28px;
    transform: rotateX(58deg) rotateZ(-8deg);
    transform-origin: center center;
    animation: tt-holo-drift 20s linear infinite;
}

.tt-awakening__holo-scan {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(20, 184, 166, 0.04) 3px,
        rgba(20, 184, 166, 0.04) 4px
    );
    opacity: 0.6;
}

@keyframes tt-holo-drift {
    from { transform: rotateX(58deg) rotateZ(-8deg) translateY(0); }
    to   { transform: rotateX(58deg) rotateZ(-8deg) translateY(28px); }
}

/* Particles
   -------------------------------------------------------------------------- */

.tt-awakening__particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.tt-awakening__particle {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--tt-teal-400);
    box-shadow: 0 0 6px var(--tt-teal-glow);
    opacity: 0;
    animation: tt-particle-float 6s ease-in-out infinite;
}

.tt-awakening__particle:nth-child(1) { top: 18%; left: 12%; animation-delay: 0s; }
.tt-awakening__particle:nth-child(2) { top: 28%; right: 15%; animation-delay: -1.2s; }
.tt-awakening__particle:nth-child(3) { bottom: 32%; left: 8%;  animation-delay: -2.4s; }
.tt-awakening__particle:nth-child(4) { bottom: 22%; right: 10%; animation-delay: -3.6s; }
.tt-awakening__particle:nth-child(5) { top: 45%; left: 5%;  animation-delay: -4.8s; }
.tt-awakening__particle:nth-child(6) { top: 55%; right: 6%; animation-delay: -1.8s; }

@keyframes tt-particle-float {
    0%, 100% { opacity: 0; transform: translateY(0); }
    25%      { opacity: 0.7; }
    50%      { opacity: 0.35; transform: translateY(-18px); }
    75%      { opacity: 0.5; }
}

/* NFC pulse rings
   -------------------------------------------------------------------------- */

.tt-nfc-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 48px;
    height: 48px;
    margin: -24px 0 0 -24px;
    pointer-events: none;
}

.tt-nfc-pulse__ring {
    position: absolute;
    inset: 0;
    border: 1.5px solid var(--tt-teal-400);
    border-radius: 50%;
    opacity: 0;
    animation: tt-nfc-ring 3.2s ease-out infinite;
}

.tt-nfc-pulse__ring--1 { animation-delay: 0s; }
.tt-nfc-pulse__ring--2 { animation-delay: 1.1s; }
.tt-nfc-pulse__ring--3 { animation-delay: 2.2s; }

@keyframes tt-nfc-ring {
    0%   { transform: scale(0.5); opacity: 0.65; }
    100% { transform: scale(2.8); opacity: 0; }
}

/* Card stage + 3D flip
   -------------------------------------------------------------------------- */

.tt-awakening__stage {
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--tt-card-w);
    height: calc(var(--tt-card-w) / var(--tt-card-ratio));
    margin-top: calc((var(--tt-card-w) / var(--tt-card-ratio)) / -2);
    margin-left: calc(var(--tt-card-w) / -2);
    transform-style: preserve-3d;
    animation: tt-card-float 7s ease-in-out infinite;
}

@keyframes tt-card-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-16px); }
}

.tt-flip-card {
    width: 100%;
    height: 100%;
    perspective: 1200px;
}

.tt-flip-card__inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transform: rotateX(10deg);
    animation: tt-card-flip var(--tt-flip-duration) ease-in-out infinite;
}

@keyframes tt-card-flip {
    0%, 45% {
        transform: rotateY(0deg) rotateX(10deg);
    }
    55%, 95% {
        transform: rotateY(180deg) rotateX(10deg);
    }
    100% {
        transform: rotateY(360deg) rotateX(10deg);
    }
}

.tt-flip-card__face {
    position: absolute;
    inset: 0;
    border-radius: 14px;
    overflow: hidden;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    box-shadow:
        0 40px 80px -20px rgba(0, 0, 0, 0.75),
        0 0 60px -10px var(--tt-teal-glow),
        0 0 0 1px rgba(20, 184, 166, 0.25) inset;
}

.tt-flip-card__face img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    display: block;
}

.tt-flip-card__face--back {
    transform: rotateY(180deg);
}

.tt-flip-card__glow {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(ellipse 60% 50% at 70% 30%, rgba(20, 184, 166, 0.25) 0%, transparent 60%);
    pointer-events: none;
    mix-blend-mode: screen;
    animation: tt-glow-pulse 4s ease-in-out infinite;
}

@keyframes tt-glow-pulse {
    0%, 100% { opacity: 0.5; }
    50%      { opacity: 1; }
}

.tt-flip-card__shine {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        125deg,
        transparent 30%,
        rgba(255, 255, 255, 0.08) 48%,
        transparent 62%
    );
    pointer-events: none;
    z-index: 2;
}

.tt-flip-card__scan-beam {
    position: absolute;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(20, 184, 166, 0.2) 20%,
        rgba(45, 212, 191, 0.9) 50%,
        rgba(20, 184, 166, 0.2) 80%,
        transparent
    );
    box-shadow: 0 0 16px var(--tt-teal-glow), 0 0 32px rgba(13, 148, 136, 0.3);
    z-index: 3;
    opacity: 0;
    animation: tt-scan-line 4s ease-in-out 1.2s infinite;
}

@keyframes tt-scan-line {
    0%   { top: -4%; opacity: 0; }
    8%   { opacity: 1; }
    92%  { opacity: 1; }
    100% { top: 104%; opacity: 0; }
}

/* Platform shadow
   -------------------------------------------------------------------------- */

.tt-awakening__platform {
    position: absolute;
    bottom: 6%;
    left: 50%;
    width: calc(var(--tt-card-w) * 0.8);
    height: 44px;
    margin-left: calc(var(--tt-card-w) * -0.4);
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(13, 148, 136, 0.45) 0%, rgba(13, 148, 136, 0.06) 55%, transparent 72%);
    filter: blur(14px);
    transform: rotateX(78deg);
    animation: tt-platform-breathe 7s ease-in-out infinite;
}

@keyframes tt-platform-breathe {
    0%, 100% { opacity: 0.65; transform: rotateX(78deg) scale(1); }
    50%      { opacity: 1; transform: rotateX(78deg) scale(1.1); }
}

/* Floating chips
   -------------------------------------------------------------------------- */

.tt-chip {
    position: absolute;
    padding: 0.35rem 0.7rem;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--tt-text-secondary);
    background: var(--tt-glass-bg);
    border: 1px solid var(--tt-glass-border);
    border-radius: 999px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    opacity: 0;
    animation: tt-chip-appear 0.8s var(--tt-ease) forwards, tt-chip-drift 8s ease-in-out infinite;
}

.tt-chip--tap      { top: 8%;  left: 2%;  animation-delay: 1s, 0s; }
.tt-chip--share    { top: 20%; right: 0;  animation-delay: 1.15s, -1.5s; }
.tt-chip--profile  { bottom: 28%; left: 0; animation-delay: 1.3s, -3s; }
.tt-chip--exchange { bottom: 14%; right: 2%; animation-delay: 1.45s, -4.5s; }
.tt-chip--qr       { top: 48%; right: -2%; animation-delay: 1.6s, -2s; }

@keyframes tt-chip-appear {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 0.85; transform: translateY(0); }
}

@keyframes tt-chip-drift {
    0%, 100% { transform: translate(0, 0); }
    50%      { transform: translate(6px, -10px); }
}

/* Footer
   -------------------------------------------------------------------------- */

.tt-footer {
    position: relative;
    z-index: 1;
    margin-top: auto;
    padding-top: var(--tt-space-xl);
    text-align: center;
}

.tt-footer p {
    font-size: 0.8125rem;
    color: var(--tt-text-muted);
}

.tt-footer__brand {
    color: var(--tt-text-secondary);
    font-weight: 500;
}

/* Desktop — cinematic split
   -------------------------------------------------------------------------- */

@media (min-width: 900px) {
    :root {
        --tt-card-w: 340px;
    }

    .tt-page {
        padding: var(--tt-space-xl) var(--tt-space-2xl) var(--tt-space-2xl);
    }

    .tt-hero {
        grid-template-columns: 1fr 1.1fr;
        grid-template-rows: auto 1fr;
        grid-template-areas:
            "lead scene"
            "body scene";
        gap: var(--tt-space-xl) var(--tt-space-2xl);
        min-height: calc(100vh - 100px);
        min-height: calc(100dvh - 100px);
        align-items: start;
    }

    .tt-headline {
        font-size: clamp(2.5rem, 4.2vw, 3.75rem);
        max-width: 14ch;
    }

    .tt-awakening {
        max-width: none;
        width: 100%;
        height: min(540px, 75vh);
        align-self: center;
        justify-self: center;
    }

    .tt-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .tt-btn {
        min-width: 190px;
    }

    .tt-chip--tap      { top: 10%; left: 6%; }
    .tt-chip--share    { top: 18%; right: 5%; }
    .tt-chip--profile  { bottom: 30%; left: 4%; }
    .tt-chip--exchange { bottom: 16%; right: 6%; }
    .tt-chip--qr       { top: 46%; right: 4%; }
}

@media (min-width: 480px) and (max-width: 899px) {
    .tt-headline {
        font-size: clamp(2.125rem, 6.5vw, 3rem);
    }

    .tt-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .tt-btn {
        flex: 1 1 calc(50% - var(--tt-space-sm));
        min-width: 160px;
    }
}

/* Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .tt-hero__lead,
    .tt-hero__body,
    .tt-awakening {
        opacity: 1;
        animation: none;
        transform: none;
    }

    .tt-flip-card__inner {
        animation: none;
        transform: rotateX(10deg) rotateY(0deg);
    }

    .tt-status-item__dot--active,
    .tt-bg__breath,
    .tt-awakening__holo-grid,
    .tt-awakening__particle,
    .tt-nfc-pulse__ring,
    .tt-awakening__stage,
    .tt-flip-card__glow,
    .tt-flip-card__scan-beam,
    .tt-awakening__platform,
    .tt-chip {
        animation: none;
    }

    .tt-flip-card__scan-beam {
        opacity: 0.4;
        top: 50%;
    }

    .tt-chip {
        opacity: 0.75;
    }

    .tt-nfc-pulse__ring {
        opacity: 0.2;
        transform: scale(1.5);
    }

    .tt-btn--primary:hover {
        transform: none;
    }

    .tt-btn {
        transition: none;
    }
}

.tt-reduced-motion .tt-hero__lead,
.tt-reduced-motion .tt-hero__body,
.tt-reduced-motion .tt-awakening {
    opacity: 1;
    animation: none;
    transform: none;
}

.tt-reduced-motion .tt-flip-card__inner {
    animation: none;
    transform: rotateX(10deg) rotateY(0deg);
}

.tt-reduced-motion .tt-status-item__dot--active,
.tt-reduced-motion .tt-bg__breath,
.tt-reduced-motion .tt-awakening__holo-grid,
.tt-reduced-motion .tt-awakening__particle,
.tt-reduced-motion .tt-nfc-pulse__ring,
.tt-reduced-motion .tt-awakening__stage,
.tt-reduced-motion .tt-flip-card__glow,
.tt-reduced-motion .tt-flip-card__scan-beam,
.tt-reduced-motion .tt-awakening__platform,
.tt-reduced-motion .tt-chip {
    animation: none;
}

.tt-reduced-motion .tt-flip-card__scan-beam {
    opacity: 0.4;
    top: 50%;
}

.tt-reduced-motion .tt-chip {
    opacity: 0.75;
}

.tt-reduced-motion .tt-nfc-pulse__ring {
    opacity: 0.2;
    transform: scale(1.5);
}

.tt-reduced-motion .tt-btn--primary:hover {
    transform: none;
}
