/* DuoPage website. Art direction from the Gemini mockup (src/art/design-mockup-gemini.png):
   bottle-green book cloth, gold foil type, a red ribbon, cream paper sections. */

:root {
  --green-950: #0f2a20;
  --green-900: #163a2c;
  --green-800: #1e4636;
  --green-700: #2a5a46;
  --gold-200: #f3e2b8;
  --gold-300: #ecd39a;
  --gold-400: #e2c27d;
  --gold-500: #c9a45c;
  --gold-600: #a8843f;
  --ribbon: #b3262e;
  --ribbon-dark: #8c1c23;
  --cream-50: #fcf9f2;
  --cream-100: #f6efe2;
  --cream-200: #ece2cf;
  --ink: #1f1b16;
  --ink-2: #463f35;
  --muted: #6f675b;
  --rule: #ddd0b6;
  --on-green: #f6efe2;
  --on-green-muted: rgba(246, 239, 226, 0.74);

  --serif: "Fraunces", "Georgia", "Times New Roman", serif;
  --sans: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 16px;
  --shadow-card: 0 1px 2px rgba(31, 27, 22, 0.06), 0 10px 30px -12px rgba(31, 27, 22, 0.18);
  --gold-rule: linear-gradient(90deg, var(--gold-600), var(--gold-300) 50%, var(--gold-600));
  --cloth: url("/assets/img/cloth.jpg");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream-100);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: var(--green-800); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ribbon); }
:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; letter-spacing: -0.01em; margin: 0; font-optical-sizing: auto; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { top: 12px; color: #fff; }

/* ---------- Cloth (green) bands ---------- */
.cloth {
  position: relative;
  color: var(--on-green);
  background-color: var(--green-800);
  background-image: linear-gradient(rgba(23, 61, 46, 0.8), rgba(23, 61, 46, 0.8)), var(--cloth);
  background-image: linear-gradient(rgba(23, 61, 46, 0.8), rgba(23, 61, 46, 0.8)),
    image-set(url("/assets/img/cloth.avif") type("image/avif"), url("/assets/img/cloth.jpg") type("image/jpeg"));
  background-size: cover;
  background-position: center;
}
.cloth a { color: var(--gold-300); }
.cloth a:hover { color: var(--gold-200); }
.gold-rule-top::before, .gold-rule-bottom::after {
  content: ""; position: absolute; left: 0; right: 0; height: 4px; background: var(--gold-rule);
}
.gold-rule-top::before { top: 0; }
.gold-rule-bottom::after { bottom: 0; }

.foil {
  background: linear-gradient(180deg, var(--gold-200) 0%, var(--gold-400) 45%, var(--gold-600) 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* Ribbon bookmark */
.ribbon {
  position: absolute; width: 34px; height: 92px;
  background: linear-gradient(90deg, var(--ribbon-dark), var(--ribbon) 40%, var(--ribbon-dark));
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%);
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.25));
  z-index: 3;
}

/* ---------- Header ---------- */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 50; padding: 14px 0; pointer-events: none; }
.site-header .nav { pointer-events: auto; }
.nav {
  display: flex; align-items: center; gap: 28px;
  background: rgba(252, 249, 242, 0.94);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 2px solid var(--gold-500);
  border-radius: 14px;
  padding: 10px 12px 10px 16px;
  box-shadow: 0 10px 30px -16px rgba(0, 0, 0, 0.5);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--green-800); }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.brand span { font-family: var(--serif); font-weight: 600; font-size: 1.4rem; letter-spacing: -0.01em; }
.nav-links { display: flex; gap: 26px; margin: 0 0 0 auto; padding: 0; list-style: none; }
.nav-links a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.97rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ribbon); }
.lang { font-size: 0.9rem; font-weight: 600; color: var(--green-800); text-decoration: none; border: 1px solid var(--rule); padding: 5px 10px; border-radius: 999px; }
.menu { display: none; }

/* App Store button (replace with Apple's official badge artwork before launch; see README) */
.appstore {
  display: inline-flex; align-items: center; gap: 9px;
  background: #000; color: #fff !important; text-decoration: none;
  border-radius: 10px; padding: 7px 15px 7px 12px;
  border: 1px solid #a6a6a6; line-height: 1;
  transition: transform 0.15s ease;
}
.appstore:hover { transform: translateY(-1px); }
.appstore svg { width: 22px; height: 26px; fill: #fff; flex: none; }
.appstore small { display: block; white-space: nowrap; font-size: 0.66rem; letter-spacing: 0.02em; margin-bottom: 2px; }
.appstore strong { display: block; font-size: 1.18rem; font-weight: 600; letter-spacing: -0.01em; font-family: -apple-system, BlinkMacSystemFont, var(--sans); }
.appstore.lg { padding: 10px 20px 10px 16px; border-radius: 12px; }
.appstore.lg svg { width: 28px; height: 32px; }
.appstore.lg strong { font-size: 1.5rem; }
.appstore.lg small { font-size: 0.78rem; }

/* ---------- Hero ---------- */
.hero { padding: 132px 0 0; overflow-x: clip; text-align: center; }
.hero .eyebrow { display: inline-flex; gap: 10px; align-items: center; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-300); margin-bottom: 22px; }
.hero .eyebrow::before, .hero .eyebrow::after { content: ""; width: 28px; height: 1px; background: var(--gold-500); }
.hero h1 { font-size: clamp(1.85rem, 6.6vw, 5.4rem); line-height: 1.04; padding-bottom: 0.06em; }
.hero .lede { max-width: 640px; margin: 24px auto 34px; font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--on-green-muted); }
.hero-ctas { display: flex; gap: 22px; justify-content: center; align-items: center; flex-wrap: wrap; }
.text-link { font-weight: 600; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.text-link::after { content: "→"; transition: transform 0.15s; }
.text-link:hover::after { transform: translateX(3px); }
.hero-art { position: relative; max-width: 1060px; margin: 0 auto; height: clamp(250px, 40vw, 470px); }
.hero-art picture { position: absolute; }
.hero-art .closed { width: 46%; left: 2%; bottom: 4%; z-index: 2; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.45)); }
.hero-art .open { width: 64%; right: 0; bottom: -4%; z-index: 1; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.4)); }
.hero .ribbon { right: 12%; bottom: -60px; }
.hero-note { font-size: 0.85rem; color: var(--on-green-muted); margin: 12px 0 0; }

/* ---------- Generic sections ---------- */
.section { padding: clamp(64px, 9vw, 120px) 0; position: relative; overflow-x: clip; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto clamp(40px, 6vw, 64px); }
.kicker { display: block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ribbon); margin-bottom: 14px; }
.cloth .kicker { color: var(--gold-300); }
.section-head h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); }
.section-head p { margin-top: 18px; color: var(--muted); font-size: 1.1rem; }
.cloth .section-head p { color: var(--on-green-muted); }

/* Fold / Open / Write strip */
.steps { background: var(--cream-50); border-bottom: 1px solid var(--rule); position: relative; }
.steps ol { list-style: none; margin: 0; padding: 48px 0 44px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; counter-reset: step; }
.steps li { display: flex; gap: 18px; align-items: flex-start; }
.steps .icon { width: 56px; height: 56px; flex: none; color: var(--green-800); }
.steps h3 { font-size: 1.7rem; margin-bottom: 4px; }
.steps p { margin: 0; color: var(--muted); font-size: 0.98rem; }

/* Story rows */
.story { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.story + .story { margin-top: clamp(64px, 9vw, 120px); }
.story.flip .story-art { order: 2; }
.story-art picture { display: block; filter: drop-shadow(0 26px 30px rgba(31, 27, 22, 0.22)); transform: scale(1.22); }
.story h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); margin-bottom: 18px; }
.story p { color: var(--ink-2); font-size: 1.08rem; }
.ticks { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 30px; color: var(--ink-2); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 0.42em; width: 16px; height: 16px; border-radius: 50%;
  background: var(--green-800) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.3 2.3 4.7-5' fill='none' stroke='%23ecd39a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat;
}

/* Feature cards on cloth */
.grid-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card-dark {
  background: rgba(9, 28, 21, 0.5);
  border: 1px solid rgba(226, 194, 125, 0.28);
  border-radius: var(--radius);
  padding: 28px 26px 26px;
  transition: border-color 0.2s, transform 0.2s;
}
.card-dark:hover { border-color: rgba(226, 194, 125, 0.6); transform: translateY(-2px); }
.card-dark .icon { width: 44px; height: 44px; color: var(--gold-400); margin-bottom: 18px; }
.card-dark h3 { font-family: var(--sans); font-size: 1.12rem; font-weight: 600; color: var(--on-green); margin-bottom: 8px; letter-spacing: 0; }
.card-dark p { margin: 0; color: var(--on-green-muted); font-size: 0.96rem; line-height: 1.55; }

/* Film */
.film { max-width: 980px; margin: 0 auto; border-radius: 22px; overflow: hidden; box-shadow: 0 40px 80px -30px rgba(31, 27, 22, 0.45); border: 6px solid #fff; background: #000; }
.film video { width: 100%; aspect-ratio: 16 / 9; }

/* Privacy band */
.privacy-band { display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 4vw, 48px); align-items: center; max-width: 920px; margin: 0 auto; }
.privacy-band .seal { width: clamp(110px, 14vw, 150px); height: auto; color: var(--gold-400); }
.privacy-band h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); margin-bottom: 14px; }
.privacy-band p { color: var(--on-green-muted); font-size: 1.08rem; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; padding: 0; list-style: none; }
.chips li { border: 1px solid rgba(226, 194, 125, 0.45); color: var(--gold-200); border-radius: 999px; padding: 5px 14px; font-size: 0.9rem; font-weight: 500; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 400px)); gap: 28px; justify-content: center; }
.plan { position: relative; background: var(--cream-50); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-card); border: 1px solid var(--rule); display: flex; flex-direction: column; }
.plan-head { padding: 30px 30px 24px; text-align: center; position: relative; }
.plan-free .plan-head { color: var(--on-green); background: var(--green-800) var(--cloth) center/cover; background-image: linear-gradient(rgba(23, 61, 46, 0.82), rgba(23, 61, 46, 0.82)), var(--cloth); }
.plan-pro .plan-head { color: var(--green-950); background: linear-gradient(160deg, var(--gold-200), var(--gold-400) 45%, var(--gold-600)); }
.plan-pro { border-color: var(--gold-500); }
.plan-head h3 { font-size: 2rem; }
.plan-price { font-family: var(--serif); font-size: 1.15rem; margin-top: 6px; opacity: 0.9; }
.plan-body { padding: 26px 30px 30px; flex: 1; display: flex; flex-direction: column; }
.plan-body .ticks { margin: 0 0 24px; }
.plan-body .appstore { align-self: center; margin-top: auto; }
.plan .ribbon { right: 26px; top: -4px; height: 64px; width: 26px; }
.fine { text-align: center; color: var(--muted); font-size: 0.9rem; margin-top: 28px; }

/* FAQ */
.faq { max-width: 780px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq details:first-child { border-top: 1px solid var(--rule); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 44px 20px 0; position: relative; font-weight: 600; font-size: 1.08rem; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--green-800); border-bottom: 2px solid var(--green-800); transform: translateY(-70%) rotate(45deg); transition: transform 0.2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq .answer { padding: 0 0 22px; color: var(--ink-2); }
.faq .answer p:last-child { margin-bottom: 0; }

/* Final call to action */
.cta { text-align: center; }
.cta img.icon-lg { width: 112px; height: 112px; border-radius: 26px; margin: 0 auto 26px; box-shadow: 0 20px 40px -14px rgba(0, 0, 0, 0.55); }
.cta h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin-bottom: 14px; }
.cta p { color: var(--on-green-muted); margin-bottom: 30px; font-size: 1.1rem; }

/* ---------- Interior pages ---------- */
.page-hero { padding: 138px 0 64px; text-align: center; }
.page-hero h1 { font-size: clamp(2.3rem, 5.4vw, 3.8rem); }
.page-hero p { color: var(--on-green-muted); margin: 16px auto 0; max-width: 620px; font-size: 1.1rem; }
.page-hero .ribbon { left: 10%; bottom: -56px; }
.page-body { padding: clamp(48px, 7vw, 88px) 0 clamp(64px, 9vw, 110px); }
.prose { max-width: 760px; margin: 0 auto; background: var(--cream-50); border: 1px solid var(--rule); border-radius: 20px; padding: clamp(28px, 5vw, 56px); box-shadow: var(--shadow-card); }
.prose h2 { font-size: 1.6rem; margin: 2.2em 0 0.6em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-family: var(--sans); font-size: 1.08rem; font-weight: 700; margin: 1.6em 0 0.4em; letter-spacing: 0; }
.prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.45em; }
.prose li::marker { color: var(--gold-600); }
.prose .meta { color: var(--muted); font-size: 0.95rem; }
.prose .summary { background: var(--cream-100); border-left: 4px solid var(--green-800); border-radius: 0 12px 12px 0; padding: 18px 22px; margin: 0 0 2em; }
.prose .summary p:last-child { margin: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: 0.97rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose th { font-weight: 600; color: var(--ink-2); background: var(--cream-100); }
.table-scroll { overflow-x: auto; }

.contact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 1000px; margin: 0 auto clamp(48px, 7vw, 80px); }
.contact-card { background: var(--cream-50); border: 1px solid var(--rule); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-card); }
.contact-card .icon { width: 36px; height: 36px; color: var(--green-800); margin-bottom: 14px; }
.contact-card h2 { font-size: 1.3rem; margin-bottom: 8px; }
.contact-card p { color: var(--ink-2); font-size: 0.97rem; margin-bottom: 12px; }
.contact-card a.button { display: inline-block; }
.button { background: var(--green-800); color: var(--on-green) !important; text-decoration: none; font-weight: 600; padding: 10px 18px; border-radius: 10px; font-size: 0.97rem; }
.button:hover { background: var(--green-900); }
.faq-group + .faq-group { margin-top: 48px; }
.faq-group > h2 { font-size: 1.5rem; margin: 0 auto 14px; max-width: 780px; }

/* Press kit */
.press-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; margin: 18px 0 8px; }
.press-item { background: var(--cream-100); border: 1px solid var(--rule); border-radius: 14px; padding: 12px; text-align: center; font-size: 0.9rem; }
.press-item img { margin: 0 auto 10px; border-radius: 8px; max-height: 260px; width: auto; }
.press-item a { font-weight: 600; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 0 0 1em; }
.facts dt { font-weight: 600; color: var(--ink-2); }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* 404 */
.notfound { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 120px var(--gutter) 80px; }
.notfound .big { font-family: var(--serif); font-size: clamp(5rem, 16vw, 9rem); line-height: 1; }
.notfound p { color: var(--on-green-muted); font-size: 1.15rem; margin: 18px 0 28px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-950); color: var(--on-green-muted); padding: 64px 0 36px; font-size: 0.95rem; position: relative; }
.site-footer::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--gold-rule); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.site-footer .brand { color: var(--on-green); margin-bottom: 14px; }
.site-footer h2 { font-family: var(--sans); font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-300); margin-bottom: 14px; font-weight: 700; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--on-green); text-decoration: none; }
.site-footer a:hover { color: var(--gold-300); }
.legal { margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(226, 194, 125, 0.2); font-size: 0.82rem; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.legal p { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid-cards { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .contact-cards { grid-template-columns: 1fr; max-width: 560px; }
}
@media (max-width: 820px) {
  .nav { gap: 12px; }
  .nav-links, .nav > .lang { display: none; }
  .nav .appstore { margin-left: auto; padding: 6px 11px 6px 9px; }
  .nav .appstore small { font-size: 0.58rem; }
  .nav .appstore strong { font-size: 0.98rem; }
  .nav .appstore svg { width: 17px; height: 20px; }
  .menu { display: block; position: relative; }
  .menu summary { list-style: none; cursor: pointer; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--rule); }
  .menu summary::-webkit-details-marker { display: none; }
  .menu summary svg { width: 20px; height: 20px; color: var(--ink); }
  .menu ul { position: absolute; right: 0; top: 50px; min-width: 210px; list-style: none; margin: 0; padding: 8px; background: var(--cream-50); border: 2px solid var(--gold-500); border-radius: 14px; box-shadow: 0 20px 40px -16px rgba(0, 0, 0, 0.45); }
  .menu li a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 500; }
  .menu li a:hover { background: var(--cream-200); }
  .steps ol { grid-template-columns: 1fr; gap: 22px; padding: 36px 0; }
  .story, .story.flip { grid-template-columns: 1fr; }
  .story.flip .story-art { order: 0; }
  .story-art picture { transform: scale(1.1); }
  .plans { grid-template-columns: minmax(0, 440px); }
  .privacy-band { grid-template-columns: 1fr; text-align: center; }
  .privacy-band .seal { margin: 0 auto; }
  .chips { justify-content: center; }
  .hero-art .closed { width: 52%; left: 0; }
  .hero-art .open { width: 72%; }
  .hero .ribbon { right: 8%; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .brand span { font-size: 1.22rem; }
  .grid-cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding-top: 112px; }
  .page-hero { padding-top: 118px; }
  .hero-art { height: 64vw; }
  .hero .eyebrow { margin-bottom: 16px; }
  .hero .lede { margin: 18px auto 26px; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 10px; }
}
@media (max-width: 440px) {
  .nav .appstore { display: none; }
  .menu { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* Inline icons inside text links */
.prose a .icon, .press-item a .icon { display: inline-block; width: 1em; height: 1em; vertical-align: -0.15em; margin-right: 4px; }
