/* TappedIn site styles: Phantom-style layout in TappedIn's brand.
 * Colors, corners and spacing come from tokens.css. The big light-weight
 * headline styles (.w-*) are web-only additions; see README. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--green-050);
  color: var(--green-500);
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  font-size: 16px; line-height: 24px; font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4, p, ol, ul { margin: 0; }
button { font: inherit; color: inherit; }

/* ---------- App type scale (design system) ---------- */
.t-title2   { font-family: "DM Sans Display", sans-serif; font-size: 24px; line-height: 28px; font-weight: 700; letter-spacing: -0.4px; }
.t-title3   { font-size: 20px; line-height: 24px; font-weight: 700; letter-spacing: -0.2px; }
.t-headline { font-size: 17px; line-height: 24px; font-weight: 600; }
.t-body     { font-size: 16px; line-height: 24px; font-weight: 400; }
.t-small    { font-size: 14px; line-height: 20px; font-weight: 400; }
.t-label    { font-size: 15px; line-height: 20px; font-weight: 600; letter-spacing: 0.1px; }
.t-label-sm { font-size: 13px; line-height: 16px; font-weight: 600; letter-spacing: 0.2px; }
.t-caption  { font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.1px; }

/* ---------- Web type: the app's display cuts (title1/title2), sized up ---------- */
.w-hero  { font-family: "DM Sans Display", sans-serif; font-weight: 800; font-size: 44px; line-height: 48px; letter-spacing: -0.9px; }
.w-card  { font-family: "DM Sans Display", sans-serif; font-weight: 700; font-size: 24px; line-height: 32px; letter-spacing: -0.3px; }
.w-eyebrow { font-size: 17px; line-height: 24px; font-weight: 500; }
@media (min-width: 768px) {
  .w-hero { font-size: 72px; line-height: 76px; letter-spacing: -1.4px; }
  .w-card { font-size: 30px; line-height: 36px; letter-spacing: -0.5px; }
  .w-eyebrow { font-size: 20px; line-height: 28px; }
}

/* ---------- Layout ---------- */
.wrap { max-width: calc(var(--content-max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--space-16); top: var(--space-16); z-index: 20; background: var(--green-100); color: var(--neutral-600); padding: var(--space-8) var(--space-16); border-radius: var(--radius-round); }

/* The logo on its own Turf tile: how the logo appears off a Turf ground. */
.logo-tile { display: inline-block; flex: none; background: var(--green-250); border-radius: var(--radius-16); overflow: hidden; }
.logo-tile img { width: 100%; height: 100%; object-fit: cover; }
.logo-tile.inline { width: 1em; height: 1em; vertical-align: -0.12em; margin: 0 0.04em; border-radius: 0.24em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-8);
  min-height: var(--space-48); padding: 0 var(--space-24);
  border-radius: var(--radius-round); border: 0;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  font-size: 15px; line-height: 20px; font-weight: 600;
}
.btn svg { width: 20px; height: 20px; }
.btn:focus-visible, .icon-btn:focus-visible, .pill-link:focus-visible { outline: 3px solid var(--green-300); outline-offset: 3px; }
.btn-lg { min-height: 56px; padding: 0 var(--space-32); font-size: 17px; }
.btn-accent  { background: var(--green-100); color: var(--neutral-600); }
.btn-primary { background: var(--green-300); color: var(--neutral-000); }
.btn-white   { background: var(--neutral-000); color: var(--green-500); }
.btn[aria-disabled="true"] { cursor: default; }
.btn .btn-note { font-weight: 500; opacity: 0.7; }

.icon-btn {
  width: var(--space-48); height: var(--space-48); flex: none;
  display: grid; place-items: center; border: 0; cursor: pointer;
  border-radius: var(--radius-round); background: var(--neutral-000); color: var(--green-500);
}
.icon-btn svg { width: 20px; height: 20px; }

.pill-link {
  display: inline-flex; align-items: center; gap: var(--space-8);
  height: 40px; padding: 0 var(--space-16);
  border-radius: var(--radius-round); background: var(--neutral-000); color: var(--green-500);
  text-decoration: none; font-size: 15px; font-weight: 500;
}
.pill-link svg { width: 16px; height: 16px; }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 10; background: var(--green-050); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
@media (min-width: 768px) { .nav-inner { height: 88px; } }
.brand { display: flex; align-items: center; gap: var(--space-12); text-decoration: none; }
.brand .logo-tile { width: 44px; height: 44px; }
.brand .word { height: 26px; width: auto; }
@media (min-width: 768px) {
  .brand .logo-tile { width: 48px; height: 48px; }
  .brand .word { height: 30px; }
}
/* Phones: the hero's own button is right there, so the nav keeps just the menu. */
@media (max-width: 479px) { .nav-actions .btn { display: none; } }
.nav-actions { display: flex; align-items: center; gap: var(--space-8); position: relative; }
.menu {
  position: absolute; right: 0; top: calc(100% + var(--space-8));
  min-width: 240px; padding: var(--space-8);
  background: var(--neutral-000); border-radius: var(--radius-32);
  box-shadow: var(--shadow-float);
  display: none;
}
.menu.open { display: grid; }
.menu a { padding: var(--space-12) var(--space-16); border-radius: var(--radius-round); text-decoration: none; font-weight: 500; }
.menu a:hover { background: var(--green-050); }

/* ---------- Hero ----------
 * Phantom-style: one big rounded card inset on the Dew page. The card is a
 * mown fairway like the app's Play tab header (Fairway ground, Turf mower
 * stripes turned 30°), lit from the top left and shading to Pine at the
 * bottom right. Copy on the left, the app on two phones on the right. */
.hero { padding: 0 var(--space-8) 0; }
@media (min-width: 768px) { .hero { padding: 0 var(--space-16); } }

.hero-card {
  --band: 56px;
  position: relative; isolation: isolate; overflow: hidden;
  max-width: 1600px; margin: 0 auto;
  border-radius: var(--radius-32);
  background-color: var(--green-300);
  color: var(--neutral-000);
  display: grid; gap: var(--space-48);
  padding: var(--space-48) var(--space-24) 0;
}
/* Light: sun from the top left, shade into Pine at the far corner. */
.hero-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(126, 200, 87, 0.45), transparent 60%),
    radial-gradient(90% 80% at 100% 100%, rgba(16, 76, 50, 0.85), transparent 70%);
}
/* Mower stripes: Turf bands on a 30° diagonal, strongest low, gone at the top. */
.hero-card::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: repeating-linear-gradient(120deg,
    rgba(71, 163, 78, 0.35) 0 var(--band),
    transparent var(--band) calc(var(--band) * 2));
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.15), #000 75%);
          mask-image: linear-gradient(to bottom, rgba(0,0,0,0.15), #000 75%);
}

.hero-copy {
  position: relative; z-index: 3; /* the words always sit above the phones */
  display: grid; justify-items: center; text-align: center; gap: var(--space-24);
  container-type: inline-size; /* the headline sizes to its own column (cqi) */
}
.hero-title {
  font-family: "DM Sans Display", sans-serif; font-weight: 800;
  font-size: clamp(56px, 18vw, 112px); /* fallback, no container units */
  font-size: clamp(56px, 24cqi, 112px); /* "together." is ~3.9em wide: 24cqi keeps it inside the column */
  line-height: 0.92; letter-spacing: -0.045em;
}
.hero-sub { max-width: 440px; font-size: 17px; line-height: 26px; color: rgba(250, 250, 250, 0.82); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-12); margin-top: var(--space-8); }
.hero-actions .btn-lg { min-height: 60px; padding: 0 var(--space-32); }
@media (max-width: 479px) {
  .hero-actions { flex-direction: column; align-items: stretch; width: 100%; max-width: 300px; }
}
.btn-ghost { background: rgba(250, 250, 250, 0.12); color: var(--neutral-000); box-shadow: inset 0 0 0 1px rgba(250, 250, 250, 0.28); }
.btn-ghost:hover { background: rgba(250, 250, 250, 0.2); }
.btn-accent:hover { background: #d8fc8e; }
.btn { transition: background-color 160ms ease, transform 160ms ease; }
.btn:active { transform: scale(0.98); }

/* Phones: the front one plays the round screen, the back one shows the 3D
 * green. On phones they rise out of the bottom of the card, cut off by it. */
.hero-phones { position: relative; height: 440px; margin: 0 calc(-1 * var(--space-24)); }
.phone {
  position: absolute; width: 230px; aspect-ratio: 600 / 1218;
  padding: 8px; background: var(--neutral-600); border-radius: var(--radius-32);
  box-shadow: var(--shadow-float), 0 0 0 1px rgba(250, 250, 250, 0.08);
}
.phone > img, .phone > video { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 24px; }
.phone-front { left: 50%; top: 0; transform: translateX(-38%) rotate(4deg); z-index: 2; }
.phone-back  { left: 50%; top: 56px; transform: translateX(-112%) rotate(-7deg); z-index: 1; }
.phone-front video, .phone-front .phone-video-first { position: absolute; inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); object-fit: cover; border-radius: 24px; }
.phone-front video { cursor: pointer; }
.phone-front .phone-video-first { opacity: 0; pointer-events: none; transition: opacity 250ms ease; }
.phone-front.is-resetting .phone-video-first { opacity: 1; transition-duration: 900ms; }

@media (min-width: 640px) {
  .hero-phones { height: 520px; }
  .phone { width: 270px; }
}

/* Desktop: copy left, phones right, card fills the first screen. */
@media (min-width: 1024px) {
  .hero-card {
    --band: 96px;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: center; gap: var(--space-48);
    min-height: min(calc(100svh - 88px - var(--space-16)), 880px);
    /* Copy lines up with the nav's logo. */
    padding: var(--space-64) var(--space-64) var(--space-64) max(var(--space-64), calc((100% - var(--content-max)) / 2));
  }
  .hero-copy { justify-items: start; text-align: left; gap: var(--space-32); }
  .hero-title { font-size: clamp(72px, 7.5vw, 156px); font-size: clamp(72px, 24cqi, 156px); }
  .hero-sub { font-size: 20px; line-height: 30px; max-width: 480px; }
  .hero-actions { justify-content: flex-start; }
  /* The pair sizes to its own column (cqi), so it can never reach over the
   * words: two phones side by side, tilted, take about 2 phone widths. */
  .hero-phones { height: 100%; min-height: 620px; margin: 0; container-type: inline-size; }
  .phone { width: min(310px, 46cqi); }
  .phone-front { top: 50%; transform: translate(-8%, -46%) rotate(4deg); }
  .phone-back  { top: 50%; transform: translate(-92%, -54%) rotate(-7deg); }
}
}

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise 700ms cubic-bezier(.2,.7,.2,1) both; }
  .hero-copy > :nth-child(2) { animation-delay: 60ms; }
  .hero-copy > :nth-child(3) { animation-delay: 120ms; }
  .hero-phones { animation: rise 900ms 150ms cubic-bezier(.2,.7,.2,1) both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* ---------- Section intros ---------- */
.block { padding: var(--space-64) 0 0; }
.intro { display: grid; justify-items: center; text-align: center; gap: var(--space-24); padding: var(--space-64) var(--gutter); }
.intro h2 { max-width: 900px; }
@media (min-width: 768px) { .block { padding-top: var(--space-96); } }

/* ---------- Carousels ---------- */
.rail-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-16); margin-bottom: var(--space-16); }
.label-pill {
  display: inline-flex; align-items: center; gap: var(--space-8);
  height: 40px; padding: 0 var(--space-16); border-radius: var(--radius-round);
  background: var(--neutral-000); color: var(--green-500); font-weight: 500;
}
.label-pill svg { width: 16px; height: 16px; color: var(--green-300); }
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(84vw, 400px);
  gap: var(--space-16); overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 0 var(--gutter) var(--space-8);
  scroll-padding: 0 var(--gutter);
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
@media (min-width: 1168px) {
  .rail { padding-left: calc((100vw - var(--content-max)) / 2); scroll-padding-left: calc((100vw - var(--content-max)) / 2); }
}

.fcard {
  scroll-snap-align: start;
  height: 520px; border-radius: var(--radius-32); padding: var(--space-32);
  display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-24);
  overflow: hidden;
}
.fcard h3 { max-width: 320px; }
.c-fairway   { background: var(--green-300); color: var(--neutral-000); }
.c-pine      { background: var(--green-400); color: var(--neutral-000); }
.c-clubhouse { background: var(--green-500); color: var(--neutral-000); }
.c-lime      { background: var(--green-100); color: var(--neutral-600); }
.c-white     { background: var(--neutral-000); color: var(--green-500); }

/* ---------- App components in cards ----------
 * The slots are filled by showcase.js with the app's own components
 * (website/showcase). Until it loads, a card shows just its headline. */
.app-card { height: auto; min-height: 560px; justify-content: flex-start; }
.app-slot { margin-top: auto; }
.app-slot:not(.is-live) { min-height: 200px; }
/* The chat card's message box: a browser gives a textarea two rows; the app's is one line until you type more. */
[data-app="group-chat"] textarea { height: 24px; }

/* ---------- Compete (dark full-bleed) ---------- */
.dark { background: var(--green-500); color: var(--neutral-000); margin-top: var(--space-96); padding: var(--space-32) 0 var(--space-96); }
.dark .intro { padding-top: var(--space-64); }
.duo { display: grid; gap: var(--space-16); }
@media (min-width: 900px) { .duo { grid-template-columns: 1fr 1fr; } }
.duo .fcard { height: auto; min-height: 480px; }

.dark .fine { color: var(--green-150); text-align: center; margin-top: var(--space-32); }

/* ---------- Get started (Turf: the logo's own ground) ---------- */
.get { background: var(--green-250); color: var(--green-500); }
.get-inner { display: grid; justify-items: center; text-align: center; gap: var(--space-32); padding: var(--space-128) var(--gutter) var(--space-96); }
.get .logo-tile.inline { background: var(--green-250); }

/* ---------- Footer card ---------- */
.footer { background: var(--green-250); color: var(--green-500); padding: 0 var(--gutter) var(--space-32); }
.footer-card { max-width: calc(var(--content-max) + 2 * var(--space-64)); margin: 0 auto; background: var(--neutral-000); border-radius: var(--radius-32); padding: var(--space-32) var(--space-24); display: grid; gap: var(--space-48); }
@media (min-width: 768px) { .footer-card { padding: var(--space-48); } }
.waitlist { background: var(--neutral-100); border-radius: var(--radius-32); padding: var(--space-24); display: grid; gap: var(--space-16); }
.waitlist input {
  width: 100%; border: 0; background: transparent; color: var(--green-500); padding: 0;
  font-family: "DM Sans Display", sans-serif; font-weight: 700; font-size: 32px; line-height: 40px; letter-spacing: -0.6px;
}
.waitlist input::placeholder { color: var(--neutral-400); }
.waitlist input:focus { outline: none; }
.waitlist:focus-within { box-shadow: inset 0 0 0 2px var(--green-300); }
.waitlist-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-16); }
.waitlist-foot p { color: var(--neutral-400); max-width: 360px; }
.waitlist-msg { color: var(--green-300); font-weight: 600; }
@media (min-width: 768px) { .waitlist input { font-size: 48px; line-height: 56px; } }
.cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-32) var(--space-24); }
@media (min-width: 768px) { .cols { grid-template-columns: repeat(4, 1fr); } }
.cols h4 { margin: 0 0 var(--space-12); color: var(--neutral-400); font-size: 14px; line-height: 20px; font-weight: 500; }
.cols ul { list-style: none; padding: 0; display: grid; gap: var(--space-8); }
.cols a { text-decoration: none; }
.cols a:hover { color: var(--green-300); }
.legal { max-width: calc(var(--content-max) + 2 * var(--space-64)); margin: 0 auto; padding: var(--space-24) var(--space-8) 0; display: grid; gap: var(--space-16); }
.legal-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-16); }
.legal-row nav { display: flex; gap: var(--space-24); }
.legal a { text-decoration: none; }

/* ---------- Plain pages (terms, privacy, 404) ---------- */
.page { padding: var(--space-32) var(--gutter) var(--space-96); }
.page-card { max-width: 820px; margin: 0 auto; background: var(--neutral-000); border-radius: var(--radius-32); padding: var(--space-32) var(--space-24); display: grid; gap: var(--space-16); }
@media (min-width: 768px) { .page-card { padding: var(--space-48); } }
.page-card h1 { font-family: "DM Sans Display", sans-serif; font-weight: 800; font-size: 44px; line-height: 48px; letter-spacing: -1px; }
.page-card h2 { margin-top: var(--space-16); }
.draft-note { background: var(--green-050); color: var(--green-400); border-radius: var(--radius-16); padding: var(--space-16); }

/* ---------- Scroll tint ----------
 * site.js adds .scroll-tint to <html> and sets --page-bg / --page-fg as
 * each section with data-tone crosses the middle of the screen. The page
 * fades between them. Without JS, each section keeps its own ground above. */
.scroll-tint, .scroll-tint body, .scroll-tint .nav {
  background: var(--page-bg);
  transition: background-color 700ms ease, color 700ms ease;
}
.scroll-tint body { color: var(--page-fg); }
.scroll-tint .dark,
.scroll-tint .get,
.scroll-tint .footer { background: transparent; color: inherit; }
@media (prefers-reduced-motion: reduce) {
  .scroll-tint, .scroll-tint body, .scroll-tint .nav { transition: none; }
}

/* Nav wordmark: "In" in Fairway on light grounds, Lime on dark ones. */
.brand .word-dark { display: none; }
[data-tone-now="dark"] .brand .word-light { display: none; }
[data-tone-now="dark"] .brand .word-dark { display: block; }

/* Phones: the app components need close to a phone's real width, so the
   cards get wider and their padding shrinks. */
@media (max-width: 767px) {
  .rail { grid-auto-columns: 88vw; }
  .fcard { padding: var(--space-20); }
  .app-card { min-height: 0; gap: var(--space-32); }
}

/* ---------- The Play row's iPhones ----------
 * Each Play card shows its screen inside an iPhone: a black bezel with a
 * titanium edge and side buttons, the screen cut out of it with rounded
 * corners, a status bar with the Dynamic Island, and a home indicator.
 * The screen is an iPhone's (393 x 852 pt): the status bar's 54 pt on top,
 * then the app. The recordings are 600 x 1218, which fills the rest exactly.
 * Sizes inside the screen are in cqw (screen widths), so the whole phone
 * scales as one piece. The status bar icons also carry a fixed size in the
 * HTML, so they stay small even if this file fails to load. */
.iphone {
  --bezel: 10px;
  position: relative; width: min(100%, 290px); margin: 0 auto;
  padding: var(--bezel); border-radius: 52px;
  background: #0A0A0A;
  box-shadow:
    inset 0 0 0 1.5px #4A4A4A,          /* the titanium band */
    inset 0 0 0 4px #161616,
    0 24px 48px rgba(0, 0, 0, 0.28), 0 4px 12px rgba(0, 0, 0, 0.18);
}
/* Side buttons: power on the right, action and volume on the left. */
.iphone::before, .iphone::after {
  content: ""; position: absolute; width: 3px; border-radius: 2px; background: #2E2E2E;
}
.iphone::before { right: -2px; top: 26%; height: 13%; }
.iphone::after {
  left: -2px; top: 17%; height: 4.5%;
  box-shadow: 0 48px 0 #2E2E2E, 0 96px 0 #2E2E2E;
}
.iphone-screen {
  position: relative; container-type: inline-size;
  aspect-ratio: 393 / 852; border-radius: 42px; overflow: hidden;
  background: var(--neutral-600); color: var(--neutral-000);
  display: flex; flex-direction: column;
  isolation: isolate; /* keeps the video under the rounded corners in Safari */
}
/* Home indicator. */
.iphone-screen::after {
  content: ""; position: absolute; left: 50%; bottom: 2.2cqw; z-index: 2;
  width: 35cqw; height: 1.3cqw; margin-left: -17.5cqw;
  border-radius: 1cqw; background: rgba(250, 250, 250, 0.85); pointer-events: none;
}
.iphone-status {
  position: relative; flex: none; aspect-ratio: 393 / 54;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5cqw 7.5cqw 0 9.5cqw;
  background: var(--green-500);
  font-size: 4.3cqw; line-height: 1; font-weight: 600; letter-spacing: -0.01em;
}
/* The Dynamic Island: the cut-out, with its camera lens on the right. */
.iphone-island {
  position: absolute; left: 50%; top: 2.8cqw;
  width: 32cqw; height: 9.4cqw; margin-left: -16cqw;
  border-radius: 9cqw; background: #000;
}
.iphone-island::after {
  content: ""; position: absolute; right: 3cqw; top: 50%;
  width: 3cqw; height: 3cqw; margin-top: -1.5cqw; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2B3A55 0 25%, #0E1420 60%, #05070B);
}
.iphone-icons { display: flex; align-items: center; gap: 1.4cqw; }
.iphone-icons svg { height: 3cqw; width: auto; }
.iphone-icons svg:last-child { height: 3.1cqw; }

/* A recording on the screen. At the end the first frame fades in over the
   last (.is-resetting), then steps aside. */
.phone-video { position: relative; flex: 1; min-height: 0; background: var(--green-500); }
.phone-video video, .phone-video-first { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.phone-video video { cursor: pointer; }
.phone-video-first { opacity: 0; pointer-events: none; transition: opacity 250ms ease; }
.phone-video.is-resetting .phone-video-first { opacity: 1; transition-duration: 900ms; }

/* An app component on the screen (showcase.js): fills it under the status bar. */
.iphone-app { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--neutral-600); }
.iphone-app > * { flex: 1; }
