/* =========================================================================
   Wyatt Ogle — Portfolio
   Minimal, personable, content-first. Neutral warm palette + one accent.
   To change the accent color, edit --accent (and --accent-press) below.
   ========================================================================= */

:root {
  /* Surfaces — warm sepia, monotone */
  --bg:        #f3ede2;
  --surface:   #fbf7ef;
  --surface-2: #ebe1d0;

  /* Text — warm brown, near-black to soft */
  --text:    #2a2118;
  --text-2:  #6a5d4b;
  --text-3:  #9d8e78;

  /* Lines */
  --border:        #e5dccb;
  --border-strong: #d3c5ad;

  /* Single accent — warm amber, same monotone family */
  --accent:       #a9743a;
  --accent-press: #8a5c2c;
  --accent-soft:  #eee2cd;

  /* Metrics */
  --nav-h:    66px;
  --maxw:     1080px;
  --maxw-text: 800px;
  --radius:   18px;
  --radius-sm: 13px;
  --ease:     cubic-bezier(0.22, 1, 0.36, 1);

  --font-sans:    "Inter", system-ui, -apple-system, sans-serif;
  --font-display: "Inter", system-ui, -apple-system, sans-serif;
  --font-hand:    "Caveat", "Inter", cursive;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--accent-soft); color: var(--accent-press); }

/* ----------------------------------------------------------------------- */
/* Typography helpers                                                       */
/* ----------------------------------------------------------------------- */
h1, h2, h3 { margin: 0; line-height: 1.15; font-weight: 600; }

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.9rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.6vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 2.8rem;
}
.section-title-tight { margin-bottom: 1rem; }

/* ----------------------------------------------------------------------- */
/* Section layout                                                          */
/* ----------------------------------------------------------------------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 5.5rem 1.5rem;
  border-top: 1px solid var(--border);
}
@media (max-width: 640px) { .section { padding: 4rem 1.25rem; } }

/* ----------------------------------------------------------------------- */
/* Navigation                                                              */
/* ----------------------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}
.nav.scrolled {
  background: rgba(243, 237, 226, 0.82);
  border-bottom-color: var(--border);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
          backdrop-filter: blur(12px) saturate(140%);
}
.nav-inner {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav-brand {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.nav-links {
  margin-left: auto;
  display: flex;
  gap: 0.4rem;
}
.nav-links a {
  position: relative;
  padding: 0.4rem 0.75rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-2);
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--accent); }
.nav-cta {
  padding: 0.5rem 1.05rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border-radius: 99px;
  transition: background 0.2s ease, transform 0.2s var(--ease);
}
.nav-cta:hover { background: var(--accent-press); transform: translateY(-1px); }

/* Hamburger — hidden on desktop, shown on mobile */
.nav-toggle {
  display: none;
  margin-left: auto;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0 9px;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.25s var(--ease), opacity 0.2s ease;
}
/* The "Get in touch" link only appears inside the mobile dropdown */
.nav-mobile-cta { display: none; }

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-cta { display: none; }

  /* Give the bar a surface whenever the menu is open, even at the top */
  .nav.menu-open {
    background: rgba(243, 237, 226, 0.92);
    border-bottom-color: var(--border);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
            backdrop-filter: blur(12px) saturate(140%);
  }

  /* Links collapse into a dropdown panel under the bar */
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.6rem 1.5rem 1rem;
    background: rgba(243, 237, 226, 0.97);
    border-bottom: 1px solid var(--border);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
            backdrop-filter: blur(12px) saturate(140%);
    box-shadow: 0 18px 40px -24px rgba(42, 33, 24, 0.5);
  }
  .nav.menu-open .nav-links { display: flex; }
  .nav-links a {
    padding: 0.65rem 0.4rem;
    font-size: 1rem;
    border-radius: 8px;
  }
  /* Show the CTA as the final, accented item in the dropdown */
  .nav-mobile-cta {
    display: block;
    margin-top: 0.5rem;
    text-align: center;
    color: #fff !important;
    background: var(--accent);
    border-radius: 99px;
    font-weight: 600;
  }

  /* Hamburger morphs into an X when the menu is open */
  .nav.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ----------------------------------------------------------------------- */
/* Hero                                                                    */
/* ----------------------------------------------------------------------- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: calc(var(--nav-h) + 3.5rem) 1.5rem 8rem;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3.5rem;
  align-items: end;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5.4vw, 3.3rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 0;
  white-space: nowrap;
}
.wave { display: inline-block; }

.hero-lead {
  max-width: 540px;
  margin: 1.5rem 0 0;
  font-size: 1.12rem;
  line-height: 1.65;
  color: var(--text-2);
}
.hero-lead strong { color: var(--text); font-weight: 600; }

.hero-cta {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}
.hero-kicker {
  margin: 2.6rem 0 0;
  font-family: var(--font-hand);
  font-size: 1.35rem;
  line-height: 1.3;
  color: var(--accent-press);
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border-radius: 99px;
  font-weight: 600;
  font-size: 0.96rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), background 0.2s ease, border-color 0.2s ease;
}
.btn-primary { color: #fff; background: var(--accent); }
.btn-primary:hover { background: var(--accent-press); transform: translateY(-2px); }
.btn-ghost { color: var(--text); background: var(--surface); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--text-3); transform: translateY(-2px); }

.hero-photo {
  position: relative;
  justify-self: center;
}
.hero-img {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 22%;
  border-radius: 20px;
  border: 1px solid var(--border);
}

@media (max-width: 760px) {
  .hero {
    /* Smaller top/bottom padding lifts the photo nearer the header */
    padding: calc(var(--nav-h) + 1.25rem) 1.5rem 3rem;
  }
  .hero-grid { grid-template-columns: 1fr; gap: 10rem; }
  /* Full-width photo, aligned left with the text below it */
  .hero-photo { order: -1; max-width: none; justify-self: stretch; }
  .hero-img {
    max-width: none;
    /* Wider crop — trims the top and bottom of the portrait */
    aspect-ratio: 1 / 1;
    object-position: center 28%;
  }
}

/* ----------------------------------------------------------------------- */
/* Story — "show, don't tell" pinned scroll clips                          */
/* ----------------------------------------------------------------------- */
.story {
  position: relative;
  border-top: 1px solid var(--border);
  background:
    radial-gradient(120% 80% at 50% 0%, var(--surface) 0%, var(--bg) 60%);
}
.story-pin {
  position: sticky;
  top: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: calc(var(--nav-h) + 1rem) 1.5rem 2rem;
}
.story-stage {
  width: 100%;
  max-width: var(--maxw);
  text-align: center;
}
.story-title { margin-bottom: 0.8rem; }
.story-lead {
  max-width: var(--maxw-text);
  margin: 0 auto 2.4rem;
  color: var(--text-2);
  font-size: 1.05rem;
}

/* The swapping viewer — each clip is a whole frame that swipes up + fades in */
.story-viewer {
  position: relative;
  height: min(60vh, 470px);
  margin: 0 auto;
}
.story-clip {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.8rem;
  opacity: 0;
  transform: translateY(40px);
  /* Outgoing clip: fade + drop out immediately, no delay. */
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease);
  pointer-events: none;
  will-change: opacity, transform;
}
.story-clip.is-active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  /* Incoming clip: wait for the outgoing one to fully clear, then swipe up + fade in.
     The 0.34s delay (> the 0.28s fade-out) guarantees the two never overlap. */
  transition: opacity 0.3s var(--ease) 0.34s, transform 0.34s var(--ease) 0.34s;
}
/* Frame hugs the video's real dimensions — no cropping */
.story-clip-media {
  flex: 0 0 auto;
  line-height: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
  box-shadow: 0 24px 60px -28px rgba(42, 33, 24, 0.4);
}
.story-clip-media video {
  display: block;
  width: auto;
  height: auto;
  max-width: min(56vw, 680px);
  max-height: min(56vh, 430px);
}
.story-clip-placeholder {
  display: grid; place-items: center;
  width: min(56vw, 680px);
  aspect-ratio: 16 / 9;
  color: var(--text-3);
  font-size: 0.9rem;
}
.story-clip-info { flex: 0 1 300px; text-align: left; }
.story-clip-year {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--accent);
  line-height: 1;
}
.story-clip-name {
  margin: 0.4rem 0 0.7rem;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.story-clip-caption {
  margin: 0;
  color: var(--text-2);
  font-size: 1.02rem;
  line-height: 1.55;
}

/* Progress dots */
.story-progress {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}
.story-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border-strong);
  transition: background 0.3s ease, transform 0.3s var(--ease);
}
.story-dot.is-active { background: var(--accent); transform: scale(1.35); }

@media (max-width: 760px) {
  /* Tighten the gap between the lead paragraph and the clip */
  .story-lead { margin-bottom: 1rem; }
  .story-viewer { height: min(76vh, 480px); }
  .story-clip {
    flex-direction: column;
    /* A touch more breathing room between the video and the year/title below */
    gap: 2.5rem;
    text-align: center;
  }
  .story-clip-media video { max-width: 92vw; max-height: 42vh; }
  .story-clip-info { flex: 0 0 auto; text-align: center; }
}

/* Static fallback (reduced motion): just stack the clips */
.story-static { height: auto !important; }
.story-static .story-pin {
  position: static;
  min-height: 0;
  padding: 5.5rem 1.5rem;
}
.story-static .story-viewer {
  height: auto;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}
.story-static .story-clip {
  position: relative;
  inset: auto;
  opacity: 1 !important;
  transform: none !important;
}
.story-static .story-progress { display: none; }

/* ----------------------------------------------------------------------- */
/* Things I've built                                                       */
/* ----------------------------------------------------------------------- */
.built-list {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}
.built-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "media head"
    "media summary"
    "media actions";
  column-gap: 2.6rem;
  row-gap: 0;
  align-content: center;
}
.built-media { grid-area: media; align-self: center; }
.built-head { grid-area: head; }
.built-summary { grid-area: summary; }
.built-actions { grid-area: actions; }
.built-row:nth-child(even) {
  grid-template-areas:
    "head media"
    "summary media"
    "actions media";
}
@media (max-width: 760px) {
  /* Stack: title, then description, then the demo video, then the link */
  .built-row,
  .built-row:nth-child(even) {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "summary"
      "media"
      "actions";
    row-gap: 0;
  }
  /* Space the link below the video (only rendered when there is one) */
  .built-actions { margin-top: 1.2rem; }
}

.built-media {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
  /* Frame shrinks to the media's natural box so the rounded corners hug it */
  line-height: 0;
}
.built-media video, .built-media img {
  width: 100%;
  height: auto;
  display: block;
}

.built-num {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-3);
}
.built-name {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.8vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0.4rem 0 0.8rem;
  color: var(--text);
}
.built-summary { margin: 0 0 1.6rem; color: var(--text-2); font-size: 1.05rem; line-height: 1.6; }
.built-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--accent);
  background: transparent;
  transition: gap 0.2s var(--ease), color 0.2s ease;
}
.built-btn svg { width: 16px; height: 16px; }
.built-btn:hover { gap: 0.7rem; color: var(--accent-press); }

/* ----------------------------------------------------------------------- */
/* Product pitches                                                         */
/* ----------------------------------------------------------------------- */
.pitches-lead {
  max-width: var(--maxw-text);
  margin: 0 0 4.6rem;
  color: var(--text-2);
  font-size: 1.05rem;
}
.pitches-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
@media (max-width: 640px) { .pitches-grid { grid-template-columns: 1fr; } }
.pitch-card {
  display: block;
  padding: 1.8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease, transform 0.2s var(--ease);
}
.pitch-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.pitch-card.is-soon { cursor: default; }
.pitch-status {
  display: inline-block;
  margin-bottom: 0.9rem;
  padding: 0.28rem 0.8rem;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-2);
  background: var(--surface-2);
  border-radius: 99px;
}
.pitch-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.4rem;
  color: var(--text);
}
.pitch-blurb { margin: 0; color: var(--text-2); font-size: 0.98rem; line-height: 1.55; }

.pitch-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.4rem;
}
.pitch-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1.15rem;
  font-weight: 600;
  font-size: 0.92rem;
  color: #fff;
  background: var(--accent);
  border-radius: 99px;
  transition: background 0.2s ease, gap 0.2s var(--ease), transform 0.2s var(--ease);
}
.pitch-btn svg { width: 16px; height: 16px; }
.pitch-btn:hover { background: var(--accent-press); gap: 0.7rem; transform: translateY(-1px); }
.pitch-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--accent);
  transition: color 0.2s ease, gap 0.2s var(--ease);
}
.pitch-link:hover { color: var(--accent-press); gap: 0.55rem; }

/* Featured pitches — embedded live demos, side by side */
.pitch-featured {
  display: flex;
  flex-direction: row;       /* lay every pitch out in a single horizontal row so
                                the titles and demos line up across one axis */
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;   /* share a top edge: the taller phones hang lower */
  gap: 3rem 3rem;
  margin-bottom: 3rem;
}
.showcase {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
/* In the horizontal row the desktop demo sits inline with the phones rather than
   claiming a full row of its own. */
.showcase-title {
  font-family: var(--font-display);
  font-size: clamp(0.99rem, 1.71vw, 1.26rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
  margin: 0 0 0.55rem;
}
.showcase-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.18s ease;
}
.showcase-title a:hover {
  color: var(--accent);
}
/* Per-brand tints: only the vendor's name is styled in its own identity; the
   product-concept half keeps the default title color. On hover the concept half
   stays put (no accent flip) and the brand mark deepens within its own palette. */
.showcase-title--spotify a:hover,
.showcase-title--apple a:hover,
.showcase-title--google a:hover { color: var(--text); }

/* Spotify — solid brand green that eases to a deeper green on hover. */
.showcase-title--spotify .brand-name {
  color: #1db954;
  transition: color 0.28s ease;
}
.showcase-title--spotify a:hover .brand-name { color: #0f8a3c; }

/* Apple — the Apple Intelligence sweep from the pitch, painted onto the text.
   On hover the gradient slides across the letters and intensifies. */
.showcase-title--apple .brand-name {
  background: linear-gradient(115deg, #2aa3ff, #5e5ce6 32%, #bf5af2 58%, #ff6482 80%, #ff9f0a);
  background-size: 220% 100%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: background-position 0.55s ease, filter 0.28s ease;
}
.showcase-title--apple a:hover .brand-name {
  background-position: 100% 50%;
  filter: saturate(1.45) brightness(1.06);
}

/* Google — each letter painted in the logo's color sequence (blue, red,
   yellow, blue, green, red), cycling every 6 so it holds for any length. On
   hover the same six colors snap into a fixed arrangement rotated one position
   along, so every letter lands on a color different from its resting one. */
.showcase-title--google .brand-name span:nth-child(6n + 1) { color: #4285f4; }
.showcase-title--google .brand-name span:nth-child(6n + 2) { color: #ea4335; }
.showcase-title--google .brand-name span:nth-child(6n + 3) { color: #fbbc05; }
.showcase-title--google .brand-name span:nth-child(6n + 4) { color: #4285f4; }
.showcase-title--google .brand-name span:nth-child(6n + 5) { color: #34a853; }
.showcase-title--google .brand-name span:nth-child(6n + 6) { color: #ea4335; }
.showcase-title--google a:hover .brand-name span:nth-child(6n + 1) { color: #ea4335; }
.showcase-title--google a:hover .brand-name span:nth-child(6n + 2) { color: #4285f4; }
.showcase-title--google a:hover .brand-name span:nth-child(6n + 3) { color: #ea4335; }
.showcase-title--google a:hover .brand-name span:nth-child(6n + 4) { color: #fbbc05; }
.showcase-title--google a:hover .brand-name span:nth-child(6n + 5) { color: #4285f4; }
.showcase-title--google a:hover .brand-name span:nth-child(6n + 6) { color: #34a853; }
.showcase-tagline {
  max-width: 420px;
  margin: 0 0 1.6rem;
  color: var(--text-2);
  font-size: 0.98rem;
  line-height: 1.5;
}
/* Sizing box matches the embedded PhoneFrame footprint (418 × 872). The iframe's
   own content renders the device bezel + notch, so this box stays frame-less. */
.phone-embed {
  /* --native: the viewport width (px, unitless) the demo renders correctly at;
     --display: how wide we actually show it in the row. The iframe is rendered at
     --native and scaled by display/native so the fixed-size demo always fills the
     frame edge-to-edge at any display size. Shrink the phones by editing --display. */
  --native: 208;
  --display: 165;
  width: calc(var(--display) * 1px);
  aspect-ratio: 418 / 872;
  margin: 0 auto;
  /* Clip the embed to the phone's rounded corners so nothing dark (the device's
     drop shadow, or a stale cached build) can leak into the box corners on this
     light page. Radius ≈ the bezel's outer radius (~12.4% of width) and tracks
     the responsive width. */
  border-radius: 20px;
  overflow: hidden;
  isolation: isolate; /* own stacking context so the radius clips the iframe */
  /* Soft, warm shadow so the device reads as floating above the page rather
     than pasted onto it. (Renders outside the box, so overflow:hidden is fine.) */
  box-shadow:
    0 30px 55px -28px rgba(42, 33, 24, 0.5),
    0 10px 22px -16px rgba(42, 33, 24, 0.32);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}
/* When the phone links to the write-up, grow it slightly on hover and lift the
   shadow so it reads as clickable. */
.phone-embed-link {
  display: block;
  cursor: pointer;
}
.phone-embed-link:hover {
  transform: scale(1.035);
  box-shadow:
    0 40px 65px -28px rgba(42, 33, 24, 0.55),
    0 14px 28px -16px rgba(42, 33, 24, 0.36);
}
/* Render the demo at its fixed native viewport, then scale it down to the display
   size so the device bezel and the demo inside fill the frame edge-to-edge. */
.phone-embed iframe {
  width: calc(var(--native) * 1px);
  height: calc(var(--native) * 872 / 418 * 1px);
  border: 0;
  display: block;
  background: transparent;
  transform: scale(calc(var(--display) / var(--native)));
  transform-origin: top left;
}
/* The demo auto-plays; let clicks fall through to the wrapping link so the whole
   phone navigates to the write-up. */
.phone-embed-link iframe {
  pointer-events: none;
}

/* Desktop variant — the embed renders its own Chrome window (traffic lights +
   URL bar), so this box just sizes, clips and shadows it, frame-less, the way
   the phone box wraps the demo's own bezel. */
.browser-embed {
  width: clamp(252px, 39.6vw, 414px);
  /* Exactly the demo's own .browser-frame ratio (1280×886) so its window fills
     the box edge-to-edge with no cream bands above or below it. */
  aspect-ratio: 1280 / 886;
  display: block;
  border-radius: 5px; /* matches the demo window's own 12px corner radius */
  overflow: hidden;
  background: #fff;
  isolation: isolate; /* own stacking context so the radius clips the iframe */
  box-shadow:
    0 30px 55px -28px rgba(42, 33, 24, 0.5),
    0 10px 22px -16px rgba(42, 33, 24, 0.32);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}
/* The Google · Agenda AI pitch (the desktop demo) runs 10% larger than the rest. */
.showcase-desktop .browser-embed {
  width: clamp(277px, 43.56vw, 455px);
}
.browser-embed-link { cursor: pointer; }
.browser-embed-link:hover {
  transform: scale(1.02);
  box-shadow:
    0 40px 65px -28px rgba(42, 33, 24, 0.55),
    0 14px 28px -16px rgba(42, 33, 24, 0.36);
}
/* Same technique as the phone: render the demo at its original footprint, then
   scale the iframe down to fill the 10%-smaller frame edge-to-edge. */
.browser-embed iframe {
  width: 111.112%;   /* 1 / 0.9 — original size before the 10% shrink */
  height: 111.112%;
  border: 0;
  display: block;
  background: #fff;
  transform: scale(0.9);
  transform-origin: top left;
}
.browser-embed-link iframe { pointer-events: none; }

/* ----------------------------------------------------------------------- */
/* Personal — polaroids                                                    */
/* ----------------------------------------------------------------------- */
.life-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 2.5rem;
  align-items: center;
}
@media (max-width: 820px) {
  .life-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}
.life-lead {
  margin: 0;
  color: var(--text-2);
  font-size: 1.05rem;
}
/* Photos scattered on the right — overlapping, tilted, staggered */
.polaroids {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem 0;
}
.polaroid {
  position: relative;
  margin: 0;
  width: clamp(92px, 12vw, 150px);
  flex: 0 0 auto;
  padding: 0.6rem 0.6rem 0;
  background: #fffdf8;
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 14px 30px -16px rgba(42, 33, 24, 0.5);
  transform: rotate(var(--tilt, 0deg)) translateY(var(--dy, 0px));
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
/* Tuck each photo's corner under the previous one */
.polaroid:not(:first-child) { margin-left: clamp(-66px, -4vw, -40px); }
.polaroid:hover {
  transform: rotate(0deg) translateY(-12px) scale(1.08);
  box-shadow: 0 28px 50px -18px rgba(42, 33, 24, 0.55);
  z-index: 10;
}
.polaroid-photo {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--surface-2);
}
.polaroid-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.polaroid-caption {
  font-family: var(--font-hand);
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  text-align: center;
  color: var(--text);
  padding: 0.4rem 0 0.7rem;
}

/* ----------------------------------------------------------------------- */
/* Contact                                                                 */
/* ----------------------------------------------------------------------- */
.contact .section-title { margin-bottom: 2rem; }
.contact-title { margin-bottom: 2rem; }

/* Minimalist, icon-only reach-out methods */
.contact-icons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.contact-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.2s var(--ease);
}
.contact-icon svg { width: 22px; height: 22px; }
.contact-icon:hover {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-3px);
}
.contact-icon:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Mobile: keep polaroid captions on one line, spread the reach-out icons */
@media (max-width: 640px) {
  .polaroid-caption { white-space: nowrap; padding: 0.1rem 0 0.2rem; }
  /* Thinner white frame so the photo itself reads larger */
  .polaroid { padding: 0.35rem 0.35rem 0; }
  /* Wider side margins on the whole section keep the heading and icons
     left-aligned together; the icons then space equally across that width */
  .contact { padding-left: 2.75rem; padding-right: 2.75rem; }
  .contact-icons {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 0.5rem;
  }
}

/* ----------------------------------------------------------------------- */
/* Copy toast                                                              */
/* ----------------------------------------------------------------------- */
.copy-popup {
  position: fixed;
  left: 50%;
  bottom: 2.4rem;
  transform: translate(-50%, 12px);
  padding: 0.8rem 1.4rem;
  border-radius: 99px;
  font-weight: 600;
  font-size: 0.92rem;
  color: #fff;
  background: var(--text);
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.25s ease, transform 0.25s var(--ease);
}
.copy-popup.show { opacity: 1; transform: translate(-50%, 0); }

/* ----------------------------------------------------------------------- */
/* Footer                                                                  */
/* ----------------------------------------------------------------------- */
.site-footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 3rem 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-size: 0.88rem;
}

/* ----------------------------------------------------------------------- */
/* Write-up page (e.g. spotify.html) — a standalone pitch teardown          */
/* ----------------------------------------------------------------------- */
.wp-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(243, 237, 226, 0.82);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
          backdrop-filter: blur(12px) saturate(140%);
}
.wp-nav-inner {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.wp-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
  transition: gap 0.2s var(--ease), color 0.2s ease;
}
.wp-back svg { width: 17px; height: 17px; }
.wp-back:hover { gap: 0.75rem; color: var(--accent); }
.wp-nav-cta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.05rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border-radius: 99px;
  transition: background 0.2s ease, transform 0.2s var(--ease);
}
.wp-nav-cta:hover { background: var(--accent-press); transform: translateY(-1px); }

.wp-main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: calc(var(--nav-h) + 3.5rem) 1.5rem 4rem;
}
@media (max-width: 640px) { .wp-main { padding-top: calc(var(--nav-h) + 2.25rem); } }

/* Case-study body — simple: title, date, caps section headers, tight bullets */
.cs { max-width: var(--maxw-text); }
.cs-head { margin-bottom: 2.6rem; }
.cs-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.07;
  margin: 0 0 0.55rem;
  color: var(--text);
}
.cs-date {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-3);
}
.cs-section { margin-top: 2.8rem; }
.cs-section > h2 {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.1rem;
}
.cs-section p {
  margin: 0 0 1rem;
  color: var(--text-2);
  font-size: 1.05rem;
  line-height: 1.7;
}
.cs-section p:last-child { margin-bottom: 0; }
.cs-section p strong, .cs-section li strong { color: var(--text); font-weight: 600; }
.cs-section a { color: var(--accent); font-weight: 600; }
.cs-section a:hover { color: var(--accent-press); }
.cs-section ul { margin: 0; padding: 0; list-style: none; }
.cs-section li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.95rem;
  color: var(--text-2);
  font-size: 1.05rem;
  line-height: 1.65;
}
.cs-section li:last-child { margin-bottom: 0; }
.cs-section li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.66em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* "How it works today" — current-state screenshot strip in the Problem section */
.cs-flow { margin: 2rem 0 0; }
.cs-flow-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 0 0 1.1rem;
}
.cs-flow-steps {
  display: flex;
  align-items: stretch;
  gap: 0.9rem;
}
.cs-flow-arrow {
  align-self: center;
  flex: 0 0 auto;
  color: var(--text-3);
  font-size: 1.4rem;
}
/* Each screenshot slot — a portrait screen with a caption underneath (kept
   below the image so it never covers Spotify's bottom-sheet UI). */
.cs-shot {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.cs-shot-media {
  position: relative;
  /* Matches the cropped screenshot content (428×926). Images 1 & 2 fill it
     exactly; image 3 is taller, so it crops at the bottom (last playlist). */
  aspect-ratio: 428 / 926;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.cs-shot-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
/* Image 3: anchor to the top so the cut-off happens at the bottom of the list. */
.cs-shot-media--top img { object-position: top; }
.cs-shot-cap {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  color: var(--text-2);
}
.cs-shot-cap strong { color: var(--accent); font-weight: 700; }

/* Highlight marker calling out a tapped element in each screenshot. */
.cs-hl {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 3px solid var(--accent);
  border-radius: 50%;
  box-shadow:
    0 0 0 3px rgba(251, 247, 239, 0.55),
    0 0 16px 4px rgba(169, 116, 58, 0.7);
  pointer-events: none;
  z-index: 3;
  animation: cs-hl-pulse 1.8s ease-in-out infinite;
}
.cs-hl--rect { border-radius: 9px; }
@keyframes cs-hl-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(251,247,239,0.45), 0 0 13px 3px rgba(169,116,58,0.5); }
  50%      { box-shadow: 0 0 0 4px rgba(251,247,239,0.7),  0 0 22px 7px rgba(169,116,58,0.85); }
}
@media (prefers-reduced-motion: reduce) { .cs-hl { animation: none; } }
.cs-flow-foot {
  margin: 1.2rem 0 0;
  color: var(--text-2);
  font-size: 0.98rem;
  line-height: 1.6;
}
.cs-flow-foot strong { color: var(--text); font-weight: 600; }
@media (max-width: 560px) {
  .cs-flow-arrow { transform: rotate(90deg); }
  .cs-flow-steps { flex-direction: column; align-items: center; }
  .cs-shot { width: min(72vw, 240px); flex: 0 0 auto; }
}

/* "How it works today" for Calendar — your Personal calendar beside a separate
   Professional one, where a Zoom call is double-booked on an hour you can't see. */
.cs-cals {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.cs-cal {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
}
@media (max-width: 700px) {
  .cs-cals { flex-direction: column; }
}
.cs-cal-tag {
  display: inline-block;
  margin: 0 0 0.6rem;
  padding: 0.2rem 0.7rem;
  border-radius: 500px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #fff;
}
/* Tag colors mirror each account's signature strip in the screenshots. */
.cs-cal-tag--personal     { background: #0b8043; }
.cs-cal-tag--professional { background: #f9ab00; }
.cs-cal-media {
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 12px 30px -18px rgba(42, 33, 24, 0.45);
}
.cs-cal-media img {
  width: 100%;
  height: auto;
  display: block;
}

/* Embedded live demo — the final section */
.cs-demo { margin-top: 3.4rem; }
.cs-demo-frame {
  margin-top: 1.4rem;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
  box-shadow: 0 30px 70px -34px rgba(42, 33, 24, 0.45);
}
.cs-demo-frame iframe {
  display: block;
  width: 100%;
  height: min(80vh, 720px);
  border: 0;
}
@media (max-width: 640px) {
  .cs-demo-frame iframe { height: min(76vh, 600px); }
}
/* Open-in-new-tab pill, pinned to the bottom-right of the demo frame */
.cs-demo-open {
  position: absolute;
  right: 0.85rem;
  bottom: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  border-radius: 99px;
  box-shadow: 0 6px 18px -8px rgba(42, 33, 24, 0.5);
  transition: background 0.2s ease, transform 0.2s var(--ease), color 0.2s ease;
}
.cs-demo-open svg { width: 15px; height: 15px; }
.cs-demo-open:hover { color: var(--accent); transform: translateY(-1px); }

/* "View Other Products" button under the demo — left-aligned with the frame */
.cs-demo-foot {
  margin-top: 1.6rem;
  display: flex;
  justify-content: flex-start;
}
/* Scoped above `.cs-section a` so the label stays white, not accent-on-accent */
.cs-demo-foot .cs-demo-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border-radius: 99px;
  transition: background 0.2s ease, transform 0.2s var(--ease);
}
.cs-demo-foot .cs-demo-cta svg { width: 16px; height: 16px; transition: transform 0.2s var(--ease); }
/* Distinct hover: text stays white, button darkens, arrow slides right */
.cs-demo-foot .cs-demo-cta:hover { color: #fff; background: var(--accent-press); transform: translateY(-1px); }
.cs-demo-foot .cs-demo-cta:hover svg { transform: translateX(-4px); }

/* ----------------------------------------------------------------------- */
/* Scroll-reveal                                                           */
/* ----------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.in-view { opacity: 1; transform: none; }
.reveal[style*="--i"] { transition-delay: calc(var(--i) * 60ms); }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
}
