/* Ivy website. Page chrome follows the app's design files (design/*.html: warm paper,
   Inter UI); every colored surface is a real Ivy theme from assets/themes/themes.json. */

@font-face { font-family: "Fraunces"; src: url("/fonts/Fraunces.woff2") format("woff2"); font-weight: 300 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("/fonts/Fraunces-Italic.woff2") format("woff2"); font-weight: 300 600; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("/fonts/InstrumentSerif.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("/fonts/InstrumentSerif-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Playfair"; src: url("/fonts/Playfair.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Playfair"; src: url("/fonts/Playfair-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url("/fonts/Cormorant.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url("/fonts/Cormorant-Italic.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("/fonts/Manrope.woff2") format("woff2"); font-weight: 500 600; font-display: swap; }

:root {
  --paper: #f4f2ed;
  --card: #fffefb;
  --ink: #1d1d1b;
  --muted: #6d6c66;
  --line: #e2dfd7;
  --accent: #1d3a46;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --shadow: 0 1px 2px rgba(30, 28, 20, 0.04), 0 10px 30px -14px rgba(30, 28, 20, 0.18);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #131416; --card: #1c1d20; --ink: #ecebe7; --muted: #a3a19a; --line: #2c2d31; --accent: #a9cbd8;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px -14px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #131416; --card: #1c1d20; --ink: #ecebe7; --muted: #a3a19a; --line: #2c2d31; --accent: #a9cbd8;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; font-weight: 400; text-wrap: balance; }
p { margin: 0 0 1em; }
button { font: inherit; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.section-h { font: 400 clamp(32px, 4.4vw, 46px)/1.12 var(--serif); letter-spacing: -0.015em; text-align: center; margin-bottom: 14px; }
.section-sub { text-align: center; color: var(--muted); max-width: 620px; margin: 0 auto 40px; }
.more { font-weight: 500; text-decoration: none; }
.more:hover { text-decoration: underline; }

/* ---------- theme surface (gradient + 2 glows + decoration) ---------- */
.th { position: relative; overflow: hidden; isolation: isolate; background: var(--bg); color: var(--fg); transition: color 0.35s; }
.th .glows { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.th .glows i { position: absolute; border-radius: 50%; filter: blur(60px); transition: background 0.35s; }
.th .glows i:first-child { left: -12%; top: -14%; width: 58%; aspect-ratio: 1; background: var(--g1); }
.th .glows i:last-child { right: -14%; bottom: -18%; width: 62%; aspect-ratio: 1; background: var(--g2); }
.th::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.deco-stars::after {
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, rgba(255,255,255,.85), transparent 70%),
    radial-gradient(1px 1px at 27% 64%, rgba(255,255,255,.6), transparent 70%),
    radial-gradient(1.4px 1.4px at 44% 12%, rgba(255,255,255,.7), transparent 70%),
    radial-gradient(1px 1px at 58% 82%, rgba(255,255,255,.55), transparent 70%),
    radial-gradient(1.2px 1.2px at 71% 30%, rgba(255,255,255,.8), transparent 70%),
    radial-gradient(1px 1px at 86% 58%, rgba(255,255,255,.6), transparent 70%),
    radial-gradient(1.3px 1.3px at 92% 14%, rgba(255,255,255,.7), transparent 70%),
    radial-gradient(1px 1px at 8% 88%, rgba(255,255,255,.5), transparent 70%),
    radial-gradient(1px 1px at 36% 40%, rgba(255,255,255,.45), transparent 70%);
}
.deco-pattern::after {
  background-image: radial-gradient(circle, var(--fg) 1px, transparent 1.6px);
  background-size: 20px 20px; opacity: 0.09;
  -webkit-mask-image: linear-gradient(to bottom, transparent 30%, #000); mask-image: linear-gradient(to bottom, transparent 30%, #000);
}
.deco-sparkles::after {
  content: "✦"; inset: auto; right: 16%; top: 14%; font-size: 15px; line-height: 1; color: var(--fg); opacity: 0.45;
  text-shadow: -9vw 18vw 0 var(--fg), 4vw 26vw 0 var(--fg);
}

/* ---------- wordmark ---------- */
.wm {
  display: inline-block; width: 52px; aspect-ratio: 2578 / 1888; background: currentColor;
  -webkit-mask: url("/assets/ivy-wordmark.svg") center / contain no-repeat; mask: url("/assets/ivy-wordmark.svg") center / contain no-repeat;
}

/* ---------- header ---------- */
.site-header { position: relative; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { color: var(--ink); display: flex; align-items: center; padding: 6px 0; }
.logo .wm { width: 56px; }
.site-header.over .logo, .site-header.over .nav-link { color: var(--fg); }
nav { display: flex; align-items: center; gap: 4px; }
.nav-link { color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 12px; border-radius: 20px; opacity: 0.85; }
.nav-link:hover { opacity: 1; }
.get {
  margin-left: 6px; text-decoration: none; font-size: 14px; font-weight: 600; padding: 9px 16px; border-radius: 22px;
  background: var(--ink); color: var(--paper);
}
.over .get { background: var(--uibg); color: var(--fg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }

/* ---------- store badge ---------- */
.store-badge { display: inline-block; line-height: 0; }
.b-white { display: none; }
@media (prefers-color-scheme: dark) {
  .b-black { display: none; } .b-white { display: block; }
}
.th:not(.is-dark) .b-black { display: block; } .th:not(.is-dark) .b-white { display: none; }
.th.is-dark .b-black { display: none; } .th.is-dark .b-white { display: block; }

/* ---------- phone ---------- */
.phone { width: 260px; padding: 9px; border-radius: 46px; background: #111; box-shadow: 0 0 0 1px #2a2a2a inset, 0 30px 60px -22px rgba(0, 0, 0, 0.45); flex: none; }
.phone .screen { position: relative; border-radius: 37px; overflow: hidden; background: #000; }
.phone .screen::before { content: ""; position: absolute; z-index: 2; top: 1.5%; left: 50%; width: 32%; height: 3.4%; transform: translateX(-50%); background: #000; border-radius: 20px; }
.phone img { width: 100%; }

/* ---------- hero ---------- */
.hero-inner { text-align: center; padding-top: 48px; display: flex; flex-direction: column; align-items: center; }
.kicker { font-size: 14px; font-weight: 500; color: var(--ui); margin-bottom: 18px; }
.hero h1 {
  font-family: var(--font); font-weight: var(--fw); font-style: var(--fst);
  font-size: calc(clamp(40px, 6.4vw, 78px) * var(--fk)); line-height: 1.08; letter-spacing: -0.015em;
  max-width: 900px; transition: color 0.35s;
}
.hero .lede { color: var(--ui); font-size: 18px; max-width: 600px; margin: 22px auto 30px; transition: color 0.35s; }
.hero-cta { margin-bottom: 30px; }
.swatches { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 920px; }
.sw {
  display: flex; align-items: center; gap: 7px; cursor: pointer; border: 0; color: var(--fg);
  background: var(--uibg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-radius: 20px; padding: 4px 12px 4px 4px; font-size: 13px; font-weight: 500; transition: transform 0.15s, color 0.35s;
}
.sw:active { transform: scale(0.95); }
.sw i { width: 24px; height: 24px; border-radius: 12px; background: var(--swbg); position: relative; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); }
.sw i::after { content: ""; position: absolute; inset: 8px; border-radius: 4px; background: var(--dot); }
.sw[aria-pressed="true"] { box-shadow: inset 0 0 0 1.5px var(--fg); }
.fan { display: flex; justify-content: center; align-items: flex-start; height: 470px; margin-top: 64px; }
.fan .phone { width: 230px; margin: 0 -34px; transform-origin: 50% 120%; }
.fan .fan-0 { transform: rotate(-14deg) translateY(70px); }
.fan .fan-1 { transform: rotate(-7deg) translateY(22px); z-index: 1; }
.fan .fan-2 { width: 262px; z-index: 2; }
.fan .fan-3 { transform: rotate(7deg) translateY(22px); z-index: 1; }
.fan .fan-4 { transform: rotate(14deg) translateY(70px); }

/* ---------- why ---------- */
.why { padding: 110px 0 40px; }
.why h2, .maker h2 { font: 400 clamp(30px, 4vw, 42px)/1.15 var(--serif); letter-spacing: -0.015em; margin-bottom: 22px; }
.why p, .maker p { color: var(--muted); font-size: 18px; }

/* ---------- features ---------- */
.features { padding: 70px 0 30px; }
.features .section-h { margin-bottom: 40px; }
.feature {
  display: grid; grid-template-columns: 1fr auto; gap: 56px; align-items: center;
  border-radius: 36px; padding: 56px 72px 0; margin-bottom: 24px;
}
.feature .phone { align-self: end; margin-bottom: -70px; }
.feature.flip { grid-template-columns: auto 1fr; }
.feature.flip .phone { order: -1; }
.feature-copy { padding-bottom: 56px; max-width: 470px; }
.feature h3 {
  font-family: var(--font); font-weight: var(--fw); font-style: var(--fst);
  font-size: calc(clamp(28px, 3.2vw, 38px) * var(--fk)); line-height: 1.15; margin-bottom: 16px;
}
.feature p { color: var(--ui); }
.chip {
  display: inline-block; margin-top: 4px; padding: 9px 16px; border-radius: 22px; text-decoration: none;
  font-size: 14px; font-weight: 600; color: var(--fg); background: var(--uibg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.chip:hover { filter: brightness(1.05); }

/* ---------- theme tiles (widget look) ---------- */
.themes { padding: 90px 0 40px; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.tile-wrap { margin: 0; }
.tile { aspect-ratio: 1; border-radius: 26px; display: flex; align-items: center; padding: 22px 22px 34px; box-shadow: var(--shadow); }
.tile .aff {
  margin: 0; width: 100%; font-family: var(--font); font-weight: var(--fw); font-style: var(--fst);
  font-size: calc(21px * var(--fk)); line-height: var(--lh); letter-spacing: -0.01em; text-wrap: balance;
}
.align-center .aff { text-align: center; } .align-left .aff { text-align: left; } .align-right .aff { text-align: right; }
.mark { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; font: italic 400 13px var(--serif); opacity: 0.55; }
.tile-wrap figcaption { font-size: 13px; color: var(--muted); text-align: center; margin-top: 10px; }

/* ---------- steps ---------- */
.steps { padding: 90px 0 30px; }
.step-list { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step-list li { background: var(--card); border-radius: 26px; padding: 30px 28px; box-shadow: var(--shadow); }
.step-num { display: block; font: italic 400 44px/1 var(--serif); color: var(--accent); margin-bottom: 16px; }
.step-list h3 { font: 600 18px/1.3 var(--sans); margin-bottom: 8px; }
.step-list p { color: var(--muted); margin: 0; font-size: 16px; }

/* ---------- maker ---------- */
.maker { padding: 100px 0 30px; }

/* ---------- guides ---------- */
.guides { padding: 90px 0 30px; }
.guide-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 36px; }
.guide-card { display: flex; flex-direction: column; background: var(--card); border-radius: 24px; overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform 0.2s; }
.guide-card:hover { transform: translateY(-3px); }
.guide-card img { aspect-ratio: 3 / 2; object-fit: cover; }
.guide-card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.guide-card h2, .guide-card h3 { font: 400 21px/1.25 var(--serif); margin-bottom: 8px; }
.guide-card p { color: var(--muted); font-size: 15px; line-height: 1.5; flex: 1; }
.guide-card .more { color: var(--accent); font-size: 14px; }

/* ---------- FAQ (inset grouped list, like the app's settings) ---------- */
.faq { padding: 90px 0 30px; }
.group { background: var(--card); border-radius: 24px; box-shadow: var(--shadow); margin-top: 36px; overflow: hidden; }
.faq-item + .faq-item { border-top: 1px solid var(--line); }
.faq-item summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item h3 { font: 500 17px/1.4 var(--sans); }
.chev { flex: none; color: var(--muted); transition: transform 0.2s; }
.faq-item[open] .chev { transform: rotate(180deg); }
.faq-body { padding: 0 24px 22px; color: var(--muted); }
.faq-body p { margin-bottom: 8px; }
.faq-body .more { font-size: 15px; }

/* ---------- final CTA (big widget) ---------- */
.final { padding: 90px 0 100px; }
.final-card { border-radius: 40px; text-align: center; padding: 84px 24px 76px; display: flex; flex-direction: column; align-items: center; }
.final-card h2 { font: 400 clamp(34px, 5vw, 58px)/1.12 var(--serif); letter-spacing: -0.015em; max-width: 760px; margin-bottom: 18px; }
.blank { display: inline-block; position: relative; color: transparent; }
.blank::after { content: ""; position: absolute; left: 0.08em; right: 0.08em; bottom: 0.14em; height: 2px; background: var(--fg); opacity: 0.6; }
.final-card p { color: var(--ui); max-width: 520px; margin-bottom: 28px; }
.final-card .mark { bottom: 18px; font-size: 16px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 30px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 0.7fr; gap: 40px; }
.footer-brand .logo { margin-bottom: 10px; }
.footer-brand p { max-width: 300px; }
.footer-h { font: 600 13px/1 var(--sans); color: var(--muted); margin: 8px 0 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer li a { color: var(--ink); text-decoration: none; opacity: 0.85; }
.site-footer li a:hover { opacity: 1; text-decoration: underline; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-bottom p { margin: 0; max-width: 640px; }

/* ---------- breadcrumbs ---------- */
.breadcrumbs ol { list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--muted); }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; opacity: 0.6; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--ink); }

/* ---------- article ---------- */
.article-main { padding: 24px 0 40px; }
.article { max-width: 760px; }
.article h1 { font: 400 clamp(36px, 5vw, 54px)/1.1 var(--serif); letter-spacing: -0.015em; margin-bottom: 30px; }
.feature-figure { margin: 0 0 36px; }
.feature-img { width: 100%; border-radius: 26px; aspect-ratio: 3 / 2; object-fit: cover; }
.credit { font-size: 13px; color: var(--muted); margin-top: 10px; text-align: right; }
.credit a { color: var(--muted); }
.prose { font-size: 18px; line-height: 1.7; }
.prose .answer { font: 400 23px/1.5 var(--serif); color: var(--ink); }
.prose h2 { font: 400 clamp(26px, 3.2vw, 32px)/1.2 var(--serif); letter-spacing: -0.01em; margin: 52px 0 16px; }
.prose h3 { font: 600 18px/1.4 var(--sans); margin: 24px 0 6px; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose ul { list-style: disc; } .prose ol { list-style: decimal; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--muted); }
.howto { background: var(--card); border-radius: 26px; padding: 28px 32px 14px; box-shadow: var(--shadow); margin: 36px 0; }
.howto h2 { margin-top: 0; }
.shot { margin: 36px 0; display: flex; flex-direction: column; align-items: center; }
.shot .phone { width: 240px; }
.shot figcaption { font-size: 14px; color: var(--muted); text-align: center; margin-top: 16px; max-width: 420px; }
.guide-faq { margin-top: 20px; }
.qa { background: var(--card); border-radius: 22px; padding: 22px 26px 8px; margin-bottom: 14px; box-shadow: var(--shadow); }
.qa h3 { margin-top: 0; }
.related { padding-top: 70px; }
.related .guide-grid { grid-template-columns: repeat(3, 1fr); }
.back-home { margin-top: 30px; }

/* CTA callout (Ocean theme card) */
.cta-callout { display: flex; align-items: center; gap: 22px; border-radius: 28px; padding: 26px 28px; margin: 40px 0; font-size: 16px; line-height: 1.5; }
.cta-icon { border-radius: 15px; flex: none; box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.3); }
.cta-copy { flex: 1; }
.cta-copy p { margin: 0; color: var(--ui); }
.cta-copy .cta-title { font: 400 23px/1.25 var(--serif); color: var(--fg); margin-bottom: 4px; }

/* ---------- guides index / 404 ---------- */
.index-main { padding-top: 24px; padding-bottom: 60px; }
.index-main h1, .notfound h1 { font: 400 clamp(36px, 5vw, 54px)/1.1 var(--serif); letter-spacing: -0.015em; margin-bottom: 16px; }
.index-main .lede { color: var(--muted); font-size: 19px; max-width: 680px; }
.notfound { padding: 100px 24px; }
.btn { display: inline-block; padding: 11px 20px; border-radius: 24px; background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 600; font-size: 15px; margin: 4px; }
.btn-ghost { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .guide-grid, .tiles { grid-template-columns: repeat(2, 1fr); }
  .feature { padding: 44px 44px 0; gap: 36px; }
  .feature .phone { width: 220px; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .hide-s { display: none; }
  .hero-inner { padding-top: 28px; }
  .hero .lede { font-size: 16px; }
  .fan { height: 360px; margin-top: 44px; }
  .fan .phone { width: 170px; margin: 0 -40px; }
  .fan .fan-2 { width: 196px; }
  .fan .fan-0, .fan .fan-4 { display: none; }
  .feature, .feature.flip { grid-template-columns: 1fr; padding: 34px 26px 0; gap: 26px; border-radius: 30px; }
  .feature.flip .phone { order: 0; }
  .feature .phone { width: 220px; justify-self: center; margin-bottom: -90px; }
  .feature-copy { padding-bottom: 0; }
  .tiles { gap: 14px; }
  .tile { padding: 14px 14px 28px; border-radius: 22px; }
  .tile .aff { font-size: calc(16px * var(--fk)); }
  .step-list, .related .guide-grid { grid-template-columns: 1fr; }
  .guide-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .cta-callout { flex-direction: column; align-items: flex-start; }
  .final-card { padding: 60px 20px 64px; border-radius: 30px; }
  .howto { padding: 22px 20px 8px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
