/* ============================================================
   Heap Brands — shared design system
   "Striking through restraint"
   ============================================================ */

:root {
  /* paper + ink */
  --paper: #faf8f4;
  --paper-2: #f3efe7;
  --ink: #17130e;
  --ink-soft: #4a4239;
  --muted: #897e6f;
  --line: rgba(23, 19, 14, 0.10);
  --line-soft: rgba(23, 19, 14, 0.06);
  --card: #ffffff;

  /* sunrise accent (the .manifest signature) */
  --peach: #f6c99a;
  --gold: #f0a35e;
  --rose: #e98a7b;
  --dusk: #3a4a7a;
  --sunrise: linear-gradient(105deg, #f7d7a8 0%, #f0a35e 34%, #e98a7b 64%, #6f6aa6 100%);

  /* urgency colours (match the app's To Do bands) */
  --u-red: rgba(255, 59, 48, 0.16);
  --u-orange: rgba(255, 149, 0, 0.17);
  --u-yellow: rgba(255, 204, 0, 0.20);
  --u-green: rgba(52, 199, 89, 0.15);
  --u-red-dot: #ff3b30;
  --u-orange-dot: #ff9500;
  --u-yellow-dot: #e8b400;
  --u-green-dot: #34c759;

  /* per-app accents (root cards) */
  --manifest-accent: #e98a7b;
  --fyd-accent: #ff7a3d;
  --dollar-accent: #1f9d74;

  --radius: 22px;
  --radius-sm: 14px;
  --shadow-soft: 0 1px 2px rgba(23,19,14,.04), 0 12px 34px rgba(23,19,14,.07);
  --shadow-lift: 0 2px 6px rgba(23,19,14,.06), 0 26px 60px rgba(23,19,14,.12);
  --container: 1140px;
  --ease: cubic-bezier(.22,.61,.36,1);

  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

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

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

h1, h2, h3 { font-family: var(--font-serif); font-weight: 500; line-height: 1.05; letter-spacing: -0.02em; margin: 0; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 26px; }
.eyebrow {
  font-family: var(--font-sans);
  font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
}
.lead { font-size: 1.22rem; color: var(--ink-soft); }
.center { text-align: center; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--font-sans); font-weight: 600; font-size: 1rem;
  padding: .92em 1.5em; border-radius: 999px; cursor: pointer;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .3s, color .3s;
  border: 1px solid transparent; white-space: nowrap;
}
.btn-primary { background: var(--ink); color: var(--paper); box-shadow: var(--shadow-soft); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: rgba(23,19,14,.04); transform: translateY(-2px); }
.btn-sun { background: var(--sunrise); color: #2a2034; box-shadow: 0 10px 30px rgba(233,138,123,.35); }
.btn-sun:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(233,138,123,.45); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(140%) blur(14px);
  background: rgba(250,248,244,.72);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: baseline; gap: 0; font-family: var(--font-serif); font-size: 1.25rem; letter-spacing: -.02em; white-space: nowrap; }
.brand .dot { color: var(--rose); }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: .95rem; font-weight: 500; }
.nav-links a { color: var(--ink-soft); transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
@media (max-width: 720px){ .nav-links .hide-sm { display:none; } }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce){
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .float { animation: none !important; }
}

/* ---------- hero ---------- */
.hero { position: relative; padding: 92px 0 40px; overflow: hidden; }
.hero-glow {
  position: absolute; inset: -20% -10% auto -10%; height: 620px; z-index: 0;
  background: radial-gradient(60% 70% at 70% 30%, rgba(240,163,94,.32), transparent 60%),
              radial-gradient(50% 60% at 25% 20%, rgba(233,138,123,.28), transparent 62%),
              radial-gradient(55% 70% at 85% 60%, rgba(111,106,166,.22), transparent 60%);
  filter: blur(8px); pointer-events: none;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
.hero .lead { margin: 22px 0 30px; max-width: 30ch; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-note { font-size: .85rem; color: var(--muted); margin-top: 16px; }
@media (max-width: 900px){
  .hero-grid { grid-template-columns: 1fr; gap: 26px; }
  .hero { padding-top: 56px; }
  .hero .lead { max-width: none; }
}

/* ---------- iPhone mockup + app UI ---------- */
.phone {
  position: relative; width: 300px; max-width: 78vw; aspect-ratio: 300/620;
  background: #0f0d0b; border-radius: 46px; padding: 11px;
  box-shadow: var(--shadow-lift), inset 0 0 0 2px rgba(255,255,255,.06);
  margin: 0 auto;
}
.phone.float { animation: floaty 7s ease-in-out infinite; }
@keyframes floaty { 0%,100%{ transform: translateY(0) } 50%{ transform: translateY(-12px) } }
.phone-screen { position: relative; width: 100%; height: 100%; background: var(--paper); border-radius: 36px; overflow: hidden; display: flex; flex-direction: column; }
.notch { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 92px; height: 26px; background: #0f0d0b; border-radius: 0 0 16px 16px; z-index: 4; }
.phone-screen img.shot { width: 100%; height: 100%; object-fit: cover; display: block; }
.phone.tilt { transform: rotate(-3deg); } .phone.tilt2 { transform: rotate(3deg); }

.app-top { padding: 30px 20px 12px; }
.app-kicker { font-size: 11px; letter-spacing:.12em; text-transform: uppercase; color: var(--muted); font-weight:600; }
.app-h { font-family: var(--font-serif); font-size: 22px; margin-top: 3px; }
.app-list { flex: 1; padding: 6px 16px 16px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.task {
  display:flex; align-items:center; gap: 11px; padding: 13px 14px; border-radius: 15px;
  font-size: 14px; box-shadow: 0 1px 2px rgba(23,19,14,.05);
}
.task .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.task .t-main { flex: 1; }
.task .t-title { font-weight: 600; color: var(--ink); line-height: 1.2; }
.task .t-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.task.red { background: var(--u-red); } .task.red .dot { background: var(--u-red-dot); }
.task.orange { background: var(--u-orange); } .task.orange .dot { background: var(--u-orange-dot); }
.task.yellow { background: var(--u-yellow); } .task.yellow .dot { background: var(--u-yellow-dot); }
.task.green { background: var(--u-green); } .task.green .dot { background: var(--u-green-dot); }
.app-tabs { display: flex; justify-content: space-around; padding: 12px 8px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-soft); background: rgba(255,255,255,.6); }
.app-tabs span { width: 22px; height: 22px; border-radius: 6px; background: var(--line); }
.app-tabs span.active { background: var(--ink); }

/* routine variant rows */
.r-row { display:flex; gap: 11px; align-items:center; padding: 12px 14px; border-radius: 15px; background: #fff; box-shadow: 0 1px 2px rgba(23,19,14,.05); font-size: 13.5px; }
.r-time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; width: 46px; flex:none; }
.r-ic { width: 26px; height: 26px; border-radius: 8px; flex:none; display:grid; place-items:center; font-size: 13px; }

/* ---------- sections ---------- */
section { position: relative; }
.section { padding: 96px 0; }
.section-sm { padding: 64px 0; }
.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-head h2 { font-size: clamp(2rem, 4vw, 3rem); }
.section-head p { color: var(--ink-soft); margin-top: 16px; font-size: 1.15rem; }

/* philosophy */
.philosophy { background: var(--paper-2); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.phi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.phi-grid h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); }
.phi-grid p { color: var(--ink-soft); font-size: 1.16rem; margin: 20px 0 0; }
.phi-art { display:grid; place-items:center; }
.phi-art img { width: min(360px, 80%); filter: drop-shadow(0 30px 50px rgba(23,19,14,.18)); }
.pullquote { font-family: var(--font-serif); font-size: clamp(1.6rem,3vw,2.3rem); line-height: 1.25; letter-spacing: -.02em; }
.pullquote em { font-style: italic; background: var(--sunrise); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (max-width: 860px){ .phi-grid { grid-template-columns: 1fr; gap: 32px; } }

/* features */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; padding: 60px 0; }
.feature:nth-child(even) .feature-text { order: 2; }
.feature-text .eyebrow { color: var(--rose); }
.feature-text h3 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-top: 12px; }
.feature-text p { color: var(--ink-soft); margin-top: 14px; font-size: 1.08rem; }
.feature-visual { display:grid; place-items:center; }
.spotlight { background: linear-gradient(180deg, rgba(247,215,168,.18), rgba(233,138,123,.10)); border-radius: 34px; }
@media (max-width: 860px){
  .feature { grid-template-columns: 1fr; gap: 26px; padding: 36px 0; }
  .feature:nth-child(even) .feature-text { order: 0; }
}

/* mini card grid (privacy) */
.cards-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.mini { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-soft); }
.mini h4 { font-family: var(--font-serif); font-size: 1.25rem; margin: 10px 0 8px; }
.mini p { color: var(--ink-soft); font-size: .98rem; margin: 0; }
.mini .ic { font-size: 1.5rem; }
@media (max-width: 760px){ .cards-3 { grid-template-columns: 1fr; } }

/* ---------- Heap Brands app cards (root) ---------- */
.apps { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.app-card {
  position: relative; background: var(--card); border: 1px solid var(--line-soft);
  border-radius: 26px; padding: 32px 28px 28px; box-shadow: var(--shadow-soft);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease); overflow: hidden; display:flex; flex-direction:column;
}
.app-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.app-card .halo { position: absolute; inset: -40% -30% auto -30%; height: 200px; opacity: .5; filter: blur(20px); z-index:0; }
.app-card > * { position: relative; z-index: 1; }
.app-badge { width: 64px; height: 64px; border-radius: 16px; display:grid; place-items:center; font-family: var(--font-serif); font-size: 30px; color:#fff; box-shadow: var(--shadow-soft); }
.app-badge-img { width: 64px; height: 64px; border-radius: 16px; box-shadow: var(--shadow-soft); display:block; }
.soon-badge-img { width: 92px; height: 92px; border-radius: 22px; box-shadow: var(--shadow-lift); display:block; margin: 0 auto 26px; }
.app-card h3 { font-size: 1.6rem; margin: 18px 0 0; }
.app-card .role { font-size: .82rem; font-weight:600; letter-spacing:.04em; text-transform:uppercase; color: var(--muted); margin-top: 6px; }
.app-card p { color: var(--ink-soft); font-size: 1rem; margin: 12px 0 22px; flex:1; }
.app-card .go { display:inline-flex; align-items:center; gap:.4em; font-weight:600; font-size:.95rem; }
.app-card .go .arrow { transition: transform .3s var(--ease); }
.app-card:hover .go .arrow { transform: translateX(5px); }
.tag-soon { display:inline-block; font-size:.72rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color: var(--muted); border:1px solid var(--line); padding:.25em .7em; border-radius:999px; }
@media (max-width: 860px){ .apps { grid-template-columns: 1fr; } }

/* CTA band */
.cta-band { text-align:center; padding: 88px 0; background: var(--ink); color: var(--paper); border-radius: 0; }
.cta-band h2 { font-size: clamp(2rem,4vw,3rem); color: var(--paper); }
.cta-band p { color: rgba(250,248,244,.72); margin: 16px auto 30px; max-width: 46ch; }
.cta-band .btn-ghost { color: var(--paper); border-color: rgba(250,248,244,.3); }
.cta-band .btn-ghost:hover { background: rgba(250,248,244,.1); }

/* footer */
.footer { padding: 56px 0 64px; border-top: 1px solid var(--line); }
.footer-grid { display:flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; align-items: flex-start; }
.footer .brand { font-size: 1.15rem; }
.footer-links { display:flex; gap: 28px; flex-wrap: wrap; font-size: .92rem; color: var(--ink-soft); }
.footer-links a:hover { color: var(--ink); }
.footer small { color: var(--muted); display:block; margin-top: 22px; font-size: .82rem; }

/* coming soon */
.soon-wrap { min-height: 78vh; display:grid; place-items:center; text-align:center; padding: 60px 0; }
.soon-wrap h1 { font-size: clamp(2.4rem,6vw,4rem); margin-bottom: 18px; }
.soon-wrap p { color: var(--ink-soft); max-width: 40ch; margin: 0 auto 28px; }
.soon-badge { width: 84px; height:84px; border-radius: 20px; display:grid; place-items:center; font-family:var(--font-serif); font-size:38px; color:#fff; margin: 0 auto 26px; box-shadow: var(--shadow-lift); }
