/*
 * Talabatey design system — light (default) + dark themes.
 * Theme is set on <html data-theme> by the inline script in root.blade.php;
 * `.tb-dark` forces the dark palette on photo-led zones in either theme.
 * Loaded after /css/app.css (Tailwind) in root.blade.php. Components use the
 * tb-* classes below directly; Tailwind utilities remain for small layout bits.
 */

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800;900&family=Inter:wght@400;500;600;700;800&display=swap');

/* ---------- Tokens ---------- */
/* Light (default) */
:root {
    --c-primary:       #f43545;
    --c-primary-dark:  #c41e2e;
    --c-primary-glow:  rgba(244, 53, 69, .45);
    --c-page-bg:       #faf8f6;
    --c-page-glow:     rgba(244, 53, 69, .07);
    --c-bg:            #faf8f6;
    --c-bg-2:          #f3efeb;
    --c-surface:       #ffffff;
    --c-surface-2:     #f4f1ee;
    --c-border:        rgba(24, 16, 18, .08);
    --c-border-strong: rgba(24, 16, 18, .14);
    --c-heading:       #111115;
    --c-text:          #1c1c22;
    --c-text-2:        #52525e;
    --c-text-3:        #66666f;
    --c-glass:         rgba(24, 16, 18, .035);
    --c-glass-2:       rgba(24, 16, 18, .07);
    --c-nav-solid:     rgba(250, 248, 246, .82);
    --c-drawer:        rgba(250, 248, 246, .97);
    --c-panel:         #ffffff;
    --c-card-shade:    rgba(0, 0, 0, .12);
    --c-success:       #16a34a;
    --c-danger:        #dc2626;
    --shadow-card:     0 24px 60px rgba(40, 20, 25, .10), 0 2px 6px rgba(40, 20, 25, .04);
    --shadow-soft:     0 1px 2px rgba(40, 20, 25, .04), 0 10px 30px rgba(40, 20, 25, .05);
    --grain:           .02;
    color-scheme: light;
}

/* Dark: the whole page, or any photo-led .tb-dark zone */
[data-theme="dark"],
.tb-dark {
    --c-bg:            #0a0a0c;
    --c-bg-2:          #0f0f12;
    --c-surface:       #141418;
    --c-surface-2:     #1b1b21;
    --c-border:        rgba(255, 255, 255, .08);
    --c-border-strong: rgba(255, 255, 255, .14);
    --c-heading:       #ffffff;
    --c-text:          #f4f4f6;
    --c-text-2:        #b4b4bf;
    --c-text-3:        #7c7c88;
    --c-glass:         rgba(255, 255, 255, .04);
    --c-glass-2:       rgba(255, 255, 255, .08);
    --c-nav-solid:     rgba(10, 10, 12, .72);
    --c-drawer:        rgba(10, 10, 12, .96);
    --c-panel:         linear-gradient(180deg, rgba(27, 27, 33, .9), rgba(20, 20, 24, .9));
    --c-card-shade:    rgba(20, 20, 24, .7);
    --c-success:       #22c55e;
    --c-danger:        #f87171;
    --shadow-card:     0 20px 50px rgba(0, 0, 0, .45);
    --shadow-soft:     none;
    color-scheme: dark;
}
/* Page-level only (a .tb-dark zone keeps fading into the real page colour) */
[data-theme="dark"] {
    --c-page-bg:   #0a0a0c;
    --c-page-glow: rgba(244, 53, 69, .10);
    --grain:       .035;
}
.tb-dark { color: var(--c-text); }

/* Theme-independent tokens */
:root {
    --font:'Tajawal', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --r-sm: 10px;
    --r-md: 16px;
    --r-lg: 24px;
    --r-xl: 32px;

    --shadow-cta:  0 12px 32px rgba(244, 53, 69, .35);
    --ease: cubic-bezier(.22, 1, .36, 1);

    --nav-h: 76px;
    --gutter: clamp(16px, 4vw, 40px);
}

/* ---------- Base ---------- */
html, body {
    background: var(--c-page-bg) !important;
    color: var(--c-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overscroll-behavior-y: none;
}
html, body, input, p, span, textarea, a, button, select, h1, h2, h3, h4 {
    font-family: var(--font) !important;
}
::selection { background: var(--c-primary); color: #fff; }

#talabatey { min-height: 100vh; }

.tb-page {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: clip;
    background:
        radial-gradient(1200px 600px at 85% -10%, var(--c-page-glow), transparent 60%),
        var(--c-page-bg);
}

.tb-container {
    width: 100%;
    max-width: 1240px;
    margin-inline: auto;
    padding-inline: var(--gutter);
}

/* Subtle film grain over everything for a cinematic finish */
.tb-page::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 60;
    opacity: var(--grain);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Type ---------- */
.tb-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--c-border-strong);
    background: var(--c-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--c-text-2);
    font-size: .875rem;
    font-weight: 500;
}
.tb-eyebrow::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--c-primary);
    box-shadow: 0 0 0 4px rgba(244, 53, 69, .2), 0 0 16px var(--c-primary);
}

.tb-h2 {
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.02em;
    color: var(--c-heading);
    margin: 0;
}
.tb-lead {
    color: var(--c-text-2);
    font-size: clamp(1rem, 1.4vw, 1.125rem);
    line-height: 1.7;
    margin: 0;
}
.tb-accent { color: var(--c-primary); }

.tb-section { padding-block: clamp(72px, 10vw, 140px); position: relative; }
.tb-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: clamp(28px, 4vw, 48px);
    flex-wrap: wrap;
}
.tb-section-head .tb-eyebrow { margin-bottom: 16px; }

/* CMS (rich text from Nova settings) — neutralize hard-coded inline colors /
   pt sizes so it reads on dark backgrounds. */
.tb-cms * {
    color: inherit !important;
    font-size: inherit !important;
    font-family: var(--font) !important;
    background: transparent !important;
}
.tb-cms p, .tb-cms h1, .tb-cms h2 { margin: 0; text-align: inherit !important; }
.tb-cms br:first-child { display: none; }
.tb-prose { color: var(--c-text-2); font-size: 1.0625rem; line-height: 1.9; }
.tb-prose p { margin: 0 0 1em; }
.tb-prose strong { color: var(--c-heading) !important; }
.tb-prose a { color: var(--c-primary) !important; text-decoration: underline; }
.tb-prose img { border-radius: var(--r-md); margin-block: 1.5em; }

/* ---------- Buttons ---------- */
.tb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 28px;
    border-radius: 999px;
    font-weight: 700 !important;
    font-size: 1rem;
    text-decoration: none !important;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s, border-color .2s, color .2s;
    white-space: nowrap;
}
.tb-btn:focus { outline: none; }
.tb-btn-primary {
    background: var(--c-primary);
    color: #fff !important;
    box-shadow: var(--shadow-cta), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.tb-btn-primary:hover {
    background: #ff4252;
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(244, 53, 69, .5), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.tb-btn-ghost {
    background: var(--c-glass);
    border-color: var(--c-border-strong);
    color: var(--c-text) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.tb-btn-ghost:hover { background: var(--c-glass-2); border-color: var(--c-text-3); }
.tb-btn-sm { min-height: 42px; padding: 0 20px; font-size: .9375rem; }
.tb-btn[disabled] { opacity: .7; cursor: wait; }
.tb-btn svg { width: 18px; height: 18px; }
[dir="rtl"] .tb-flip-rtl { transform: scaleX(-1); }

/* ---------- Navbar ---------- */
.tb-nav {
    position: fixed;
    inset-inline: 0;
    top: 0;
    z-index: 50;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    transition: background .35s var(--ease), border-color .35s, height .35s var(--ease);
    border-bottom: 1px solid transparent;
}
.tb-nav.is-solid {
    height: 64px;
    background: var(--c-nav-solid);
    backdrop-filter: saturate(160%) blur(18px);
    -webkit-backdrop-filter: saturate(160%) blur(18px);
    border-bottom-color: var(--c-border);
}
.tb-nav-inner { display: flex; align-items: center; gap: 24px; height: 100%; }
.tb-nav-logo { display: flex; align-items: center; height: 100%; flex-shrink: 0; }
.tb-nav-logo img { height: 40px; width: auto; transition: height .35s var(--ease); }
.tb-nav.is-solid .tb-nav-logo img { height: 34px; }
.tb-nav-links { display: flex; align-items: center; gap: 4px; margin-inline: auto; }
.tb-nav-link {
    position: relative;
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--c-text-2) !important;
    font-weight: 500;
    font-size: .9375rem;
    text-decoration: none;
    transition: color .2s, background .2s;
}
.tb-nav-link:hover { color: var(--c-heading) !important; background: var(--c-glass-2); }
.tb-nav-link.is-active,
.tb-nav-link.router-link-exact-active:not([href*="#"]) { color: var(--c-heading) !important; }
.tb-nav-link.is-active::after,
.tb-nav-link.router-link-exact-active:not([href*="#"])::after {
    content: "";
    position: absolute;
    bottom: 2px;
    inset-inline: 40%;
    height: 2px;
    border-radius: 2px;
    background: var(--c-primary);
    box-shadow: 0 0 10px var(--c-primary);
}
.tb-nav-actions { display: flex; align-items: center; gap: 10px; }
.tb-lang {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    min-width: 42px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--c-border-strong);
    color: var(--c-text) !important;
    font-size: .875rem;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s, border-color .2s;
}
.tb-lang:hover { background: var(--c-glass-2); }
.tb-burger {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--c-border-strong);
    background: var(--c-glass);
    color: var(--c-text);
    align-items: center;
    justify-content: center;
}
.tb-burger:focus { outline: none; }
.tb-burger svg { width: 20px; height: 20px; }
.tb-drawer {
    position: fixed;
    inset: 0;
    z-index: 49;
    padding: calc(var(--nav-h) + 16px) var(--gutter) 32px;
    background: var(--c-drawer);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.tb-drawer .tb-nav-link {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--c-heading) !important;
    padding: 14px 4px;
    border-radius: 0;
    border-bottom: 1px solid var(--c-border);
}
.tb-drawer .tb-nav-link::after { display: none; }
.tb-drawer .tb-btn { margin-top: 24px; }

@media (max-width: 1024px) {
    .tb-nav-links, .tb-nav-actions .tb-btn { display: none; }
    .tb-burger { display: inline-flex; }
    .tb-nav-actions { margin-inline-start: auto; }
}

/* ---------- Hero ---------- */
.tb-hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding: calc(var(--nav-h) + 40px) 0 80px;
    overflow: hidden;
    isolation: isolate;
}
.tb-hero-media {
    position: absolute;
    inset: 0;
    z-index: -2;
}
.tb-hero-media img,
.tb-hero-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 20% 50%;
}
/* Food sits on the left of the shot; flip it for LTR so text keeps the dark side */
[dir="ltr"] .tb-hero-media { transform: scaleX(-1); }
.tb-hero-media video { opacity: 0; transition: opacity 1.2s ease; }
.tb-hero-media video.is-ready { opacity: 1; }
.tb-hero-media video { position: absolute; inset: 0; }
.tb-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(to left, rgba(10, 10, 12, .92) 0%, rgba(10, 10, 12, .55) 45%, rgba(10, 10, 12, .1) 75%),
        linear-gradient(to top, var(--c-page-bg) 0%, transparent 35%),
        linear-gradient(to bottom, rgba(10, 10, 12, .6) 0%, transparent 25%),
        rgba(10, 10, 12, .3);
}
[dir="ltr"] .tb-hero::before {
    background:
        linear-gradient(to right, rgba(10, 10, 12, .92) 0%, rgba(10, 10, 12, .55) 45%, rgba(10, 10, 12, .1) 75%),
        linear-gradient(to top, var(--c-page-bg) 0%, transparent 35%),
        linear-gradient(to bottom, rgba(10, 10, 12, .6) 0%, transparent 25%),
        rgba(10, 10, 12, .3);
}
.tb-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
    align-items: center;
    gap: clamp(24px, 4vw, 64px);
}
.tb-hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 28px; }
.tb-hero-title {
    font-size: clamp(2.6rem, 6.2vw, 5.25rem);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -.025em;
    color: #fff;
}
/* First line of the CMS headline in white, second in brand red */
.tb-hero-title > *:nth-child(2),
.tb-hero-title p br + span {
    display: block;
    margin-top: .2em;
    font-size: .62em !important;
    font-weight: 700;
    color: var(--c-primary) !important;
    letter-spacing: -.01em;
}
.tb-hero-title strong { font-weight: inherit; }
.tb-hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }

.tb-hero-phone {
    position: relative;
    justify-self: center;
    width: min(100%, 400px);
}
.tb-hero-phone::before {
    content: "";
    position: absolute;
    inset: 15% 5% 5%;
    background: radial-gradient(closest-side, var(--c-primary-glow), transparent);
    filter: blur(40px);
    z-index: -1;
}
.tb-hero-phone img {
    width: 100%;
    height: auto;
    animation: tb-float 7s ease-in-out infinite;
    filter: drop-shadow(0 40px 60px rgba(0, 0, 0, .6));
}
@keyframes tb-float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-14px) rotate(-.6deg); }
}
.tb-scroll-cue {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    width: 26px;
    height: 42px;
    border-radius: 999px;
    border: 1.5px solid rgba(255, 255, 255, .3);
}
.tb-scroll-cue::after {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    width: 4px;
    height: 8px;
    margin-left: -2px;
    border-radius: 4px;
    background: #fff;
    animation: tb-cue 1.8s ease-in-out infinite;
}
@keyframes tb-cue {
    0%   { opacity: 0; transform: translateY(0); }
    40%  { opacity: 1; }
    100% { opacity: 0; transform: translateY(14px); }
}

/* ---------- Store badges / stats ---------- */
.tb-stores { display: flex; flex-wrap: wrap; gap: 10px; }
.tb-store {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 8px 20px 8px 14px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .03));
    border: 1px solid rgba(255, 255, 255, .14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 8px 24px rgba(0, 0, 0, .25);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: #fff !important;
    text-decoration: none !important;
    transition: transform .3s var(--ease), border-color .25s, background .25s, box-shadow .3s;
}
[dir="rtl"] .tb-store { padding: 8px 14px 8px 20px; }
.tb-store:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, .32);
    background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .05));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 14px 32px rgba(0, 0, 0, .35);
}
.tb-store-icon { width: 26px; height: 26px; flex-shrink: 0; display: grid; place-items: center; }
.tb-store-icon svg { width: 100%; height: 100%; display: block; }
.tb-store-text { display: flex; flex-direction: column; line-height: 1.1; text-align: start; }
.tb-store-text small { font-size: .6875rem; font-weight: 500; color: rgba(255, 255, 255, .7); letter-spacing: .01em; }
.tb-store-text b { font-family: 'Inter', var(--font) !important; font-size: 1.0625rem; font-weight: 700; letter-spacing: -.01em; }
.tb-store-count {
    margin-inline-start: 6px;
    padding-inline-start: 14px;
    border-inline-start: 1px solid rgba(255, 255, 255, .14);
    font-weight: 800;
    font-size: .9375rem;
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
}
.tb-store-count small { display: block; color: var(--c-text-3); font-size: .6875rem; font-weight: 500; }

.tb-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    background: var(--c-surface);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}
.tb-stat { padding: clamp(20px, 3vw, 36px); border-inline-start: 1px solid var(--c-border); }
.tb-stat:first-child { border-inline-start: 0; }
.tb-stat b {
    display: block;
    font-size: clamp(1.75rem, 3.4vw, 2.75rem);
    font-weight: 900;
    letter-spacing: -.02em;
    color: var(--c-heading);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}
.tb-stat.is-total b {
    padding-inline: 4px;
    margin-inline: -4px;
    background: linear-gradient(90deg, #ff6b78, var(--c-primary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.tb-stat span { color: var(--c-text-3); font-size: .9375rem; }

/* ---------- Feature tiles ---------- */
.tb-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tb-feature {
    position: relative;
    padding: clamp(24px, 3vw, 36px);
    border-radius: var(--r-lg);
    border: 1px solid var(--c-border);
    background: var(--c-surface);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    transition: border-color .3s, transform .4s var(--ease);
}
.tb-feature::before {
    content: "";
    position: absolute;
    inset: auto -30% -60% auto;
    width: 260px;
    height: 260px;
    background: radial-gradient(closest-side, rgba(244, 53, 69, .18), transparent);
    transition: opacity .4s;
    opacity: .5;
}
[dir="rtl"] .tb-feature::before { inset: auto auto -60% -30%; }
.tb-feature:hover { border-color: rgba(244, 53, 69, .35); transform: translateY(-4px); }
.tb-feature:hover::before { opacity: 1; }
.tb-feature-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(244, 53, 69, .12);
    border: 1px solid rgba(244, 53, 69, .3);
    color: var(--c-primary);
    margin-bottom: 22px;
}
.tb-feature-icon svg { width: 24px; height: 24px; }
.tb-feature h3 { font-size: 1.375rem; font-weight: 800; color: var(--c-heading); margin: 0 0 8px; }
.tb-feature p { color: var(--c-text-2); margin: 0; line-height: 1.7; }

/* ---------- Post cards ---------- */
.tb-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: var(--r-lg);
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    text-decoration: none !important;
    transition: transform .45s var(--ease), border-color .3s, box-shadow .45s var(--ease);
}
.tb-card:hover { transform: translateY(-6px); border-color: var(--c-border-strong); box-shadow: var(--shadow-card); }
.tb-card-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--c-surface-2); }
.tb-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.tb-card:hover .tb-card-media img { transform: scale(1.06); }
.tb-card-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--c-card-shade), transparent 50%);
}
.tb-card-body { padding: 22px 22px 26px; display: flex; flex-direction: column; gap: 10px; }
.tb-card-title {
    color: var(--c-heading);
    font-size: 1.1875rem;
    font-weight: 800;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tb-card-text {
    color: var(--c-text-3);
    font-size: .9375rem;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tb-card-more {
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--c-primary);
    font-weight: 700;
    font-size: .875rem;
}
.tb-card-more svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.tb-card:hover .tb-card-more svg { transform: translateX(4px); }
[dir="rtl"] .tb-card:hover .tb-card-more svg { transform: scaleX(-1) translateX(4px); }

.tb-swiper { overflow: visible !important; }
.tb-swiper .swiper-wrapper { align-items: stretch !important; }
.tb-swiper .swiper-slide { height: auto; }
.tb-viewall {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    height: 100%;
    min-height: 320px;
    border-radius: var(--r-lg);
    border: 1px dashed rgba(244, 53, 69, .45);
    background: radial-gradient(closest-side, rgba(244, 53, 69, .12), transparent), var(--c-bg-2);
    color: var(--c-heading);
    font-weight: 800;
    font-size: 1.125rem;
    cursor: pointer;
    transition: border-color .3s, background .3s;
}
.tb-viewall:hover { border-color: var(--c-primary); }
.tb-viewall-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--c-primary);
    box-shadow: var(--shadow-cta);
}
.tb-viewall-icon svg { width: 22px; height: 22px; color: #fff; }
.tb-skeleton {
    border-radius: var(--r-lg);
    min-height: 360px;
    background: linear-gradient(100deg, var(--c-surface) 30%, var(--c-surface-2) 50%, var(--c-surface) 70%);
    background-size: 200% 100%;
    animation: tb-shimmer 1.4s linear infinite;
}
@keyframes tb-shimmer { to { background-position: -200% 0; } }

/* ---------- Join cards ---------- */
.tb-join { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tb-join-card {
    position: relative;
    min-height: 560px;
    border-radius: var(--r-xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: clamp(24px, 3vw, 36px);
    isolation: isolate;
    border: 1px solid var(--c-border);
    text-decoration: none !important;
}
.tb-join-card > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    transition: transform 1.2s var(--ease);
}
.tb-join-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to top, rgba(8, 8, 10, .96) 0%, rgba(8, 8, 10, .6) 40%, rgba(8, 8, 10, .05) 75%);
    transition: background .5s;
}
.tb-join-card:hover > img { transform: scale(1.07); }
.tb-join-card .tb-eyebrow { align-self: flex-start; margin-bottom: auto; }
.tb-join-title { color: #fff; font-size: clamp(1.5rem, 2.2vw, 1.875rem); font-weight: 800; line-height: 1.35; margin: 0 0 22px; }
.tb-join-title br { display: none; }
.tb-join-card .tb-btn { align-self: flex-start; }

/* ---------- App CTA band ---------- */
.tb-cta-band {
    position: relative;
    border-radius: var(--r-xl);
    padding: clamp(32px, 6vw, 72px);
    overflow: hidden;
    background:
        radial-gradient(600px 300px at 15% 120%, rgba(255, 255, 255, .18), transparent 60%),
        linear-gradient(135deg, #ff4a59 0%, var(--c-primary) 45%, #a3121f 100%);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 32px;
    box-shadow: 0 40px 80px rgba(244, 53, 69, .25);
}
.tb-cta-band .tb-h2 { color: #fff; font-size: clamp(1.75rem, 3vw, 2.5rem); }
.tb-cta-band .tb-lead { color: rgba(255, 255, 255, .85); margin-top: 12px; }
.tb-cta-band .tb-store { background: #0a0a0c; border-color: rgba(0, 0, 0, .2); box-shadow: 0 10px 30px rgba(80, 0, 10, .35); }
.tb-cta-band .tb-store:hover { background: #17171b; border-color: rgba(255, 255, 255, .2); }

/* ---------- Footer ---------- */
.tb-footer {
    margin-top: auto;
    border-top: 1px solid var(--c-border);
    background: var(--c-bg-2);
    padding: 56px 0 32px;
}
.tb-footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--c-border);
}
.tb-footer-top img { height: 44px; width: auto; }
.tb-footer-links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.tb-footer-links a { color: var(--c-text-2) !important; text-decoration: none; font-size: .9375rem; transition: color .2s; }
.tb-footer-links a:hover { color: var(--c-heading) !important; }
.tb-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 24px;
    color: var(--c-text-3);
    font-size: .875rem;
}
.tb-socials { display: flex; gap: 10px; }
.tb-socials a {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 1px solid var(--c-border-strong);
    color: var(--c-text-2) !important;
    font-size: 1.125rem;
    transition: background .2s, color .2s, border-color .2s, transform .3s var(--ease);
}
.tb-socials a:hover { background: var(--c-primary); border-color: var(--c-primary); color: #fff !important; transform: translateY(-3px); }

/* ---------- Inner page header ---------- */
.tb-page-hero {
    position: relative;
    padding: calc(var(--nav-h) + clamp(48px, 8vw, 110px)) 0 clamp(56px, 7vw, 96px);
    overflow: hidden;
    isolation: isolate;
}
.tb-page-hero > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    opacity: .55;
    -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 40%, transparent 100%);
}
.tb-page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to bottom, rgba(10, 10, 12, .55), var(--c-page-bg) 95%);
}
.tb-page-hero .tb-eyebrow { margin-bottom: 18px; }
.tb-page-title {
    font-size: clamp(2.25rem, 5vw, 4rem);
    font-weight: 900;
    letter-spacing: -.025em;
    line-height: 1.1;
    color: var(--c-heading);
    margin: 0;
}
.tb-page-hero .tb-lead { margin-top: 16px; max-width: 640px; }

/* ---------- Panels / forms ---------- */
.tb-panel {
    position: relative;
    border-radius: var(--r-xl);
    background: var(--c-panel);
    border: 1px solid var(--c-border);
    box-shadow: var(--shadow-card);
    padding: clamp(24px, 4vw, 48px);
}
.tb-form-wrap { max-width: 640px; margin: -24px auto 96px; width: 100%; padding-inline: var(--gutter); }
.tb-form-wrap .tb-panel { padding: clamp(24px, 4vw, 44px); }
.tb-form { display: grid; gap: 18px; }
.tb-field { display: flex; flex-direction: column; gap: 8px; }
.tb-field > span { color: var(--c-text-2); font-weight: 600; font-size: .875rem; }
.tb-input {
    width: 100%;
    min-height: 54px;
    padding: 0 18px;
    border-radius: var(--r-md) !important;
    border: 1px solid var(--c-border-strong) !important;
    background-color: var(--c-glass) !important;
    color: var(--c-text) !important;
    font-size: 1rem !important;
    box-shadow: none !important;
    transition: border-color .2s, background-color .2s, box-shadow .2s !important;
}
textarea.tb-input { min-height: 140px; padding: 14px 18px; line-height: 1.6; resize: vertical; }
select.tb-input { padding-inline-end: 44px; background-position: left 16px center !important; }
[dir="ltr"] select.tb-input { background-position: right 16px center !important; }
select.tb-input option { background: var(--c-surface); color: var(--c-text); }
[dir="rtl"] .tb-input[type="tel"],
[dir="rtl"] .tb-input[type="email"] { text-align: right; }
.tb-input::placeholder { color: var(--c-text-3); }
.tb-input:focus {
    outline: none !important;
    border-color: var(--c-primary) !important;
    background-color: rgba(244, 53, 69, .05) !important;
    box-shadow: 0 0 0 4px rgba(244, 53, 69, .15) !important;
}
.tb-segment { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tb-segment label { position: relative; cursor: pointer; }
.tb-segment input { position: absolute; opacity: 0; pointer-events: none; }
.tb-segment span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    border-radius: var(--r-md);
    border: 1px solid var(--c-border-strong);
    background: var(--c-glass);
    color: var(--c-text-2);
    font-weight: 700;
    transition: all .2s;
}
.tb-segment input:checked + span {
    border-color: var(--c-primary);
    background: rgba(244, 53, 69, .12);
    color: var(--c-heading);
    box-shadow: 0 0 0 4px rgba(244, 53, 69, .12);
}
.tb-segment input:focus-visible + span { outline: 2px solid var(--c-primary); outline-offset: 2px; }
.tb-error { color: var(--c-danger); font-size: .875rem; list-style: none; padding: 0; margin: 0; }
.tb-form .tb-btn { width: 100%; margin-top: 8px; }
.tb-form-intro { margin-bottom: 8px; color: var(--c-text); font-size: 1.25rem; font-weight: 700; line-height: 1.5; }
.tb-success { text-align: center; padding: 24px 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.tb-success-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(34, 197, 94, .12);
    border: 1px solid rgba(34, 197, 94, .4);
    color: var(--c-success);
    margin-bottom: 8px;
}
.tb-success-icon svg { width: 34px; height: 34px; }
.tb-success h3 { color: var(--c-heading); font-size: 1.75rem; font-weight: 800; margin: 0; }
.tb-success p { color: var(--c-text-2); margin: 0 0 12px; }

/* Posts listing */
.tb-search {
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(100%, 380px);
    height: 52px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid var(--c-border-strong);
    background: var(--c-surface);
    transition: border-color .2s, box-shadow .2s;
}
.tb-search:focus-within { border-color: var(--c-primary); box-shadow: 0 0 0 4px rgba(244, 53, 69, .15); }
.tb-search svg { width: 18px; height: 18px; color: var(--c-text-3); flex-shrink: 0; }
.tb-search input {
    flex: 1;
    min-width: 0;
    background: transparent !important;
    border: 0 !important;
    color: var(--c-text) !important;
    box-shadow: none !important;
    padding: 0 !important;
    font-size: 1rem;
}
.tb-search input:focus { outline: none !important; box-shadow: none !important; }
.tb-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }

/* Article */
.tb-article { max-width: 820px; margin: 0 auto 96px; padding-inline: var(--gutter); width: 100%; }
.tb-article-cover {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--r-xl);
    border: 1px solid var(--c-border);
    box-shadow: var(--shadow-card);
    margin-bottom: 40px;
}
.tb-article-date { color: var(--c-text-3); font-size: .9375rem; }
.tb-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--c-text-2) !important;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 20px;
}
.tb-back:hover { color: var(--c-heading) !important; }
.tb-back svg { width: 18px; height: 18px; }
[dir="rtl"] .tb-back svg { transform: scaleX(-1); }

/* ---------- Light theme: dark photo zones end in a rounded edge ---------- */
:root:not([data-theme="dark"]) .tb-hero,
:root:not([data-theme="dark"]) .tb-page-hero.tb-dark {
    --c-page-bg: #0a0a0c;               /* fade into the zone itself, not the light page */
    background: #0a0a0c;
    border-radius: 0 0 clamp(24px, 4vw, 48px) clamp(24px, 4vw, 48px);
}
:root:not([data-theme="dark"]) .tb-hero + .tb-container { margin-top: clamp(-40px, -3vw, -24px); position: relative; }
:root:not([data-theme="dark"]) .tb-page-hero:not(.tb-dark) { padding-bottom: clamp(32px, 4vw, 48px); }

/* ---------- Logos: red on light surfaces, white on dark ---------- */
.tb-logo-on-dark { display: none !important; }
[data-theme="dark"] .tb-logo-on-light,
.tb-dark .tb-logo-on-light { display: none !important; }
[data-theme="dark"] .tb-logo-on-dark,
.tb-dark .tb-logo-on-dark { display: block !important; }

/* ---------- Theme switcher ---------- */
.tb-theme {
    --knob-x: 0px;
    position: relative;
    flex-shrink: 0;
    width: 64px;
    height: 36px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid var(--c-border-strong);
    background: linear-gradient(135deg, #ffe7d6 0%, #fff4ec 55%, #ffd9c2 100%);
    cursor: pointer;
    overflow: hidden;
    transition: background .5s var(--ease), border-color .3s, box-shadow .3s;
}
.tb-theme:hover { box-shadow: 0 0 0 4px var(--c-glass-2); }
.tb-theme:focus { outline: none; }
[data-theme="dark"] .tb-theme {
    --knob-x: 28px;
    background: linear-gradient(135deg, #1d1b2e 0%, #121220 60%, #2a1630 100%);
}
[dir="rtl"][data-theme="dark"] .tb-theme { --knob-x: -28px; }
/* Stars (dark) and a cloud puff (light) living in the track */
.tb-theme-stars, .tb-theme-cloud {
    position: absolute;
    inset: 0;
    pointer-events: none;
    transition: opacity .5s var(--ease), transform .6s var(--ease);
}
.tb-theme-stars {
    opacity: 0;
    transform: translateY(6px);
    background:
        radial-gradient(1.2px 1.2px at 22% 32%, #fff 99%, transparent),
        radial-gradient(1px 1px at 38% 68%, #fff 99%, transparent),
        radial-gradient(1.4px 1.4px at 14% 62%, #fff 99%, transparent),
        radial-gradient(1px 1px at 30% 18%, #fff 99%, transparent);
}
[dir="rtl"] .tb-theme-stars { transform: translateY(6px) scaleX(-1); }
.tb-theme-cloud {
    opacity: 1;
    background:
        radial-gradient(7px 5px at 74% 64%, rgba(255, 255, 255, .95) 98%, transparent),
        radial-gradient(5px 4px at 82% 56%, rgba(255, 255, 255, .95) 98%, transparent);
}
[dir="rtl"] .tb-theme-cloud { transform: scaleX(-1); }
[data-theme="dark"] .tb-theme-stars { opacity: 1; transform: none; }
[dir="rtl"][data-theme="dark"] .tb-theme-stars { transform: scaleX(-1); }
[data-theme="dark"] .tb-theme-cloud { opacity: 0; transform: translateY(-6px); }
.tb-theme-knob {
    position: absolute;
    top: 3px;
    inset-inline-start: 3px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #fff;
    box-shadow: 0 2px 6px rgba(120, 50, 20, .25), 0 0 0 1px rgba(0, 0, 0, .04);
    transform: translateX(var(--knob-x));
    transition: transform .55s cubic-bezier(.34, 1.56, .64, 1), background .4s, box-shadow .4s;
}
[data-theme="dark"] .tb-theme-knob {
    background: #2b2a3d;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.tb-theme-knob svg {
    position: absolute;
    width: 16px;
    height: 16px;
    transition: transform .55s var(--ease), opacity .35s;
}
.tb-theme-sun { color: #f59e0b; }
.tb-theme-moon { color: #c7c9ff; opacity: 0; transform: rotate(-90deg) scale(.4); }
[data-theme="dark"] .tb-theme-sun { opacity: 0; transform: rotate(90deg) scale(.4); }
[data-theme="dark"] .tb-theme-moon { opacity: 1; transform: none; }
.tb-theme-sun .tb-theme-rays { transform-origin: 12px 12px; transition: transform .8s var(--ease); }
.tb-theme:hover .tb-theme-sun .tb-theme-rays { transform: rotate(45deg); }

/* Circular reveal when the browser supports View Transitions */
::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { z-index: 9999; }
/* Fallback: cross-fade colours for a moment while switching */
html.tb-theme-anim, html.tb-theme-anim * { transition: background-color .45s ease, color .45s ease, border-color .45s ease !important; }

/* ---------- Hero lead + homepage About teaser ---------- */
.tb-hero-lead { max-width: 560px; color: rgba(255, 255, 255, .78) !important; }
/* About: story + photo collage, pillars, impact band */
.tb-about-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: clamp(32px, 5vw, 72px);
    align-items: center;
    margin-bottom: clamp(40px, 5vw, 64px);
}
.tb-about-story { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.tb-about-story .tb-lead { font-size: clamp(1.0625rem, 1.5vw, 1.1875rem); }
.tb-about-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    margin: 4px 0 0;
    border-block: 1px solid var(--c-border);
}
.tb-about-facts > div { padding: 18px 16px 18px 0; }
[dir="rtl"] .tb-about-facts > div { padding: 18px 0 18px 16px; }
.tb-about-facts > div + div { border-inline-start: 1px solid var(--c-border); padding-inline-start: 16px; }
.tb-about-facts dt {
    font-size: clamp(1.5rem, 2.6vw, 2.125rem);
    font-weight: 900;
    color: var(--c-heading);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.tb-about-facts > div:first-child dt { color: var(--c-primary); }
.tb-about-facts dd { margin: 6px 0 0; color: var(--c-text-3); font-size: .8125rem; line-height: 1.4; }
.tb-about-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }

.tb-about-media {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 14px;
    height: clamp(420px, 44vw, 560px);
}
.tb-about-shot {
    position: relative;
    margin: 0;
    border-radius: var(--r-lg);
    overflow: hidden;
    background: var(--c-surface-2);
    box-shadow: var(--shadow-soft);
    isolation: isolate;
}
.tb-about-shot.is-tall { grid-row: span 2; }
.tb-about-shot.is-tall img { object-position: 70% center; }
.tb-about-shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s var(--ease);
}
.tb-about-shot:hover img { transform: scale(1.06); }
.tb-about-shot::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(8, 8, 10, .7), transparent 45%);
    z-index: 0;
}
.tb-about-shot figcaption {
    position: absolute;
    z-index: 1;
    bottom: 14px;
    inset-inline-start: 14px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(10, 10, 12, .55);
    border: 1px solid rgba(255, 255, 255, .18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    font-size: .8125rem;
    font-weight: 700;
}

.tb-about-pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tb-about-pillar {
    position: relative;
    padding: clamp(22px, 2.6vw, 30px);
    border-radius: var(--r-lg);
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    box-shadow: var(--shadow-soft);
    transition: transform .4s var(--ease), border-color .3s;
}
.tb-about-pillar:hover { transform: translateY(-4px); border-color: rgba(244, 53, 69, .35); }
.tb-about-num {
    position: absolute;
    top: 22px;
    inset-inline-end: 24px;
    font-size: .8125rem;
    font-weight: 800;
    color: var(--c-text-3);
    letter-spacing: .08em;
    font-variant-numeric: tabular-nums;
}
.tb-about-pillar h3 { font-size: 1.1875rem; font-weight: 800; color: var(--c-heading); margin: 0 0 8px; }
.tb-about-pillar p { margin: 0; color: var(--c-text-2); line-height: 1.7; font-size: .9375rem; }

.tb-about-impact {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(24px, 4vw, 56px);
    align-items: center;
    margin-top: 16px;
    padding: clamp(28px, 4vw, 48px);
    border-radius: var(--r-xl);
    background:
        radial-gradient(500px 240px at 0% 0%, rgba(244, 53, 69, .10), transparent 70%),
        var(--c-bg-2);
    border: 1px solid var(--c-border);
}
.tb-about-impact .tb-eyebrow { margin-bottom: 14px; }
.tb-about-impact-text { margin: 0; color: var(--c-text); font-size: 1.0625rem; line-height: 1.8; }
.tb-about-quote {
    position: relative;
    margin: 0;
    padding-inline-start: 24px;
    border-inline-start: 3px solid var(--c-primary);
    color: var(--c-heading);
    font-size: clamp(1.125rem, 1.8vw, 1.375rem);
    font-weight: 700;
    line-height: 1.6;
}

.tb-about-full {
    margin-top: 16px;
    border-radius: var(--r-lg);
    border: 1px solid var(--c-border);
    background: var(--c-surface);
    box-shadow: var(--shadow-soft);
}
.tb-about-full summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 20px clamp(20px, 3vw, 32px);
    cursor: pointer;
    list-style: none;
    font-weight: 800;
    color: var(--c-heading);
}
.tb-about-full summary::-webkit-details-marker { display: none; }
.tb-about-full summary svg { width: 20px; height: 20px; color: var(--c-primary); transition: transform .3s var(--ease); }
.tb-about-full[open] summary svg { transform: rotate(180deg); }
.tb-about-full .tb-prose { padding: 0 clamp(20px, 3vw, 32px) 24px; }
.tb-about-full .tb-prose p:empty { display: none; }

@media (max-width: 1024px) {
    .tb-about-top, .tb-about-impact { grid-template-columns: 1fr; }
    .tb-about-pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .tb-about-media { height: auto; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; }
    .tb-about-shot.is-tall { grid-column: span 2; grid-row: auto; aspect-ratio: 4 / 3; }
    .tb-about-shot:not(.is-tall) { aspect-ratio: 1; }
    .tb-about-pillars { grid-template-columns: 1fr; }
    .tb-about-facts dd { font-size: .75rem; }
}

/* ---------- Server-rendered content (before the Vue app mounts / no JS) ---------- */
.tb-ssr { width: 100%; max-width: 860px; margin: 0 auto; padding: 24px var(--gutter) 64px; color: var(--c-text); line-height: 1.75; }
.tb-ssr a { color: var(--c-primary); }
.tb-ssr-header { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-bottom: 40px; }
.tb-ssr-header ul, .tb-ssr footer ul { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; margin: 0; padding: 0; }
.tb-ssr h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 900; line-height: 1.15; color: var(--c-heading); margin: 8px 0 16px; }
.tb-ssr h2 { font-size: 1.5rem; font-weight: 800; color: var(--c-heading); margin: 40px 0 12px; }
.tb-ssr h3 { font-size: 1.125rem; font-weight: 700; margin: 16px 0 4px; }
.tb-ssr p { margin: 0 0 12px; color: var(--c-text-2); }
.tb-ssr-eyebrow { color: var(--c-primary) !important; font-weight: 700; }
.tb-ssr section ul { list-style: none; margin: 0; padding: 0; }
.tb-ssr footer { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--c-border); }

/* ---------- Floating "Open app" FAB ---------- */
.open-app-fab {
    position: fixed;
    bottom: 24px;
    inset-inline-end: 24px;
    z-index: 48;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    border-radius: 999px;
    background: var(--c-primary);
    color: #fff !important;
    font-weight: 700;
    font-size: .9375rem;
    text-decoration: none !important;
    box-shadow: var(--shadow-cta), 0 0 0 1px rgba(255, 255, 255, .12) inset;
    transition: transform .25s var(--ease), box-shadow .25s, opacity .3s, visibility .3s;
}
.open-app-fab:hover { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(244, 53, 69, .55); }
.open-app-fab svg { width: 18px; height: 18px; }
/* Hidden while the hero (which has its own CTA) is on screen */
.open-app-fab.is-hidden { opacity: 0; visibility: hidden; transform: translateY(12px); }

/* ---------- Reveal on scroll ---------- */
.tb-reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.tb-reveal.is-in { opacity: 1; transform: none; }
.tb-reveal-d1 { transition-delay: .08s; }
.tb-reveal-d2 { transition-delay: .16s; }
.tb-reveal-d3 { transition-delay: .24s; }

/* Hero entrance (plays once the splash retracts) */
.tb-enter > * { opacity: 0; transform: translateY(24px); }
.tb-enter.is-in > * { opacity: 1; transform: none; transition: opacity 1s var(--ease), transform 1s var(--ease); }
.tb-enter.is-in > *:nth-child(2) { transition-delay: .1s; }
.tb-enter.is-in > *:nth-child(3) { transition-delay: .2s; }
.tb-enter.is-in > *:nth-child(4) { transition-delay: .3s; }

/* Route transition */
.fade-enter-active, .fade-leave-active { transition: opacity .35s ease; }
.fade-enter, .fade-leave-to { opacity: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .tb-hero-grid { grid-template-columns: 1fr; }
    .tb-hero-phone { width: min(70%, 300px); }
    .tb-features, .tb-join, .tb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tb-join-card { min-height: 460px; }
    .tb-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tb-stat:nth-child(3) { border-inline-start: 0; }
    .tb-stat:nth-child(n+3) { border-top: 1px solid var(--c-border); }
    .tb-cta-band { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    :root { --nav-h: 64px; }
    .tb-nav-logo img { height: 32px; }
    .tb-hero { padding-bottom: 56px; }
    .tb-hero::before,
    [dir="ltr"] .tb-hero::before {
        background: linear-gradient(to top, var(--c-page-bg) 5%, rgba(10, 10, 12, .75) 55%, rgba(10, 10, 12, .45) 100%);
    }
    .tb-hero-copy { align-items: stretch; text-align: center; }
    .tb-hero-copy .tb-eyebrow { align-self: center; }
    .tb-hero-ctas .tb-btn { flex: 1; }
    .tb-hero-phone { display: none; }
    .tb-scroll-cue { display: none; }
    .tb-stores { justify-content: center; }
    .tb-store { flex: 1 1 calc(50% - 10px); justify-content: center; }
    .tb-store:last-child:nth-child(odd) { flex-basis: 100%; }
    .tb-features, .tb-join, .tb-grid { grid-template-columns: 1fr; }
    .tb-join-card { min-height: 420px; }
    .tb-section-head { align-items: flex-start; }
    .open-app-fab { bottom: 16px; inset-inline-end: 16px; padding: 12px 18px; font-size: .875rem; }
    .tb-footer-top, .tb-footer-bottom { flex-direction: column; text-align: center; }
    .tb-footer-links { justify-content: center; }
}

/* Mobile perf: no backdrop blur on small screens */
@media (max-width: 768px) {
    .tb-store, .tb-eyebrow, .tb-btn-ghost { backdrop-filter: none; -webkit-backdrop-filter: none; }
    .tb-page::after { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .tb-reveal, .tb-enter > * { opacity: 1 !important; transform: none !important; }
}

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 2px solid var(--c-primary);
    outline-offset: 3px;
}
