/* ===========================================================================
   TB Tech · parent studio site
   Editorial / studio layout. Same brand tokens as IconForge, distinct rhythm:
   asymmetric grid, serif accents, numbered list items, generous whitespace.
   =========================================================================== */

/* -------- Reset -------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* -------- Tokens -------- */
:root {
    /* Slightly deeper black than IconForge for visual differentiation */
    --bg: #08080d;
    --bg-raised: #11111a;
    --bg-surface: #16161f;
    --bg-elevated: #1c1c27;

    --text: #f5f5fa;
    --text-secondary: #a8a8bc;
    --text-tertiary: #6a6a80;
    --text-muted: #44445a;

    /* IconForge brand colors — used ONLY inside the featured product card,
       not as the parent-site identity. Each TB Tech product owns its own
       colors; the studio itself uses the --studio-* palette below. */
    --brand-a: #a47cd4;
    --brand-b: #d67bc8;
    --brand-c: #7b6fd9;

    /* Studio house palette — high-energy, dopamine-pop accents to signal a
       vibrant multi-product studio. Used everywhere on the parent page that
       isn't representing a specific product. */
    --studio-1: #ff3d8a;   /* hot magenta    — primary studio accent */
    --studio-2: #00d4ff;   /* electric cyan  — secondary */
    --studio-3: #b9ff00;   /* lime           — tertiary */
    --studio-4: #ff7a00;   /* vivid orange   — quaternary */

    --border: rgba(255, 255, 255, 0.07);
    --border-strong: rgba(255, 255, 255, 0.13);

    --max-width: 1140px;
    --gutter: 36px;

    --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter",
                 system-ui, Helvetica, Arial, sans-serif;
    --font-serif: "New York", ui-serif, "Iowan Old Style", "Apple Garamond",
                  Charter, "Times New Roman", Georgia, serif;
    --font-mono: ui-monospace, "SF Mono", Menlo, "Cascadia Code",
                 "JetBrains Mono", Consolas, monospace;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* -------- Base -------- */
body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    font-size: 16px;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s var(--ease-out);
}

img {
    display: block;
    max-width: 100%;
}

.serif {
    font-family: var(--font-serif);
    font-weight: 500;
    font-style: italic;
    letter-spacing: -0.015em;
}

.dot {
    opacity: 0.4;
    margin: 0 4px;
}

/* ===========================================================================
   BACKGROUND EFFECTS  (deliberately quieter than IconForge)
   =========================================================================== */

/* Single hot-magenta orb in the top-left — distinct from IconForge's cool purple */
.orb {
    position: fixed;
    top: -200px;
    left: -180px;
    width: 720px;
    height: 720px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--studio-1), transparent 65%);
    filter: blur(140px);
    opacity: 0.22;
    pointer-events: none;
    z-index: 0;
    animation: drift 32s var(--ease-in-out) infinite;
}

@keyframes drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(40px, 30px) scale(1.06); }
}

/* Subtle film grain overlay — editorial texture */
.grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.04;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.6 0'/></filter><rect width='180' height='180' filter='url(%23n)'/></svg>");
}

.nav, header, section, footer {
    position: relative;
    z-index: 2;
}

/* ===========================================================================
   NAV
   =========================================================================== */

.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: saturate(160%) blur(22px);
    -webkit-backdrop-filter: saturate(160%) blur(22px);
    background: rgba(8, 8, 13, 0.72);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 18px var(--gutter);
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.nav-logo {
    height: 30px;
    width: auto;
    opacity: 0.95;
    transition: opacity 0.2s var(--ease-out);
}

.nav-brand:hover .nav-logo {
    opacity: 1;
}

.nav-meta {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: 2px;
}

.nav-link {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: 100px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.025);
    transition: all 0.2s var(--ease-out);
}

.nav-link:hover {
    color: var(--studio-1);
    border-color: rgba(255, 61, 138, 0.4);
    background: rgba(255, 61, 138, 0.08);
}

/* ===========================================================================
   HERO  — asymmetric, logo-led
   =========================================================================== */

.hero {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 120px var(--gutter) 100px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(220px, 320px) 1fr;
    gap: 80px;
    align-items: center;
}

.hero-mark {
    position: relative;
    animation: fade-up 1s var(--ease-out) both;
}

.hero-mark img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 30px 60px rgba(255, 61, 138, 0.32))
            drop-shadow(0 0 80px rgba(0, 212, 255, 0.22));
}

.hero-mark::after {
    /* Soft multi-color halo behind the mark — studio palette */
    content: "";
    position: absolute;
    inset: 8% 8% 8% 8%;
    background:
        radial-gradient(circle at 30% 40%, rgba(255, 61, 138, 0.25), transparent 60%),
        radial-gradient(circle at 70% 60%, rgba(255, 122, 0, 0.18), transparent 60%);
    filter: blur(60px);
    z-index: -1;
    pointer-events: none;
}

.hero-text {
    animation: fade-up 1s var(--ease-out) 0.15s both;
}

.hero-title {
    font-size: clamp(48px, 7.2vw, 88px);
    font-weight: 800;
    line-height: 0.96;
    letter-spacing: -0.04em;
    margin-bottom: 32px;
}

.hero-title .serif {
    background: linear-gradient(120deg,
                var(--studio-1) 0%,
                var(--studio-4) 50%,
                var(--studio-2) 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradient-shift 9s ease-in-out infinite;
    display: inline-block;
    font-weight: 500;
    /* Italic serif descenders ("g") need breathing room — the parent's
       0.96 line-height clips them otherwise */
    line-height: 1.15;
    padding-bottom: 0.08em;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

.hero-lede {
    font-size: clamp(16px, 1.25vw, 19px);
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 540px;
    margin-bottom: 36px;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 28px;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text);
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border-strong);
    transition: all 0.2s var(--ease-out);
}

.text-link:hover {
    color: var(--studio-1);
    border-bottom-color: var(--studio-1);
}

.text-link:hover svg {
    transform: translateX(4px);
}

.text-link svg {
    transition: transform 0.25s var(--ease-out);
}

@keyframes fade-up {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===========================================================================
   SECTIONS — shared
   =========================================================================== */

.section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 90px var(--gutter);
}

/* Editorial section rule: mono label + line going right */
.rule {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 56px;
}

.rule-text {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.rule::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border) 0%, transparent 100%);
}

.big-title {
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.035em;
    margin-bottom: 60px;
    max-width: 720px;
}

.big-title .serif {
    background: linear-gradient(120deg, var(--studio-1), var(--studio-4));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 500;
}

/* ===========================================================================
   NOW SHOWING — editorial featured product card
   =========================================================================== */

.featured {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 48px;
    padding: 44px;
    background: linear-gradient(180deg, var(--bg-raised), var(--bg-surface));
    border: 1px solid var(--border);
    border-radius: 28px;
    align-items: center;
    color: inherit;
    position: relative;
    overflow: hidden;
    transition: all 0.4s var(--ease-out);
}

.featured::before {
    /* Top-edge brand line */
    content: "";
    position: absolute;
    top: 0;
    left: 44px;
    right: 44px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--brand-a) 30%, var(--brand-b) 70%, transparent);
    opacity: 0.4;
    transition: opacity 0.4s var(--ease-out);
}

.featured::after {
    /* Soft corner glow */
    content: "";
    position: absolute;
    top: -120px;
    right: -120px;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(214, 123, 200, 0.18), transparent 70%);
    filter: blur(40px);
    opacity: 0;
    transition: opacity 0.5s var(--ease-out);
    pointer-events: none;
}

.featured:hover {
    border-color: var(--border-strong);
    transform: translateY(-3px);
}

.featured:hover::before { opacity: 0.8; }
.featured:hover::after { opacity: 1; }

.featured-visual {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    background:
        radial-gradient(circle at 50% 30%, rgba(164, 124, 212, 0.18), transparent 60%),
        rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 36px;
}

.featured-visual img {
    width: 100%;
    max-width: 180px;
    height: auto;
    border-radius: 30px;
    box-shadow:
        0 20px 50px rgba(164, 124, 212, 0.4),
        0 1px 0 rgba(255, 255, 255, 0.15) inset;
    transition: transform 0.5s var(--ease-out);
}

.featured:hover .featured-visual img {
    transform: scale(1.04) rotate(-1.5deg);
}

.featured-info {
    min-width: 0;
}

.featured-num {
    font-family: var(--font-serif);
    font-size: 14px;
    color: var(--text-tertiary);
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}

.featured-title {
    font-size: clamp(32px, 3.6vw, 44px);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 8px;
}

.featured-tagline {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 18px;
    color: var(--brand-a);
    margin-bottom: 18px;
    letter-spacing: -0.005em;
}

.featured-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
    max-width: 520px;
}

.featured-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 26px;
}

.chip {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 5px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text-tertiary);
}

.chip-accent {
    background: rgba(94, 224, 168, 0.08);
    border-color: rgba(94, 224, 168, 0.25);
    color: #5ee0a8;
}

.featured-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text);
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-strong);
    transition: all 0.25s var(--ease-out);
}

.featured:hover .featured-cta {
    color: var(--brand-a);
    border-bottom-color: var(--brand-a);
    gap: 14px;
}

/* "№ 02 in development" line */
.next-up {
    margin-top: 36px;
    padding-left: 44px;
    font-size: 14px;
    color: var(--text-tertiary);
    line-height: 1.65;
    border-left: 1px solid var(--border);
    max-width: 720px;
}

.next-num {
    font-family: var(--font-serif);
    color: var(--text-secondary);
    margin-right: 6px;
}

/* ===========================================================================
   MANIFESTO — numbered editorial list
   =========================================================================== */

.creed {
    list-style: none;
    border-top: 1px solid var(--border);
}

.creed-item {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 48px;
    padding: 40px 0;
    border-bottom: 1px solid var(--border);
    align-items: baseline;
    transition: padding 0.3s var(--ease-out);
}

.creed-item:hover {
    padding-left: 12px;
}

.creed-num {
    font-family: var(--font-serif);
    font-size: 64px;
    font-weight: 400;
    font-style: italic;
    line-height: 1;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    letter-spacing: -0.02em;
}

/* Each principle gets its own color from the studio palette, cycling
   continuously — visually suggests a multi-product studio in motion */
.creed-item:nth-child(1) .creed-num {
    background-image: linear-gradient(135deg, var(--studio-1), var(--studio-2));
}
.creed-item:nth-child(2) .creed-num {
    background-image: linear-gradient(135deg, var(--studio-2), var(--studio-3));
}
.creed-item:nth-child(3) .creed-num {
    background-image: linear-gradient(135deg, var(--studio-3), var(--studio-4));
}
.creed-item:nth-child(4) .creed-num {
    background-image: linear-gradient(135deg, var(--studio-4), var(--studio-1));
}

.creed-body h3 {
    font-size: clamp(22px, 2.4vw, 30px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 10px;
}

.creed-body p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 640px;
}

/* ===========================================================================
   STUDIO — personal signature block
   =========================================================================== */

.studio-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 64px;
    align-items: center;
    padding: 56px 48px;
    background:
        radial-gradient(ellipse at 0% 0%,   rgba(255, 61, 138, 0.14), transparent 55%),
        radial-gradient(ellipse at 100% 100%, rgba(255, 122, 0, 0.10), transparent 55%),
        var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: 28px;
    position: relative;
    overflow: hidden;
}

.studio-mark img {
    width: 100%;
    height: auto;
    opacity: 0.95;
    filter: drop-shadow(0 12px 30px rgba(255, 61, 138, 0.28));
}

.studio-text {
    min-width: 0;
}

.studio-lede {
    font-size: clamp(18px, 1.6vw, 22px);
    line-height: 1.6;
    color: var(--text);
    margin-bottom: 26px;
    max-width: 560px;
    letter-spacing: -0.005em;
}

.studio-lede .serif {
    background: linear-gradient(120deg, var(--studio-1), var(--studio-4));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 500;
    font-size: 1.05em;
}

.studio-mail {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 14px;
    color: #1a0612;
    padding: 14px 22px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--studio-1), var(--studio-4));
    box-shadow:
        0 6px 24px rgba(255, 61, 138, 0.35),
        0 1px 0 rgba(255, 255, 255, 0.25) inset;
    transition: all 0.25s var(--ease-out);
    font-weight: 600;
}

.studio-mail:hover {
    transform: translateY(-2px);
    box-shadow:
        0 10px 32px rgba(255, 61, 138, 0.5),
        0 1px 0 rgba(255, 255, 255, 0.3) inset;
}

.studio-mail svg {
    transition: transform 0.25s var(--ease-out);
}

.studio-mail:hover svg {
    transform: translate(2px, -2px);
}

/* ===========================================================================
   FOOTER
   =========================================================================== */

.footer {
    margin-top: 60px;
    padding: 56px var(--gutter) 48px;
    border-top: 1px solid var(--border);
    background: rgba(8, 8, 13, 0.6);
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}

.footer-brand {
    display: flex;
    align-items: center;
}

.footer-logo {
    height: 38px;
    width: auto;
    opacity: 0.85;
    transition: opacity 0.2s var(--ease-out);
}

.footer-brand:hover .footer-logo {
    opacity: 1;
}

.footer-meta {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.footer-meta a:hover {
    color: var(--studio-1);
}

/* ===========================================================================
   REVEAL ON SCROLL
   =========================================================================== */

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===========================================================================
   RESPONSIVE
   =========================================================================== */

@media (max-width: 920px) {
    :root {
        --gutter: 28px;
    }

    .hero {
        padding: 90px var(--gutter) 80px;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 48px;
        text-align: left;
    }

    .hero-mark {
        max-width: 220px;
    }

    .featured {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 32px;
    }

    .featured-visual {
        max-width: 260px;
        margin: 0 auto;
    }

    .creed-item {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 32px 0;
    }

    .creed-num {
        font-size: 48px;
    }

    .studio-grid {
        grid-template-columns: 1fr;
        gap: 36px;
        padding: 44px 32px;
        text-align: left;
    }

    .studio-mark {
        max-width: 140px;
    }
}

@media (max-width: 640px) {
    .nav-meta {
        display: none;
    }

    .nav-inner {
        gap: 16px;
    }

    .section {
        padding: 70px var(--gutter);
    }

    .next-up {
        padding-left: 24px;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
}

/* ===========================================================================
   REDUCED MOTION
   =========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .reveal { opacity: 1; transform: none; }
    .orb, .hero-title .serif, .big-title .serif { animation: none !important; }
}

/* ===========================================================================
   SELECTION
   =========================================================================== */

::selection {
    background: rgba(255, 61, 138, 0.4);
    color: #1a1208;
}
