/* ─────────────────────────────────────────────────────────────────────
   FLIPPED — homepage-only styles.
   Linked only by index.html on top of styles.css.
   ───────────────────────────────────────────────────────────────────── */

/* ─── HERO ───────────────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 120px 28px 80px;
  max-width: 820px;
  margin: 0 auto;
}
.hero .eyebrow   { margin-bottom: 28px; }
.hero .h1        { margin-bottom: 22px; }
.hero .lede      { max-width: 480px; margin: 0 auto 36px; }
.hero .cta-row {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}
.hero .microcopy { margin-top: 22px; }

/* ─── PRODUCT WALKTHROUGH ────────────────────────────────────────── */
.walkthrough {
  background: radial-gradient(ellipse at top, #0a0a0a, #000 70%);
  padding: 96px 28px;
}
.walkthrough .section-head { margin-bottom: 56px; }

.demo-stage {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) auto;
  gap: 32px;
  align-items: center;
}

/* Mac window */
/* Window — matches the real Flipped Mac app: black window, traffic lights,
   then a floating sidebar "island" + content area (mega-tile design). */
.mac {
  background: #000;
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5);
  position: relative;
}
.mac-titlebar {
  padding: 11px 14px;
  display: flex;
  gap: 7px;
  border-bottom: 1px solid var(--border);
}
.mac-titlebar .dot   { width: 12px; height: 12px; border-radius: 50%; }
.mac-titlebar .dot.r { background: #ff5f57; }
.mac-titlebar .dot.y { background: #febc2e; }
.mac-titlebar .dot.g { background: #28c840; }

.mac-body {
  display: flex;
  gap: 10px;
  padding: 10px;
  min-height: 400px;
}

/* Sidebar island — #0d0d0d (app's surfaceElevated), hairline, rounded */
.mac-sidebar {
  width: 150px;
  flex-shrink: 0;
  background: #0d0d0d;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 0;
  display: flex;
  flex-direction: column;
}
.sidebar-brand {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 4px;
  padding: 4px 16px 18px;
  background: linear-gradient(180deg, #fff, #c8c8c8 50%, #888);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.sidebar-nav { display: flex; flex-direction: column; }
.snav {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 7px 16px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.45);
}
.snav .em { color: rgba(255,255,255,0.25); }
.snav.active { color: #fff; }
.snav.active .em { color: #fff; }
.sidebar-device {
  margin-top: auto;
  padding: 12px 16px 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.36);
}
.sidebar-device .dot-green {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #8eba8e;
}

/* Content area — metallic wordmark + the single mega-tile */
.mac-main {
  flex: 1;
  padding: 22px 24px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.mac-wordmark {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 6px;
  background: linear-gradient(180deg, #fff, #c8c8c8 50%, #888);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* Mega-tile — one hairline container; idle + flipped states morph in place */
.mega-tile {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.tile-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--fg-3);
  text-transform: uppercase;
}
.tile-headline {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--fg);
}
.tile-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--fg-2);
}

/* idle/flipped text swap */
.when-flipped { display: none; }
.demo-stage.is-flipped .when-idle   { display: none; }
.demo-stage.is-flipped .when-flipped { display: inline; }

/* TIME REGAINED — 4-cell stopwatch grid with chrome-silver numbers */
.time-regained { display: flex; flex-direction: column; gap: 8px; }
.tr-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.tr-cell {
  background: rgba(255,255,255,0.035);
  border-radius: var(--r-sm);
  padding: 10px 4px;
  text-align: center;
}
.tr-num {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(180deg, #fff, #c8c8c8 50%, #888);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.tr-lbl {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 1.5px;
  color: var(--fg-3);
  margin-top: 5px;
}
.tr-caption {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 2.5px;
  color: var(--fg-3);
  text-align: center;
}

.tile-divider { height: 1px; background: var(--border); }

.active-profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.apr-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--fg-3);
  margin-bottom: 3px;
}
.apr-name { font-size: 13px; font-weight: 600; color: var(--fg); }
.apr-change {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--fg-2);
}

/* FLIP button — filled white (idle) → outlined (UNFLIP, flipped) */
.flip-btn {
  position: relative;
  display: block;
  width: 100%;
  background: var(--fg);
  color: var(--bg);
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 4px;
  border-radius: var(--r-md);
  text-align: center;
  transition: background 200ms ease, transform 120ms ease, color 200ms ease;
  cursor: default;
}
.flip-btn.is-pressed { background: #e8e8e8; transform: scale(0.97); }
.flip-btn .text-flip,
.flip-btn .text-unflip { display: inline-block; }
.flip-btn .text-unflip { display: none; }
.demo-stage.is-flipped .flip-btn {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border-2);
}
.demo-stage.is-flipped .flip-btn.is-pressed { background: rgba(255,255,255,0.06); }
.demo-stage.is-flipped .flip-btn .text-flip   { display: none; }
.demo-stage.is-flipped .flip-btn .text-unflip { display: inline-block; }

/* Cursor — driven entirely by JS via .at-{home,button,settings} classes
   on the .cursor element. No CSS keyframe animation any more. */
.cursor {
  position: absolute;
  width: 18px; height: 18px;
  pointer-events: none;
  top: 24px; left: 24px;
  z-index: 4;
  transition: top 700ms ease, left 700ms ease;
}
.cursor svg { width: 100%; height: 100%; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.6)); }

/* iPhone */
.iphone {
  width: 200px;
  height: 410px;
  border-radius: 42px;
  border: 9px solid #1a1a1a;
  background: #000;
  padding: 8px;
  position: relative;
  box-shadow: 0 30px 60px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(255,255,255,0.06);
}
.iphone-notch {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 92px;
  height: 22px;
  background: #000;
  border-radius: 0 0 16px 16px;
  z-index: 2;
}
.iphone-home {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 5px;
  background: rgba(255,255,255,0.6);
  border-radius: 3px;
}
.iphone-screen {
  padding: 38px 8px 24px;
  height: 100%;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(120,40,180,0.18), transparent 60%),
    linear-gradient(180deg, #050816 0%, #0a0a18 100%);
  border-radius: 32px;
  overflow: hidden;
}
.iphone-time { text-align: center; font-size: 12px; color: rgba(255,255,255,0.9); font-weight: 300; margin-bottom: 2px; }
.iphone-date { text-align: center; font-size: 9px; color: rgba(255,255,255,0.55); margin-bottom: 18px; }

.app-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px 8px;
  padding: 0 6px;
}
.app {
  aspect-ratio: 1;
  border-radius: 11px;
  transition: opacity 280ms ease, transform 280ms ease, filter 280ms ease;
}
.app.distracting { transition-property: opacity, transform, filter; }
.demo-stage.is-flipped .app.distracting {
  opacity: 0;
  transform: translateY(-14px) scale(0.7) rotate(-6deg);
  filter: blur(2px);
}
.app-1  { background: linear-gradient(135deg,#1da1f2,#0d8bd9); }
.app-2  { background: linear-gradient(135deg,#e1306c,#fd1d1d,#fdcb52); }
.app-3  { background: linear-gradient(135deg,#3b5998,#1877f2); }
.app-4  { background: linear-gradient(135deg,#ff0050,#000); }
.app-5  { background: linear-gradient(135deg,#5865f2,#7289da); }
.app-6  { background: linear-gradient(135deg,#ff4500,#ff8717); }
.app-7  { background: linear-gradient(135deg,#00aff0,#0078d7); }
.app-8  { background: linear-gradient(135deg,#fb6a30,#fa4659); }
.app-9  { background: linear-gradient(135deg,#ff9500,#ff5e3a); }
.app-10 { background: linear-gradient(135deg,#9b59b6,#8e44ad); }
.app-11 { background: linear-gradient(135deg,#03a9f4,#0288d1); }
.app-12 { background: linear-gradient(135deg,#e74c3c,#c0392b); }

.app.system-1 { background: linear-gradient(135deg,#34c759,#1f9d40); }
.app.system-2 { background: linear-gradient(135deg,#00b6f0,#0086c3); }

/* Per-app stagger when fading out. Only applies during is-flipped. */
.demo-stage.is-flipped .app.distracting:nth-child(1)  { transition-delay: 0ms; }
.demo-stage.is-flipped .app.distracting:nth-child(2)  { transition-delay: 60ms; }
.demo-stage.is-flipped .app.distracting:nth-child(3)  { transition-delay: 120ms; }
.demo-stage.is-flipped .app.distracting:nth-child(4)  { transition-delay: 180ms; }
.demo-stage.is-flipped .app.distracting:nth-child(5)  { transition-delay: 240ms; }
.demo-stage.is-flipped .app.distracting:nth-child(6)  { transition-delay: 300ms; }
.demo-stage.is-flipped .app.distracting:nth-child(7)  { transition-delay: 360ms; }
.demo-stage.is-flipped .app.distracting:nth-child(8)  { transition-delay: 420ms; }
.demo-stage.is-flipped .app.distracting:nth-child(9)  { transition-delay: 480ms; }
.demo-stage.is-flipped .app.distracting:nth-child(11) { transition-delay: 540ms; }

.caption-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-top: 56px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 2.5px;
  color: var(--fg-2);
  text-transform: uppercase;
}
.caption-strip span.step { color: var(--fg); }

/* ─── COMPARISON TABLE ───────────────────────────────────────────── */
.table-wrap {
  max-width: 900px;
  margin: 0 auto;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.ctable {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.ctable th {
  text-align: center;
  padding: 18px 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2.5px;
  color: var(--fg-3);
  font-weight: 600;
  text-transform: uppercase;
  background: rgba(255,255,255,0.018);
  border-bottom: 1px solid var(--border);
}
.ctable th:first-child { text-align: left; padding-left: 22px; }
.ctable th.flipped-col {
  color: var(--fg);
  font-weight: 700;
  background: rgba(255,255,255,0.04);
}

/* ─── FOUNDER STORY ──────────────────────────────────────────────── */
.story-body {
  max-width: 620px;
  margin: 0 auto;
}
.story-body p {
  font-size: 17px;
  color: var(--fg-1);
  line-height: 1.7;
  margin-bottom: 22px;
}
.story-body p em { color: var(--fg); font-style: normal; font-weight: 600; }
.story-sig {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2.5px;
  color: var(--fg-3);
  margin-top: 28px;
}

/* "their escape hatch" annotation under each competitor name */
.th-escape {
  display: block;
  margin-top: 4px;
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: lowercase;
  color: var(--fg-4);
}
.ctable th.flipped-col .th-escape { color: var(--fg-2); }
.ctable td {
  padding: 14px 10px;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--fg-1);
}
.ctable td:first-child {
  text-align: left;
  padding-left: 22px;
  font-size: 13px;
}
.ctable td.flipped-col { background: rgba(255,255,255,0.02); font-weight: 600; }
.ctable tr:nth-child(even) td { background: rgba(255,255,255,0.012); }
.ctable tr:nth-child(even) td.flipped-col { background: rgba(255,255,255,0.03); }

.check { color: var(--success); font-size: 18px; }
.cross { color: var(--error);   font-size: 18px; }

.table-footnote {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--fg-3);
  margin-top: 18px;
  text-transform: uppercase;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* ─── DISCLOSURES ────────────────────────────────────────────────── */
.disclosure-grid {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.disclosure { padding: 26px; }
.disclosure .num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2.5px;
  color: var(--fg-3);
  margin-bottom: 10px;
}
.disclosure h3 {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.4px;
  margin-bottom: 10px;
}
.disclosure p {
  font-size: 14px;
  color: var(--fg-2);
  line-height: 1.55;
}
.disclosure a {
  color: var(--fg-1);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ─── PRICING ────────────────────────────────────────────────────── */
.tiers {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  max-width: 1000px;
  margin: 0 auto;
}
.tier {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px 26px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.tier.featured {
  background: var(--bg-2);
  border-color: var(--border-2);
  transform: scale(1.02);
  z-index: 1;
}
.tier .popular {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--fg);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 2px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
}
.tier .name {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2.5px;
  color: var(--fg-3);
  margin-bottom: 16px;
  text-transform: uppercase;
}
.tier .price {
  font-size: 46px;
  font-weight: 900;
  letter-spacing: -1.6px;
  line-height: 1;
  margin-bottom: 6px;
}
.tier .price .per {
  font-size: 14px;
  font-weight: 400;
  color: var(--fg-2);
  letter-spacing: 0;
  margin-left: 2px;
}
.tier .equiv {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--fg-3);
  margin-bottom: 18px;
  text-transform: uppercase;
}
.tier .tagline {
  font-size: 14px;
  color: var(--fg-1);
  margin-bottom: 22px;
  line-height: 1.5;
}
.tier .trial-line {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--fg-3);
  margin-bottom: 22px;
  text-transform: uppercase;
  flex: 1;
}
.tier .btn { width: 100%; }

.pricing-footnote {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--fg-3);
  margin-top: 28px;
  text-transform: uppercase;
}

/* ─── RESPONSIVE ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .demo-stage      { grid-template-columns: 1fr; justify-items: center; }
  .disclosure-grid { grid-template-columns: 1fr; }
  .tiers           { grid-template-columns: 1fr; }
  .tier.featured   { transform: none; }
}
@media (max-width: 540px) {
  .hero { padding: 80px 20px 56px; }
  .walkthrough { padding: 72px 20px; }
  /* .mac-body is a FLEX container — the old grid-template-columns rule
     here was dead, leaving the 150px sidebar squeezing the demo on
     phones.  Shrink the sidebar the flex way instead. */
  .mac-body { min-height: 320px; padding: 8px; gap: 8px; }
  .mac-sidebar { width: 104px; }
  .ctable { font-size: 12px; }
  .ctable th, .ctable td { padding: 10px 6px; }
  .ctable th:first-child, .ctable td:first-child { padding-left: 14px; }
}

/* ─── REAL-FOOTAGE DEMO (2026-07-18) — Shift-style depth composition ────
   The CSS iPhone mock is replaced by Pete's real screen recording.  The
   phone OVERLAPS the Mac window (Pete: "I like the depth… instead of the
   phone just right beside the ui animation") so cause (FLIP on Mac) and
   effect (apps vanishing) share one glance — the old stacked layout hid
   the story on mobile entirely. */
.demo-stage {
  display: block;
  position: relative;
  /* Reserve room for the overlapping phone's overhang on the right. */
  padding: 26px 0 46px;
}
.demo-stage .mac {
  max-width: 700px;
  margin-right: 190px;   /* phone overlap zone */
}
.real-iphone {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%) rotate(2.5deg);
  width: 252px;
  border-radius: 40px;
  border: 9px solid #1b1b1e;
  background: #000;
  overflow: hidden;
  box-shadow: 0 34px 90px rgba(0,0,0,0.75), 0 6px 18px rgba(0,0,0,0.5);
  z-index: 3;
}
.real-iphone video { display: block; width: 100%; height: auto; }

@media (max-width: 860px) {
  .demo-stage .mac { margin-right: 0; }
  .real-iphone {
    /* Mobile depth: phone rides the Mac window's lower-right corner —
       both devices visible in ONE viewport, finally. */
    width: 164px;
    right: -14px;
    top: auto;
    bottom: -44px;
    transform: rotate(2.5deg);
    border-width: 7px;
    border-radius: 30px;
  }
  .demo-stage { padding-bottom: 60px; }
}

@media (max-width: 540px) {
  /* The sidebar is decoration at phone width — hiding it lets the
     mega-tile (the actual story: status → FLIP) use the full window.
     Without this the tile overflow-clips at ~250px. */
  .demo-stage .mac-sidebar { display: none; }
  .demo-stage .mac { max-width: none; }
}
