:root {
    --ink: #15171B;
    --paper: #F6F7F5;
    --paper-dim: #EAEBE8;
    --accent: #2C4BFF;
    --accent-soft: #E8ECFF;
    --muted: #6B7280;
    --amber: #E8A23D;
    --mono: 'IBM Plex Mono', monospace;
    --display: 'Space Grotesk', sans-serif;
    --body: 'Inter', sans-serif;
    --maxw: 880px;
  }

  * { box-sizing: border-box; }

  html { scroll-behavior: smooth; }

  body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
  }

  a { color: var(--accent); text-decoration: none; }
  a:hover { text-decoration: underline; }
  a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

  .wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

  /* NAV */
  nav {
    position: sticky; top: 0; z-index: 10;
    background: rgba(246,247,245,0.88);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(0,0,0,0.08);
  }
  nav .wrap {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 16px; padding-bottom: 16px;
  }
  .nav-name {
    font-family: var(--mono); font-size: 14px; font-weight: 500;
    letter-spacing: -0.01em;
  }
  .nav-links { display: flex; gap: 22px; font-family: var(--mono); font-size: 13px; }
  .nav-links a { color: var(--ink); opacity: 0.72; }
  .nav-links a:hover { opacity: 1; color: var(--accent); }

  /* HERO */
  header.hero { padding: 88px 0 64px; }
  .eyebrow {
    font-family: var(--mono); font-size: 13px; color: var(--accent);
    margin-bottom: 18px; display: block;
  }
  .eyebrow::before { content: "~/ "; opacity: 0.5; }
  h1.headline {
    font-family: var(--display); font-weight: 600;
    font-size: clamp(34px, 5.4vw, 54px);
    line-height: 1.08; letter-spacing: -0.02em;
    margin: 0 0 22px;
    max-width: 15ch;
  }
  .hero-sub {
    font-size: 18px; color: #33363D; max-width: 54ch; margin: 0 0 34px;
  }
  .meta-row {
    display: flex; flex-wrap: wrap; gap: 10px;
  }
  .chip {
    font-family: var(--mono); font-size: 12.5px;
    background: var(--paper-dim); border: 1px solid rgba(0,0,0,0.08);
    padding: 6px 12px; border-radius: 100px; color: #40434A;
  }

  /* SECTION SHARED */
  section.case {
    padding: 72px 0;
    border-top: 1px solid rgba(0,0,0,0.09);
  }
  .case-eyebrow {
    font-family: var(--mono); font-size: 13px;
    margin-bottom: 14px; display: flex; align-items: center; gap: 10px;
  }
  .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
  .dot.mono { background: #2A2A2A; }
  .dot.amber { background: var(--amber); }

  h2.case-title {
    font-family: var(--display); font-weight: 600;
    font-size: clamp(26px, 3.6vw, 36px);
    letter-spacing: -0.01em;
    margin: 0 0 8px;
  }
  .case-tagline { color: var(--muted); font-size: 16px; margin: 0 0 28px; max-width: 60ch; }

  .shot {
    width: 100%; border-radius: 10px; overflow: hidden;
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 20px 44px -28px rgba(0,0,0,0.35);
    margin-bottom: 36px;
  }
  .shot img { display: block; width: 100%; height: auto; }

  .case-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 32px 40px;
  }
  @media (max-width: 640px) {
    .case-grid { grid-template-columns: 1fr; }
  }
  .block h3 {
    font-family: var(--mono); font-size: 13px; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--muted); margin: 0 0 10px; font-weight: 500;
  }
  .block p { margin: 0 0 10px; font-size: 15.5px; color: #262930; }
  .block ul { margin: 0; padding-left: 18px; font-size: 15.5px; color: #262930; }
  .block li { margin-bottom: 6px; }

  .full-row { grid-column: 1 / -1; }

  .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
  .tag {
    font-family: var(--mono); font-size: 12px; color: #40434A;
    background: transparent; border: 1px solid rgba(0,0,0,0.14);
    padding: 5px 10px; border-radius: 6px;
  }

  .case-link {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: var(--mono); font-size: 13.5px; margin-top: 24px;
  }

  /* FOOTER / ABOUT */
  footer {
    border-top: 1px solid rgba(0,0,0,0.09);
    padding: 68px 0 80px;
  }
  footer h2 {
    font-family: var(--display); font-weight: 600; font-size: 28px;
    margin: 0 0 16px;
  }
  footer p { max-width: 58ch; color: #33363D; font-size: 16px; margin: 0 0 28px; }
  .footer-links { display: flex; flex-wrap: wrap; gap: 22px; font-family: var(--mono); font-size: 14.5px; }

  .dot.rose { background: #C17A5D; }

  /* PALETTE CASE STUDY — PHONE MOCKUPS */
  .phone-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    margin-bottom: 36px;
  }
  @media (max-width: 900px) {
    .phone-row { grid-template-columns: repeat(2, 1fr); }
  }
  @media (max-width: 480px) {
    .phone-row { grid-template-columns: 1fr; }
  }

  .phone-unit { display: flex; flex-direction: column; align-items: center; }
  .phone-caption {
    font-family: var(--mono); font-size: 12px; color: var(--muted);
    margin-top: 12px; text-align: center;
  }

  .phone-frame {
    width: 100%;
    max-width: 220px;
    aspect-ratio: 9 / 19.5;
    background: #0F1012;
    border-radius: 34px;
    padding: 8px;
    box-shadow: 0 24px 50px -30px rgba(0,0,0,0.45);
  }
  .phone-screen {
    width: 100%; height: 100%;
    background: #FBF9F6;
    border-radius: 26px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    font-family: var(--body);
  }
  .phone-notch {
    position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
    width: 40%; height: 14px; background: #0F1012; border-radius: 8px;
    z-index: 5;
  }

  /* Editorial serif for Palette screens only */
  .pal-serif { font-family: var(--display); font-weight: 600; }

  .pal-pad { padding: 20px 14px 12px; }

  /* Onboarding screen */
  .pal-onboard-title { font-size: 15px; line-height: 1.25; margin: 6px 0 12px; }
  .pal-style-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 0 14px; }
  .pal-style-tile {
    aspect-ratio: 1; border-radius: 10px; display: flex; align-items: flex-end;
    padding: 6px; font-size: 8.5px; color: #fff; font-weight: 500;
  }
  .pal-cta {
    margin: auto 14px 16px; background: #191A1D; color: #fff; text-align: center;
    font-size: 11px; padding: 9px; border-radius: 100px; font-weight: 500;
  }

  /* Discovery feed */
  .pal-search { margin: 0 14px 10px; background: #fff; border: 1px solid rgba(0,0,0,0.08);
    border-radius: 100px; padding: 7px 12px; font-size: 8.5px; color: var(--muted); }
  .pal-chips { display: flex; gap: 5px; padding: 0 14px 10px; overflow: hidden; }
  .pal-chip { font-size: 7.5px; padding: 4px 8px; border-radius: 100px; background: #F0EEE9; white-space: nowrap; color: #40434A; }
  .pal-chip.active { background: #191A1D; color: #fff; }
  .pal-masonry { columns: 2; column-gap: 6px; padding: 0 14px; }
  .pal-card { break-inside: avoid; border-radius: 10px; margin-bottom: 6px; position: relative; overflow: hidden; }
  .pal-save {
    position: absolute; top: 5px; right: 5px; width: 16px; height: 16px; border-radius: 50%;
    background: rgba(255,255,255,0.88); font-size: 8px; display: flex; align-items: center; justify-content: center;
  }

  /* Item detail */
  .pal-hero-img { margin: 0 14px; border-radius: 12px; height: 42%; }
  .pal-item-title { padding: 12px 14px 2px; font-size: 13px; }
  .pal-item-tags { padding: 0 14px; display: flex; gap: 4px; }
  .pal-item-tag { font-size: 7px; color: var(--muted); background: #F0EEE9; padding: 3px 7px; border-radius: 100px; }
  .pal-save-btn {
    margin: 12px 14px 8px; background: #C17A5D; color: #fff; text-align: center;
    font-size: 10.5px; padding: 9px; border-radius: 100px; font-weight: 500;
  }
  .pal-more-row { display: flex; gap: 5px; padding: 4px 14px; }
  .pal-more-thumb { width: 32px; height: 32px; border-radius: 7px; flex-shrink: 0; }

  /* Board view */
  .pal-board-header { padding: 14px 14px 8px; }
  .pal-board-title { font-size: 14px; }
  .pal-board-meta { font-size: 8px; color: var(--muted); margin-top: 2px; }
  .pal-board-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 4px 14px; }
  .pal-board-item { aspect-ratio: 1; border-radius: 8px; }

  /* Bottom nav shared across screens */
  .pal-nav {
    margin-top: auto; display: flex; justify-content: space-around;
    padding: 10px 0; border-top: 1px solid rgba(0,0,0,0.06); background: #fff;
  }
  .pal-nav-dot { width: 5px; height: 5px; border-radius: 50%; background: #C7C2B8; }
  .pal-nav-dot.on { background: #191A1D; }

  /* Curated gradient swatches standing in for photography */
  .g1 { background: linear-gradient(140deg, #E8C4A0, #C17A5D); }
  .g2 { background: linear-gradient(140deg, #D9D3C4, #A8A196); }
  .g3 { background: linear-gradient(140deg, #C9D2C6, #8D9C8B); }
  .g4 { background: linear-gradient(140deg, #E3D5C8, #B08968); }
  .g5 { background: linear-gradient(140deg, #DCE3E0, #9FB0AA); }
  .g6 { background: linear-gradient(140deg, #EAD9D3, #C99A8E); }
  .g7 { background: linear-gradient(140deg, #D6CFC2, #8C7B6B); }
  .g8 { background: linear-gradient(140deg, #E0DDD3, #B5AC9A); }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
  }

