/* pinni website
   white / soft gray, burgundy only as the accent. DM Sans.
   layout follows the amyfoodjournal.com page, motion follows apple.com (scroll driven). */

:root {
  --bg: #F6F6F8;
  --card: #FFFFFF;
  --ink: #141414;
  --ink2: #6B6664;
  --ink3: #A29E9C;
  --icon: #2A2A33;
  --line: #E4E0DD;
  --accent: #560C01;
  --tint: #F3EDEC;
  --slot: #E8E8EC;
  --shadow: 0 6px 24px rgba(20, 20, 40, 0.08);
  --shadow-soft: 0 2px 16px rgba(20, 20, 40, 0.06);
  --shadow-big: 0 40px 90px rgba(20, 20, 40, 0.16), 0 10px 30px rgba(20, 20, 40, 0.08);
  --ease: cubic-bezier(0.22, 0.7, 0.2, 1);
  --max: 1120px;
  --nav: 52px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--tint); color: var(--accent); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 22px; }

/* ---------- nav (apple style: full width, translucent, thin) ---------- */
.nav {
  position: fixed; z-index: 50; top: 0; left: 0; right: 0; height: var(--nav);
  background: rgba(246, 246, 248, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent; transition: border-color 0.4s;
}
.nav.scrolled { border-bottom-color: rgba(0, 0, 0, 0.07); }
.nav-in { max-width: var(--max); height: 100%; margin: 0 auto; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand img { height: 22px; width: auto; }
.nav-links { display: flex; gap: 30px; font-size: 13px; color: #3A3634; }
.nav-links a { opacity: 0.8; transition: opacity 0.25s; }
.nav-links a:hover { opacity: 1; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 26px; border-radius: 24px; background: var(--accent); color: #fff;
  font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), opacity 0.3s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(86, 12, 1, 0.26); }
.btn:active { transform: scale(0.97); box-shadow: none; }
.btn.sm { height: 30px; padding: 0 14px; font-size: 13px; border-radius: 15px; }
.btn.soft { background: #fff; color: var(--ink); box-shadow: var(--shadow-soft); }
.btn.soft:hover { box-shadow: var(--shadow); }
.link { color: var(--accent); font-weight: 500; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- type ---------- */
h1, h2, h3 { text-wrap: balance; margin: 0; letter-spacing: -0.045em; line-height: 1.05; font-weight: 700; }
h1 { font-size: clamp(44px, 6.6vw, 84px); }
h2 { font-size: clamp(32px, 4.6vw, 56px); }
h3 { font-size: 20px; letter-spacing: -0.02em; line-height: 1.25; }
p { margin: 0; }
.lede { font-size: clamp(17px, 1.9vw, 21px); color: var(--ink2); line-height: 1.5; }
.sec { padding-top: clamp(96px, 14vw, 180px); }
.sec-head { text-align: center; max-width: 720px; margin: 0 auto clamp(40px, 6vw, 72px); }
.sec-head p { margin-top: 16px; color: var(--ink2); }

/* ---------- slots: where your real video and screenshots go ---------- */
.media { position: relative; overflow: hidden; background: var(--slot); }
.media::after {
  content: attr(data-name); position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; text-align: center;
  font-size: 12px; letter-spacing: 0.02em; color: var(--ink3);
}
.media > img, .media > video { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; object-position: top center; }


/* ---------- iphone 15 frame (sizes in cqw = % of the phone width) ---------- */
.device {
  position: relative; width: 100%; aspect-ratio: 71.6 / 147.6; border-radius: 17cqw; padding: 1.25cqw;
  background: linear-gradient(160deg, #d6d6da 0%, #a0a0a5 26%, #c8c8cc 50%, #8e8e93 76%, #bcbcc0 100%);
  box-shadow: var(--shadow-big), inset 0 0 0 0.3cqw rgba(255, 255, 255, 0.4);
}
.device .bezel { height: 100%; border-radius: 15.75cqw; background: #08080a; padding: 2.9cqw; }
.device .screen { position: relative; height: 100%; border-radius: 12.85cqw; overflow: hidden; background: var(--slot); }
.device .island { position: absolute; z-index: 3; left: 50%; top: 2.6cqw; width: 29.3cqw; height: 8.6cqw; transform: translateX(-50%); border-radius: 5cqw; background: #000; }
.device .sb { position: absolute; width: 1cqw; background: linear-gradient(90deg, #9a9a9f, #cfcfd3 60%, #a6a6ab); }
.device .sb.l { left: -0.75cqw; border-radius: 0.6cqw 0 0 0.6cqw; }
.device .sb.r { right: -0.75cqw; border-radius: 0 0.6cqw 0.6cqw 0; background: linear-gradient(90deg, #a6a6ab, #cfcfd3 40%, #9a9a9f); }
.device .sb.a { top: 31cqw; height: 7cqw; }
.device .sb.v1 { top: 45cqw; height: 13cqw; }
.device .sb.v2 { top: 61cqw; height: 13cqw; }
.device .sb.p { top: 52cqw; height: 21cqw; }

/* ---------- hero ---------- */
.hero { position: relative; padding: calc(var(--nav) + clamp(32px, 6vw, 72px)) 0 clamp(56px, 8vw, 110px); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; min-height: calc(100svh - var(--nav) - 80px); }
.hero-copy { will-change: transform, opacity; }
.hero-copy .lede { margin-top: 22px; max-width: 480px; }
.hero-cta { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: center; }
.hero-note { font-size: 14px; color: var(--ink2); }
.hero-vwrap { container-type: inline-size; justify-self: center; width: min(100%, 340px, calc((100svh - var(--nav) - 100px) / 2.0613)); }
.hero-video { will-change: transform; transform: translateY(calc(var(--p, 0) * 50px)) scale(calc(1 - var(--p, 0) * 0.06)); }
.hero-copy { transform: translateY(calc(var(--p, 0) * -40px)); opacity: calc(1 - var(--p, 0) * 1.5); }

/* ---------- statement (words fill in as you scroll) ---------- */
.statement { padding-top: clamp(40px, 8vw, 100px); }
.statement p { max-width: 920px; margin: 0 auto; text-align: center; font-size: clamp(28px, 4.2vw, 52px); font-weight: 700; letter-spacing: -0.04em; line-height: 1.14; text-wrap: balance; }
.statement .w { opacity: 0.16; transition: opacity 0.25s linear; }

/* ---------- how it works (phone pinned, steps scroll) ---------- */
.how { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 7vw, 100px); align-items: start; }
.how-media { container-type: inline-size; position: sticky; top: calc(50vh - 310px); justify-self: center; width: min(100%, 300px); }
.how-media .media { position: absolute; inset: 0; opacity: 0; transition: opacity 0.7s var(--ease); }
.how-media .media.on { opacity: 1; }
.how-steps { display: flex; flex-direction: column; }
.how-step { min-height: 62vh; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); opacity: 0.28; transition: opacity 0.6s var(--ease); }
.how-step:last-child { border-bottom: 0; }
.how-step.on { opacity: 1; }
.how-step h3 { font-size: clamp(24px, 2.6vw, 32px); letter-spacing: -0.035em; }
.how-step p { margin-top: 10px; color: var(--ink2); max-width: 380px; font-size: 16px; }
.how-step .no { font-size: clamp(56px, 8vw, 104px); font-weight: 700; letter-spacing: -0.06em; color: #DAD7D6; line-height: 1; transition: color 0.6s var(--ease); }
.how-step.on .no { color: var(--accent); }

/* ---------- features (tinted tiles with real screenshots) ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 48px) clamp(18px, 2.4vw, 28px); }
.tile { text-align: center; }
.tile .tint { position: relative; aspect-ratio: 1 / 0.9; border-radius: 32px; overflow: hidden; background: var(--t, #F3E3DE); transition: transform 0.7s var(--ease), box-shadow 0.7s var(--ease); }
.tile:hover .tint { transform: translateY(-4px); box-shadow: var(--shadow); }
.tile .shot { position: absolute; left: 19%; right: 19%; top: 11%; bottom: -30%; border-radius: 26px 26px 0 0; border: 3px solid rgba(255, 255, 255, 0.9); border-bottom: 0; box-shadow: 0 10px 30px rgba(20, 20, 40, 0.12); }
.tile .shot.media { background: rgba(255, 255, 255, 0.6); }
.tile .shot > img { transform: translateY(calc((0.5 - var(--p, 0.5)) * 36px)); height: 118%; }
.tile h3 { margin-top: 18px; font-size: 16px; font-weight: 600; letter-spacing: -0.015em; }
.tile p { margin: 6px auto 0; max-width: 300px; font-size: 14.5px; color: var(--ink2); line-height: 1.5; }

/* ---------- reveal ---------- */
.rv { opacity: 0; transform: translateY(26px) scale(0.985); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0s); }
.rv.in { opacity: 1; transform: none; }
.up { animation: up 1s var(--ease) both; animation-delay: var(--d, 0s); }
@keyframes up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* ---------- pricing ---------- */
.seg { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; margin-top: 26px; padding: 4px; border-radius: 24px; background: #EAE8E7; }
.seg button { position: relative; z-index: 1; height: 40px; padding: 0 20px; border-radius: 20px; font-size: 14px; font-weight: 600; color: var(--ink2); transition: color 0.3s; white-space: nowrap; }
.seg button.on { color: var(--ink); }
.seg .thumb { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px; border-radius: 20px; background: #fff; box-shadow: 0 2px 8px rgba(20, 20, 40, 0.1); transition: transform 0.45s var(--ease), width 0.45s var(--ease); }
.seg button small { margin-left: 6px; font-size: 11px; font-weight: 600; color: var(--accent); background: var(--tint); padding: 2px 7px; border-radius: 10px; }
.plans { max-width: 820px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.plan { background: #fff; border-radius: 36px; padding: 32px; box-shadow: var(--shadow-soft); display: flex; flex-direction: column; gap: 22px; border: 2px solid transparent; }
.plan.pro { border-color: var(--accent); box-shadow: 0 10px 34px rgba(86, 12, 1, 0.1); }
.plan .top { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.price { display: flex; align-items: baseline; gap: 6px; height: 54px; }
.roll { display: block; height: 54px; overflow: hidden; }
.roll > span { display: block; height: 54px; transition: transform 0.6s var(--ease); }
.roll.y > span { transform: translateY(-54px); }
.roll.big > span { font-size: 46px; font-weight: 700; letter-spacing: -0.05em; line-height: 54px; }
.roll.sm { height: 24px; align-self: flex-end; margin-bottom: 8px; }
.roll.sm > span { height: 24px; line-height: 24px; font-size: 16px; font-weight: 500; color: var(--ink2); }
.roll.sm.y > span { transform: translateY(-24px); }
.sub { position: relative; margin-top: -12px; font-size: 14px; color: var(--ink2); height: 21px; }
.sub span { position: absolute; left: 0; top: 0; white-space: nowrap; transition: opacity 0.4s var(--ease); }
.pro .s-y { opacity: 0; } .pro.y .s-y { opacity: 1; } .pro.y .s-m { opacity: 0; }
.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 13px; font-size: 16px; color: var(--icon); }
.ticks li { display: flex; gap: 12px; align-items: flex-start; line-height: 1.4; }
.ticks svg { flex: none; width: 20px; height: 20px; margin-top: 1px; }
.plan .btn { margin-top: auto; height: 52px; border-radius: 26px; }
.fine { max-width: 820px; margin: 22px auto 0; text-align: center; font-size: 13px; line-height: 1.55; color: var(--ink2); }

/* ---------- faq ---------- */
.faq { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.q { background: #fff; border-radius: 26px; box-shadow: var(--shadow-soft); transition: box-shadow 0.4s; }
.q:hover { box-shadow: var(--shadow); }
.q button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; text-align: left; padding: 22px 26px; font-size: 17px; font-weight: 600; letter-spacing: -0.015em; }
.q .pl { flex: none; position: relative; width: 20px; height: 20px; }
.q .pl::before, .q .pl::after { content: ''; position: absolute; left: 3px; right: 3px; top: 9px; height: 2px; border-radius: 1px; background: var(--accent); transition: transform 0.45s var(--ease); }
.q .pl::after { transform: rotate(90deg); }
.q.open .pl::after { transform: rotate(0); }
.q .a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.5s var(--ease); }
.q.open .a { grid-template-rows: 1fr; }
.q .a > div { overflow: hidden; }
.q .a p { padding: 0 26px 24px; color: var(--ink2); font-size: 16px; line-height: 1.6; max-width: 640px; }
.q .a a { color: var(--accent); font-weight: 600; }

/* ---------- footer (big colored block, like the reference) ---------- */
footer { margin-top: clamp(96px, 14vw, 170px); background: var(--accent); color: #F3E6DE; border-radius: 44px 44px 0 0; padding: 64px 0 36px; }
.foot-top { display: flex; flex-wrap: wrap; gap: 40px 64px; justify-content: space-between; }
.foot-brand img { height: 26px; width: auto; }
.foot-brand p { margin-top: 16px; max-width: 320px; font-size: 14px; line-height: 1.55; color: rgba(243, 230, 222, 0.7); }
.foot-cols { display: flex; flex-wrap: wrap; gap: 36px 72px; }
.foot-cols h4 { margin: 0 0 14px; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; color: rgba(243, 230, 222, 0.55); }
.foot-cols a { display: block; padding: 5px 0; font-size: 14px; color: #F3E6DE; opacity: 0.9; transition: opacity 0.25s; }
.foot-cols a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.foot-bot { margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(243, 230, 222, 0.16); font-size: 12.5px; line-height: 1.6; color: rgba(243, 230, 222, 0.6); }
.foot-bot p + p { margin-top: 6px; }
footer .todo { background: rgba(255, 255, 255, 0.12); color: #fff; }

/* ---------- toast ---------- */
.toast {
  position: fixed; z-index: 80; left: 50%; bottom: 28px; transform: translate(-50%, 24px); opacity: 0; pointer-events: none;
  height: 48px; padding: 0 22px; border-radius: 24px; background: rgba(20, 20, 20, 0.92); color: #fff;
  font-size: 14px; font-weight: 500; display: flex; align-items: center; white-space: nowrap;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transition: opacity 0.4s var(--ease), transform 0.5s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- legal pages ---------- */
.legal-head { padding-top: calc(var(--nav) + clamp(48px, 8vw, 96px)); max-width: 760px; }
.legal-head h1 { font-size: clamp(40px, 6vw, 64px); margin: 16px 0 16px; }
.stamp { display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border-radius: 15px; background: var(--tint); color: var(--accent); font-size: 13px; font-weight: 600; }
.legal-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; align-items: start; margin-top: 44px; }
.toc { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.toc a { padding: 7px 12px; border-radius: 12px; color: var(--ink2); transition: background 0.25s, color 0.25s; line-height: 1.3; }
.toc a:hover { color: var(--ink); }
.toc a.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: var(--shadow-soft); }
.doc { background: #fff; border-radius: 36px; box-shadow: var(--shadow-soft); padding: 12px 44px 28px; }
.doc section { padding: 34px 0; border-top: 1px solid var(--line); }
.doc section:first-child { border-top: 0; }
.doc h2 { font-size: 24px; letter-spacing: -0.035em; margin-bottom: 14px; }
.doc p, .doc li { color: #3A3634; font-size: 16.5px; line-height: 1.7; }
.doc p + p, .doc ul + p { margin-top: 14px; }
.doc ul { margin: 12px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.doc li { position: relative; padding-left: 20px; }
.doc li::before { content: ''; position: absolute; left: 2px; top: 0.72em; width: 6px; height: 6px; border-radius: 3px; background: var(--accent); }
.doc a { color: var(--accent); font-weight: 500; text-decoration: underline; text-decoration-color: rgba(86, 12, 1, 0.3); text-underline-offset: 3px; }
.doc a:hover { text-decoration-color: var(--accent); }
.todo { background: var(--tint); color: var(--accent); border-radius: 6px; padding: 0 5px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; min-height: 0; text-align: center; }
  .hero-copy .lede { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .hero-vwrap { width: min(78vw, 300px); }
  .how { grid-template-columns: 1fr; gap: 0; }
  .how-media { top: calc(var(--nav) + 8px); width: min(48vw, 200px); z-index: 3; margin-bottom: 8px; }
  .how-step { min-height: 52vh; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .legal-grid { grid-template-columns: 1fr; gap: 0; }
  .toc { display: none; }
  .doc { padding: 6px 24px 18px; border-radius: 30px; }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
  .plans { grid-template-columns: 1fr; }
  .plan { padding: 28px 26px; }
  footer { border-radius: 32px 32px 0 0; }
}
@media (max-width: 520px) {
  .grid { grid-template-columns: 1fr; }
  .tile .tint { aspect-ratio: 1 / 0.82; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
  .rv { opacity: 1; transform: none; }
  .statement .w { opacity: 1; }
  .hero-copy, .hero-video { transform: none; opacity: 1; }
}
