/* Traffic City app page. Loaded after styles.css; every rule is scoped under .tc so nothing else changes.
   Same layout as the Hue Haven page, in the game's road greens and signal amber. */

.tc {
  --g: #237a4b;
  --g-dark: #17583a;
  --g-soft: #e2f0e2;
  --cream: #f2f7ec;
  --peach: #fdf0dc;
  --sun: #f2b23e;
  --card: var(--surface);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tc { --g: #6fd39b; --g-dark: #a6e9c3; --g-soft: #16261c; --cream: #15211a; --peach: #2a2416; --sun: #e0a43a; }
}
:root[data-theme="dark"] .tc { --g: #6fd39b; --g-dark: #a6e9c3; --g-soft: #16261c; --cream: #15211a; --peach: #2a2416; --sun: #e0a43a; }

.tc img { max-width: 100%; height: auto; display: block; }
.tc h1, .tc h2 { letter-spacing: -0.01em; }
.tc .kicker { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem; font-weight: 800; color: var(--g-dark); margin: 0 0 12px; }
.tc .section-head { max-width: 680px; margin: 0 auto 36px; text-align: center; }
.tc .section-head h2 { margin: 0 0 0.35em; }
.tc .section-head p { color: var(--muted); font-size: 1.1rem; margin: 0; }
.tc section { padding: 72px 0; }
.tc .btn { background: var(--g); }
.tc .btn:hover { background: var(--g-dark); }
.tc .btn.secondary { background: transparent; }

/* Hero */
.tc .hero2 {
  position: relative; overflow: hidden; padding: 56px 0 80px;
  background: radial-gradient(1000px 500px at 85% 0%, color-mix(in srgb, var(--g) 22%, transparent), transparent 60%),
              linear-gradient(180deg, var(--g-soft), var(--bg));
}
.tc .hero2 .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.tc .hero2 h1 { font-size: clamp(2.2rem, 5.4vw, 3.6rem); line-height: 1.08; }
.tc .hero2 h1 em { font-style: normal; color: var(--g-dark); background: linear-gradient(transparent 62%, color-mix(in srgb, var(--sun) 55%, transparent) 62%); }
.tc .hero2 .lead { max-width: 560px; }
.tc .soon { display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; padding: 10px 16px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-weight: 700; font-size: 0.95rem; }
.tc .soon .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sun) 30%, transparent); }
.tc .chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 0; padding: 0; list-style: none; }
.tc .chips li { background: var(--card); border: 1px solid var(--line); padding: 6px 14px; border-radius: 999px; font-size: 0.9rem; font-weight: 600; color: var(--muted); }

.tc .stage { position: relative; min-height: 560px; }
.tc .stage::before { content: ""; position: absolute; inset: 6% 4% 2% 10%; border-radius: 42% 58% 55% 45% / 48% 42% 58% 52%; background: color-mix(in srgb, var(--g) 18%, var(--cream)); }
.tc .phone { position: absolute; width: 46%; border-radius: 26px; overflow: hidden; background: #111; padding: 6px; box-shadow: 0 30px 60px -20px rgba(63, 35, 153, 0.45), 0 8px 18px rgba(0, 0, 0, 0.12); }
.tc .phone img { border-radius: 20px; }
.tc .phone.p1 { left: 6%; top: 4%; transform: rotate(-5deg); }
.tc .phone.p2 { right: 2%; top: 14%; transform: rotate(4deg); width: 48%; }
.tc .icon-float { position: absolute; left: 0; bottom: 2%; width: 24%; z-index: 2; border-radius: 22%; box-shadow: 0 18px 30px -10px rgba(63, 35, 153, 0.55); }
.tc .bubble { position: absolute; left: 22%; bottom: 16%; z-index: 3; background: var(--card); border: 1px solid var(--line); border-radius: 18px 18px 18px 4px; padding: 10px 14px; font-weight: 700; font-size: 0.95rem; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1); }
@media (max-width: 900px) {
  .tc .hero2 .wrap { grid-template-columns: 1fr; }
  .tc .stage { min-height: 520px; max-width: 520px; margin: 0 auto; width: 100%; }
}

/* Trust strip */
.tc .strip { padding: 0; margin-top: -28px; position: relative; z-index: 2; }
.tc .strip .row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 20px 40px -24px rgba(0, 0, 0, 0.25); overflow: hidden; }
.tc .strip .stat { padding: 22px 18px; text-align: center; border-right: 1px solid var(--line); }
.tc .strip .stat:last-child { border-right: 0; }
.tc .strip .num { display: block; font-family: var(--serif); font-size: 2rem; font-weight: 700; color: var(--g-dark); line-height: 1.1; }
.tc .strip .lbl { color: var(--muted); font-size: 0.92rem; }
@media (max-width: 720px) { .tc .strip .row { grid-template-columns: repeat(2, 1fr); } .tc .strip .stat:nth-child(2) { border-right: 0; } .tc .strip .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }

/* Feature rows */
.tc .feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.tc .feature + .feature { margin-top: 88px; }
.tc .feature.flip .media { order: 2; }
.tc .feature h2 { margin: 0 0 0.4em; }
.tc .feature p { color: var(--muted); font-size: 1.08rem; }
.tc .ticks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.tc .ticks li { position: relative; padding-left: 30px; }
.tc .ticks li::before { content: ""; position: absolute; left: 0; top: 0.35em; width: 18px; height: 18px; border-radius: 50%; background: var(--g); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M8 14.4 3.6 10l1.4-1.4 3 3 7-7L16.4 6z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M8 14.4 3.6 10l1.4-1.4 3 3 7-7L16.4 6z'/%3E%3C/svg%3E") center/contain no-repeat; }
.tc .media { position: relative; display: flex; justify-content: center; }
.tc .media .blob { position: absolute; inset: 8% 10%; border-radius: 45% 55% 50% 50% / 55% 45% 55% 45%; background: var(--g-soft); }
.tc .media .shot { position: relative; width: min(300px, 70%); border-radius: 30px; padding: 7px; background: #111; box-shadow: 0 30px 60px -24px rgba(63, 35, 153, 0.5); }
.tc .media .shot img { border-radius: 24px; }
.tc .media.duo .shot { width: min(240px, 46%); }
.tc .media.duo .shot + .shot { margin-left: -6%; margin-top: 10%; }
@media (max-width: 860px) { .tc .feature { grid-template-columns: 1fr; gap: 28px; } .tc .feature.flip .media { order: 0; } .tc .feature + .feature { margin-top: 64px; } }

/* Tinted sections */
.tc .tint { background: var(--surface-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tc .cols10 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.tc .col { background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; transition: transform 0.25s ease, box-shadow 0.25s ease; }
.tc .col:hover { transform: translateY(-4px); box-shadow: 0 18px 30px -18px rgba(0, 0, 0, 0.3); }
.tc .col img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.tc .col div { padding: 12px 14px 16px; }
.tc .col b { display: block; font-family: var(--serif); font-size: 1.02rem; }
.tc .col span { color: var(--muted); font-size: 0.85rem; line-height: 1.4; display: block; margin-top: 4px; }
@media (max-width: 960px) { .tc .cols10 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .tc .cols10 { grid-template-columns: repeat(2, 1fr); gap: 12px; } }

/* Ways to play */
.tc .modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tc .mode { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.tc .mode h3 { margin: 0 0 6px; font-size: 1.1rem; }
.tc .mode p { margin: 0; color: var(--muted); font-size: 0.98rem; }
.tc .mode .tag { display: inline-block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--g-dark); margin-bottom: 8px; }
@media (max-width: 860px) { .tc .modes { grid-template-columns: 1fr; } }

/* Screenshot gallery */
.tc .gallery { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 24px 28px; margin: 0 -24px; scrollbar-width: thin; }
.tc .gallery figure { flex: 0 0 auto; width: 240px; margin: 0; scroll-snap-align: center; }
.tc .gallery .frame { border-radius: 28px; padding: 6px; background: #111; box-shadow: 0 24px 44px -24px rgba(0, 0, 0, 0.5); }
.tc .gallery img { border-radius: 22px; }
.tc .gallery figcaption { text-align: center; margin-top: 12px; font-weight: 700; font-size: 0.95rem; }
.tc .gallery figcaption small { display: block; font-weight: 400; }
.tc .tablet { margin: 28px auto 0; max-width: 880px; padding: 10px; background: #111; border-radius: 22px; box-shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.5); }
.tc .tablet img { border-radius: 14px; }
.tc .tablet-cap { text-align: center; color: var(--muted); margin-top: 14px; }

/* Steps */
.tc .steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: s; }
.tc .step { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 26px 24px; position: relative; }
.tc .step::before { counter-increment: s; content: counter(s); position: absolute; top: -16px; left: 22px; width: 34px; height: 34px; border-radius: 50%; background: var(--g); color: #fff; font-weight: 800; display: grid; place-items: center; }
.tc .step h3 { margin: 6px 0 6px; }
.tc .step p { margin: 0; color: var(--muted); }
@media (max-width: 800px) { .tc .steps { grid-template-columns: 1fr; gap: 28px; } }

/* Compare / principles */
.tc .principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tc .pr { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.tc .pr h3 { margin: 0 0 6px; font-size: 1.1rem; }
.tc .pr p { margin: 0; color: var(--muted); font-size: 0.98rem; }
@media (max-width: 860px) { .tc .principles { grid-template-columns: 1fr; } }

/* Plus */
.tc .plus { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.tc .plan { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 28px; }
.tc .plan.featured { border: 2px solid var(--g); background: linear-gradient(180deg, var(--g-soft), var(--card) 60%); }
.tc .plan h3 { margin: 0 0 4px; }
.tc .plan .tagline { color: var(--muted); margin: 0 0 14px; }
.tc .plan .tag { display: inline-block; background: var(--g); color: #fff; font-size: 0.74rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; margin-bottom: 10px; letter-spacing: 0.04em; }
@media (max-width: 800px) { .tc .plus { grid-template-columns: 1fr; } }

/* FAQ */
.tc .faq { max-width: 780px; margin: 0 auto; display: grid; gap: 12px; }
.tc .faq details { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 0 20px; }
.tc .faq summary { cursor: pointer; font-weight: 700; padding: 18px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.tc .faq summary::-webkit-details-marker { display: none; }
.tc .faq summary::after { content: "+"; font-size: 1.4rem; color: var(--g); line-height: 1; transition: transform 0.2s; }
.tc .faq details[open] summary::after { transform: rotate(45deg); }
.tc .faq details p { margin: 0 0 18px; color: var(--muted); }

/* Final call to action */
.tc .cta { position: relative; overflow: hidden; border-radius: 30px; color: #fff; padding: 56px 32px; text-align: center; background: linear-gradient(135deg, #2f9a5e, #123f29); }
.tc .cta > * { position: relative; }
.tc .cta h2 { color: #fff; margin: 0 0 0.3em; }
.tc .cta p { color: #e2f0e2; max-width: 560px; margin: 0 auto 22px; font-size: 1.1rem; }
.tc .cta .btn { background: #fff; color: var(--g-dark); }
.tc .cta .btn:hover { background: var(--cream); }
.tc .cta .btn.secondary { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.5); }
.tc .facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 30px; }
.tc .fact { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.tc .fact h3 { margin: 0 0 4px; font-size: 1rem; }
.tc .fact p { margin: 0; color: var(--muted); font-size: 0.95rem; }
@media (max-width: 800px) { .tc .facts { grid-template-columns: 1fr; } }

/* Gentle entrance, only when motion is welcome */
@media (prefers-reduced-motion: no-preference) {
  .tc .rise { animation: hh-rise 0.7s ease both; }
  .tc .rise.d2 { animation-delay: 0.12s; }
  .tc .rise.d3 { animation-delay: 0.24s; }
  .tc .phone.p1 { animation: hh-bob 7s ease-in-out infinite; }
  .tc .phone.p2 { animation: hh-bob 8s ease-in-out 1s infinite; }
  @keyframes hh-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  @keyframes hh-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
}

/* Dark mode: a deeper backdrop behind the hero phones. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tc .stage::before { background: #1d3a2a; }
}
:root[data-theme="dark"] .tc .stage::before { background: #1d3a2a; }

/* Trailer: poster in the page, the player opens in a lightbox */
.tc .video { position: relative; left: 50%; width: min(1400px, calc(100vw - 32px)); transform: translateX(-50%); aspect-ratio: 16 / 9; border-radius: 24px; overflow: hidden; background: #0f2419; box-shadow: 0 30px 60px -28px rgba(63, 35, 153, 0.55); }
.tc .video-play { all: unset; display: block; position: relative; width: 100%; height: 100%; cursor: pointer; }
.tc .video-play img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease, filter 0.3s ease; }
.tc .video-play:hover img, .tc .video-play:focus-visible img { transform: scale(1.03); filter: brightness(1.08); }
.tc .video-btn { position: absolute; inset: 0; display: grid; place-items: center; transition: transform 0.2s ease; }
.tc .video-btn svg { width: clamp(64px, 10vw, 96px); height: auto; filter: drop-shadow(0 8px 18px rgba(20, 8, 60, 0.5)); }
.tc .video-play:hover .video-btn, .tc .video-play:focus-visible .video-btn { transform: scale(1.1); }
.tc .video-play:focus-visible { outline: 3px solid var(--g); outline-offset: -3px; }
.tc .video-len { position: absolute; right: 14px; bottom: 12px; z-index: 1; padding: 3px 9px; border-radius: 8px; background: rgba(15, 8, 40, 0.78); color: #fff; font-weight: 700; font-size: 0.9rem; }
.tc .video-note { text-align: center; color: var(--muted); font-size: 0.95rem; margin: 14px auto 0; max-width: 720px; }

.tc .video-modal { border: 0; padding: 0; margin: auto; background: transparent; max-width: none; max-height: none; overflow: visible;
  width: min(96vw, calc((100vh - 120px) * 16 / 9), 2400px); width: min(96vw, calc((100dvh - 120px) * 16 / 9), 2400px); }
.tc .video-modal::backdrop { background: rgba(10, 5, 28, 0.88); backdrop-filter: blur(6px); }
.tc .video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: #000; box-shadow: 0 40px 90px -20px rgba(0, 0, 0, 0.7); }
.tc .video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tc .video-close { all: unset; position: absolute; top: -52px; right: 0; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; }
.tc .video-close:hover, .tc .video-close:focus-visible { background: rgba(255, 255, 255, 0.28); }
.tc .video-close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
@media (max-width: 640px) { .tc .video-modal { width: 100vw; } .tc .video-frame { border-radius: 0; } .tc .video-close { top: -54px; right: 10px; } }

/* Shorts: vertical posters, shown as each one publishes */
.tc .shorts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; }
.tc .short { width: calc((100% - 5 * 22px) / 6); }
@media (max-width: 900px) { .tc .short { width: calc((100% - 2 * 22px) / 3); } }
@media (max-width: 560px) { .tc .shorts { gap: 16px; } .tc .short { width: calc((100% - 16px) / 2); } }
.tc .short[hidden] { display: none; }
.tc .short-play { all: unset; display: block; position: relative; width: 100%; aspect-ratio: 9 / 16; border-radius: 20px; overflow: hidden; background: #0f2419; cursor: pointer; box-shadow: 0 22px 44px -24px rgba(63, 35, 153, 0.6); transition: transform 0.25s ease, box-shadow 0.25s ease; }
.tc .short-play img { width: 100%; height: 100%; object-fit: cover; }
.tc .short-play:hover, .tc .short-play:focus-visible { transform: translateY(-4px); box-shadow: 0 28px 52px -22px rgba(63, 35, 153, 0.7); }
.tc .short-play:focus-visible { outline: 3px solid var(--g); outline-offset: 2px; }
.tc .short-btn { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); transition: transform 0.2s ease; }
.tc .short-play:hover .short-btn, .tc .short-play:focus-visible .short-btn { transform: translate(-50%, -50%) scale(1.1); }
.tc .short-btn svg { filter: drop-shadow(0 6px 12px rgba(20, 8, 60, 0.5)); }
.tc .short-title { margin: 10px 4px 0; font-size: 0.92rem; line-height: 1.35; color: var(--muted); text-align: center; }
.tc .video-modal.vertical { width: min(96vw, calc((100vh - 120px) * 9 / 16), 700px); width: min(96vw, calc((100dvh - 120px) * 9 / 16), 700px); }
.tc .video-modal.vertical .video-frame { aspect-ratio: 9 / 16; }
@media (max-width: 640px) { .tc .video-modal.vertical { width: min(100vw, calc((100dvh - 120px) * 9 / 16)); margin: auto; } .tc .video-modal.vertical .video-frame { border-radius: 14px; } }
