/* WoodZen website. Colours match the app theme (src/theme/colors.ts). Static: no scripts, no external requests.
   Animations are CSS only: time-based for the hero, scroll-driven (animation-timeline: view()) for the rest where the browser supports it. */
@font-face { font-family: "Bevan"; src: url("/fonts/Bevan-Regular.de6eb69e.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Lato"; src: url("/fonts/Lato-Regular.c9fe8c1a.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Lato"; src: url("/fonts/Lato-Bold.96bf9bcc.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@property --n { syntax: "<integer>"; initial-value: 0; inherits: false; }

:root {
  --bg: #f4ebd9; --bg-deep: #e9dbc0; --surface: #fbf5e8;
  --frame: #6b4a2f; --frame-edge: #4e3420; --walnut: #3a2415; --ink: #2a1a0c;
  --accent: #b5651d; --accent-press: #9a5516; --text: #3b2a1a; --muted: #6b563f;
  --honey: #d9a15b; --honey-light: #f0c88a; --honey-deep: #a8742f;
  --radius: 22px;
  --shadow: 0 10px 28px rgba(42, 26, 12, 0.2);
  --shadow-soft: 0 3px 12px rgba(42, 26, 12, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body { min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; margin: 0; font-family: "Lato", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text); background: var(--bg); line-height: 1.65; font-size: 17px; }
img { max-width: 100%; display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-press); }
h1, h2, h3 { font-family: "Bevan", Georgia, serif; font-weight: 400; line-height: 1.12; margin: 0 0 12px; color: var(--text); }
h1 { font-size: clamp(46px, 9vw, 92px); letter-spacing: 0.01em; }
h1 span { color: var(--accent); }
h2 { font-size: clamp(28px, 4.6vw, 42px); }
h3 { font-size: clamp(20px, 2.6vw, 26px); }
p { margin: 0 0 14px; }
.wrap { width: min(1120px, 100% - 32px); margin: 0 auto; }
.wrap.narrow { max-width: 820px; }
.eyebrow { font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; font-size: 13px; color: var(--accent); margin: 0 0 10px; }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: rgba(244, 235, 217, 0.9); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(78, 52, 32, 0.12); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 62px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: "Bevan", Georgia, serif; font-size: 22px; color: var(--text); text-decoration: none; }
.brand svg { width: 34px; height: 30px; transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
.brand:hover svg { transform: rotate(-8deg) scale(1.08); }
.top nav { display: flex; gap: 22px; }
.top nav a { color: var(--muted); text-decoration: none; font-weight: 700; font-size: 15px; position: relative; padding: 4px 0; }
.top nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 3px; border-radius: 3px; background: var(--accent); transform: scaleX(0); transition: transform 0.25s; }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--accent); }
.top nav a:hover::after, .top nav a[aria-current="page"]::after { transform: scaleX(1); }

/* buttons */
.btn { position: relative; overflow: hidden; display: inline-block; background: var(--accent); color: #fbf5e8; text-decoration: none; font-weight: 700; font-size: 18px; padding: 15px 30px; border-radius: 16px; box-shadow: 0 5px 0 var(--accent-press), var(--shadow-soft); transition: transform 0.12s, box-shadow 0.12s, background 0.2s; }
.btn::after { content: ""; position: absolute; top: 0; left: 0; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent); transform: translateX(-250%) skewX(-20deg); animation: shine 4.5s ease-in-out 1.5s infinite; }
.btn:hover { color: #fbf5e8; background: #c06f26; transform: translateY(-2px); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--accent-press), var(--shadow-soft); }
.btn.secondary { background: var(--surface); color: var(--text); box-shadow: 0 5px 0 #dcc8a3, var(--shadow-soft); }
.btn.secondary::after { display: none; }
.btn.secondary:hover { color: var(--text); background: #fff9ec; }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 24px; }
.btn-row.center { justify-content: center; }
@keyframes shine { 0%, 55% { transform: translateX(-250%) skewX(-20deg); } 100% { transform: translateX(450%) skewX(-20deg); } }

/* hero */
.hero { position: relative; overflow: hidden; background: radial-gradient(900px 500px at 78% 30%, #ffe3b8 0%, transparent 60%), linear-gradient(180deg, #f6b97d 0%, #fad4a3 45%, #f4ebd9 100%); padding-bottom: 40px; }
.grain { position: absolute; inset: 0; pointer-events: none; opacity: 0.5; background: repeating-linear-gradient(0deg, transparent 0 46px, rgba(168, 116, 47, 0.1) 46px 48px), repeating-linear-gradient(90deg, transparent 0 220px, rgba(168, 116, 47, 0.06) 220px 222px); }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: 30px; padding: 56px 0 30px; }
.lead { font-size: clamp(18px, 2.2vw, 22px); color: #5a4430; max-width: 31em; }
.badges { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 26px 0 0; }
.badges li { background: rgba(251, 245, 232, 0.8); border: 1px solid rgba(78, 52, 32, 0.15); padding: 5px 14px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--muted); }
.wave { position: absolute; left: 0; bottom: -1px; width: 100%; height: 56px; display: block; }
.rise { animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both; }
.d1 { animation-delay: 0.1s; } .d2 { animation-delay: 0.22s; } .d3 { animation-delay: 0.34s; } .d4 { animation-delay: 0.46s; }
@keyframes rise { from { transform: translateY(34px); } to { transform: none; } }

.hero-visual { position: relative; display: grid; place-items: center; min-height: 520px; }
.phone.hero-phone { width: min(290px, 70vw); animation: phone-in 1.2s cubic-bezier(0.34, 1.4, 0.64, 1) 0.2s both, sway 7s ease-in-out 1.6s infinite; transform-origin: 50% 80%; }
@keyframes phone-in { from { transform: translateY(120px) rotate(6deg); } to { transform: rotate(-3deg); } }
@keyframes sway { 0%, 100% { transform: rotate(-3deg) translateY(0); } 50% { transform: rotate(-1deg) translateY(-12px); } }
.fl { position: absolute; border-radius: 18px; box-shadow: 0 6px 0 rgba(78, 52, 32, 0.28), var(--shadow-soft); animation: drop 1s cubic-bezier(0.34, 1.56, 0.64, 1) both, bob 5s ease-in-out infinite; }
.f1 { width: 74px; height: 74px; background: var(--honey); left: 2%; top: 14%; animation-delay: 0.5s, 1.6s; }
.f2 { width: 56px; height: 56px; background: #c98a4b; right: 0; top: 6%; animation-delay: 0.65s, 2s; animation-direction: normal, reverse; }
.f3 { width: 46px; height: 46px; background: #b8733f; left: 6%; bottom: 14%; animation-delay: 0.8s, 1.2s; }
.f4 { width: 64px; height: 64px; background: #e8c58f; right: 2%; bottom: 20%; animation-delay: 0.95s, 2.4s; animation-direction: normal, reverse; }
.f5 { width: 34px; height: 34px; background: var(--honey-deep); left: 44%; top: 0; animation-delay: 1.1s, 1.8s; }
@keyframes drop { from { transform: translateY(-300px) rotate(-30deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }

/* phone frame */
.phone { position: relative; width: 100%; aspect-ratio: 1080 / 2424; border-radius: 15% / 6.8%; border: 9px solid var(--ink); background: var(--ink); box-shadow: 0 0 0 2px #5a3d27, var(--shadow), 0 30px 60px rgba(42, 26, 12, 0.25); overflow: hidden; }
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 12% / 5.4%; }
.phone::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(115deg, rgba(255, 255, 255, 0.18) 0%, transparent 32%); pointer-events: none; }
.phone.small { border-width: 6px; }

/* stats */
.stats { padding: 20px 0 10px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; text-align: center; }
.stat { background: var(--surface); border-radius: var(--radius); padding: 22px 12px; box-shadow: var(--shadow-soft); }
.num { display: block; font-variant-numeric: tabular-nums; min-width: 2ch; font-family: "Bevan", Georgia, serif; font-size: clamp(36px, 6vw, 56px); line-height: 1; color: var(--accent); }
.num::before { content: attr(aria-label); }
.stat .label { display: block; margin-top: 8px; color: var(--muted); font-weight: 700; font-size: 15px; }

/* sections */
section { padding: 72px 0; }
section.alt { background: var(--surface); }
.section-head { max-width: 40em; margin-bottom: 34px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; counter-reset: s; }
.step { position: relative; background: linear-gradient(160deg, #7a5536, var(--frame)); color: #fbf5e8; border-radius: var(--radius); padding: 26px 24px 24px; border: 2px solid var(--frame-edge); box-shadow: var(--shadow); transition: transform 0.25s; }
.step:hover { transform: translateY(-6px) rotate(-0.6deg); }
.step::before { counter-increment: s; content: counter(s); font-family: "Bevan", Georgia, serif; font-size: 40px; color: var(--honey); display: block; line-height: 1; margin-bottom: 10px; }
.step h3 { color: #fbf5e8; font-size: 21px; }
.step p { margin: 0; color: #ead9ba; font-size: 16px; }

/* ribbon */
.ribbon { overflow: hidden; background: var(--walnut); border-block: 4px solid var(--frame-edge); padding: 14px 0; }
.ribbon .track { display: flex; width: max-content; animation: marquee 26s linear infinite; }
.ribbon span { font-family: "Bevan", Georgia, serif; font-size: clamp(22px, 4vw, 34px); color: var(--honey); padding: 0 26px; white-space: nowrap; }
.ribbon span::after { content: "\25A0"; color: var(--honey-deep); margin-left: 52px; font-size: 0.6em; vertical-align: middle; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* showcase rows */
.row { display: grid; grid-template-columns: 1fr 340px; align-items: center; gap: clamp(28px, 6vw, 80px); padding: 40px 0; }
.row.flip { grid-template-columns: 340px 1fr; }
.row.flip .row-visual { order: -1; }
.row-visual { justify-self: center; width: min(300px, 70vw); }
.row-visual .phone { transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
.row-visual:hover .phone { transform: rotate(2deg) scale(1.03); }
.row.flip .row-visual:hover .phone { transform: rotate(-2deg) scale(1.03); }
.ticks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 32px; color: var(--muted); font-weight: 700; font-size: 16px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 6px; background: var(--honey); border: 2px solid var(--honey-deep); box-shadow: 0 2px 0 var(--honey-deep); }
.ticks li::after { content: ""; position: absolute; left: 6px; top: 8px; width: 8px; height: 4px; border-left: 3px solid var(--frame-edge); border-bottom: 3px solid var(--frame-edge); transform: rotate(-45deg); }

/* modes */
.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.mode { background: var(--surface); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-soft); }
.mode h3 { margin-top: 14px; }
.mode p { color: var(--muted); margin: 0; }
.dots { display: flex; gap: 10px; height: 52px; align-items: flex-end; }
.dots i { width: 36px; height: 36px; border-radius: 10px; background: var(--honey); border-bottom: 5px solid var(--honey-deep); }
.dots[data-mode="full"] i { animation: hop 1.4s ease-in-out infinite; }
.dots[data-mode="full"] i:nth-child(2) { animation-delay: 0.2s; background: #c98a4b; }
.dots[data-mode="full"] i:nth-child(3) { animation-delay: 0.4s; background: #b8733f; }
.dots[data-mode="reduced"] i { animation: soft 3.6s ease-in-out infinite; }
.dots[data-mode="reduced"] i:nth-child(2) { animation-delay: 0.6s; background: #c98a4b; }
.dots[data-mode="reduced"] i:nth-child(3) { animation-delay: 1.2s; background: #b8733f; }
.dots[data-mode="off"] i:nth-child(2) { background: #c98a4b; }
.dots[data-mode="off"] i:nth-child(3) { background: #b8733f; }
@keyframes hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-14px); } }
@keyframes soft { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

/* gallery */
.gallery { display: flex; gap: 22px; overflow-x: auto; padding: 10px max(16px, calc((100vw - 1120px) / 2)) 30px; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--honey) transparent; }
.shot { flex: 0 0 auto; width: 210px; margin: 0; scroll-snap-align: center; transition: transform 0.3s; }
.shot:hover { transform: translateY(-8px); }
.shot figcaption { text-align: center; font-weight: 700; font-size: 14px; color: var(--muted); margin-top: 12px; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.card { background: var(--surface); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-soft); border-top: 5px solid var(--honey); transition: transform 0.25s, box-shadow 0.25s; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.card h3 { font-size: 21px; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }

/* faq */
details { background: var(--bg); border-radius: 14px; margin-bottom: 10px; box-shadow: var(--shadow-soft); overflow: hidden; }
section:not(.alt) details, .doc details { background: var(--surface); }
details summary { cursor: pointer; padding: 17px 20px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; transition: background 0.2s; }
details summary:hover { background: rgba(217, 161, 91, 0.12); }
details summary::after { content: "+"; color: var(--accent); font-size: 26px; line-height: 1; transition: transform 0.25s; }
details[open] summary::after { transform: rotate(45deg); }
details summary::-webkit-details-marker { display: none; }
details .answer { padding: 0 20px 18px; color: var(--muted); animation: open 0.3s ease; }
details .answer p:last-child { margin-bottom: 0; }
@keyframes open { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.more { margin-top: 20px; }

/* cta + footer */
.cta { position: relative; overflow: hidden; background: linear-gradient(160deg, #7a5536, var(--frame) 60%, var(--walnut)); color: #fbf5e8; text-align: center; padding: 90px 0; }
.cta h2 { color: #fbf5e8; }
.cta p { color: #ead9ba; max-width: 32em; margin: 0 auto 8px; }
.cta .grain { opacity: 0.35; }
.cta .wrap { position: relative; }
footer { margin-top: auto; background: var(--ink); color: #d8c4a0; padding: 36px 0 42px; font-size: 15px; }
footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
footer a { color: var(--honey-light); }
footer .small { opacity: 0.8; max-width: 34em; }

/* text pages (privacy, terms, support) */
.doc { padding: 44px 0 80px; max-width: 780px; }
.doc h1 { font-size: clamp(32px, 6vw, 48px); }
.doc h2 { font-size: 22px; margin-top: 36px; color: var(--frame); }
.doc .updated { font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 13px; color: var(--accent); }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.note { background: var(--surface); border-left: 5px solid var(--accent); padding: 14px 18px; border-radius: 0 14px 14px 0; box-shadow: var(--shadow-soft); margin: 18px 0; }
code { background: var(--bg-deep); padding: 1px 7px; border-radius: 6px; font-size: 0.92em; }

/* scroll-driven animations (progressive: content is visible without them) */
@supports (animation-timeline: view()) {
  .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
  .reveal-pop { animation: pop linear both; animation-timeline: view(); animation-range: entry 0% entry 70%; }
  .num::before { content: none; }
  .num { --n: 0; counter-reset: v var(--n); animation: count linear both; animation-timeline: view(); animation-range: entry 10% entry 90%; }
  .num::after { content: counter(v); }
  @keyframes reveal { from { opacity: 0; transform: translateY(46px); } to { opacity: 1; transform: none; } }
  @keyframes pop { from { opacity: 0; transform: translateY(70px) scale(0.9) rotate(4deg); } to { opacity: 1; transform: none; } }
  @keyframes count { from { --n: 0; } to { --n: var(--target); } }
}

/* tablet and phone */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); padding-top: 34px; text-align: center; }
  .lead { margin-inline: auto; }
  .btn-row, .badges { justify-content: center; }
  .hero-visual { min-height: 440px; order: -1; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .row, .row.flip { grid-template-columns: 1fr; text-align: center; padding: 26px 0; }
  .row .row-visual, .row.flip .row-visual { order: -1; }
  .ticks { justify-items: center; text-align: left; }
  section { padding: 54px 0; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .top nav { gap: 14px; }
  .top nav a { font-size: 14px; }
  .brand span { display: none; }
  .btn { padding: 14px 22px; font-size: 17px; }
  .hero-visual { min-height: 380px; }
  .shot { width: 170px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .reveal-pop { opacity: 1 !important; transform: none !important; }
  .rise, .btn::after { animation: none !important; }
  .num::before { content: attr(aria-label) !important; }
  .num::after { content: none !important; }
}

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--walnut); color: #fbf5e8; padding: 10px 16px; border-radius: 10px; text-decoration: none; font-weight: 700; }
.skip:focus { top: 12px; }
a:focus-visible, summary:focus-visible, .gallery:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
