:root { --brand: #059669; --brand-dark: #047857; --paper: #F6F8F5; --ink: #0F172A; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Figtree", system-ui, sans-serif; font-size: 18px; line-height: 1.6; }
h1, h2, h3, .wordmark { font-family: "Bricolage Grotesque", system-ui, sans-serif; letter-spacing: -0.02em; line-height: 1.1; margin: 0; }
h1 { font-size: clamp(2.6rem, 7vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 2.6rem); }
h3 { font-size: 1.3rem; }
p { margin: 0; }
a { color: var(--brand-dark); }
:focus-visible { outline: 3px solid var(--brand-dark); outline-offset: 3px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; margin: 0 auto; padding: 0 20px; }
.muted { opacity: 0.75; } .small { font-size: 0.9rem; }
section[id] { scroll-margin-top: 80px; }

.skip { position: absolute; left: -999px; background: #fff; padding: 12px; }
.skip:focus { left: 16px; top: 16px; z-index: 50; }
#site-header { position: sticky; top: 0; z-index: 20; background: rgba(246, 248, 245, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(15, 23, 42, 0.1); }
.bar { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; padding-bottom: 12px; }
.wordmark { font-size: 1.6rem; font-weight: 700; color: var(--ink); text-decoration: none; }
.wordmark span { color: var(--brand); }
.brand-lockup { display: inline-flex; align-items: center; gap: 10px; }
.logo-img { height: 36px; width: 36px; object-fit: contain; }
.bar a { text-decoration: none; }
#site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 4px; padding: 16px 20px; background: var(--paper); border-bottom: 1px solid rgba(15, 23, 42, 0.1); }
#site-nav.open { display: flex; }
#site-nav a { color: var(--ink); font-weight: 500; padding: 10px 16px; border-radius: 999px; }
#site-nav a:hover { background: rgba(5, 150, 105, 0.1); }
.menu-btn { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid rgba(15, 23, 42, 0.25); background: none; font: inherit; font-weight: 500; color: var(--ink); cursor: pointer; }
@media (min-width: 768px) {
  .menu-btn { display: none; }
  #site-nav { display: flex; position: static; flex-direction: row; padding: 0; border: 0; background: none; }
}

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 28px; border-radius: 999px; font-weight: 600; text-decoration: none; transition: filter 0.2s, background 0.2s; }
.btn-primary { background: var(--brand-dark); color: #fff; box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15); }
.btn-primary:hover { filter: brightness(1.1); }
.btn-outline { border: 2px solid var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper); }
.btn-pending { border: 2px dashed var(--brand); color: var(--brand-dark); text-align: center; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.hero { display: grid; gap: 48px; align-items: center; padding-top: 48px; padding-bottom: 80px; }
@media (min-width: 768px) { .hero { grid-template-columns: 1.25fr 1fr; padding-top: 80px; } }
.hero-copy { animation: rise 0.6s ease-out both; }
.pill { display: inline-block; padding: 6px 16px; border-radius: 999px; background: rgba(5, 150, 105, 0.12); color: var(--brand-dark); font-size: 0.9rem; font-weight: 600; margin-bottom: 24px; }
.hero-copy p.lead { margin-top: 24px; max-width: 34rem; font-size: 1.2rem; opacity: 0.8; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.phone { width: 100%; max-width: 260px; aspect-ratio: 9 / 19; margin: 0 auto; border: 10px solid var(--ink); border-radius: 40px; background: var(--ink); box-shadow: 0 20px 40px rgba(15, 23, 42, 0.25); overflow: hidden; }
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 30px; display: block; }
.phone-empty { height: 100%; display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px; background: var(--paper); border-radius: 30px; font-size: 0.9rem; font-weight: 500; opacity: 0.85; }

.block { padding: 80px 0; }
.block.white { background: #fff; }
.block.dark { background: var(--ink); color: var(--paper); text-align: center; }
.block.dark p { margin-top: 20px; opacity: 0.85; }
.block h2 + * { margin-top: 40px; }
.block.dark h2 + p { margin-top: 20px; }
.grid4 { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid3 { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.card { background: var(--paper); border: 1px solid rgba(15, 23, 42, 0.1); border-radius: 24px; padding: 24px; box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06); }
.card p { margin-top: 12px; opacity: 0.8; }
#about-text p + p { margin-top: 20px; }
.center { display: flex; justify-content: center; margin-top: 32px; }

.page { padding-top: 64px; padding-bottom: 80px; }
.page h1 { font-size: clamp(2.2rem, 6vw, 3.2rem); }
.page h2 { font-size: 1.6rem; margin-top: 40px; }
.page h2 + p, .page h1 + p { margin-top: 12px; }
.page p { opacity: 0.85; }
.notice { margin-top: 24px; padding: 16px; border-radius: 16px; border: 1px solid rgba(5, 150, 105, 0.4); background: rgba(5, 150, 105, 0.1); font-size: 0.95rem; }
.panel { margin-top: 40px; padding: 24px; background: #fff; border: 1px solid rgba(15, 23, 42, 0.1); border-radius: 24px; box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06); }
.faq { margin-top: 16px; background: #fff; border: 1px solid rgba(15, 23, 42, 0.1); border-radius: 24px; }
.faq details { padding: 20px; }
.faq details + details { border-top: 1px solid rgba(15, 23, 42, 0.1); }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin-top: 12px; }
.page .btn { margin-top: 20px; }
.errpage { text-align: center; padding-top: 96px; padding-bottom: 96px; }

footer { background: #fff; border-top: 1px solid rgba(15, 23, 42, 0.1); padding: 40px 0; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; font-weight: 500; }
.foot a { color: var(--ink); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .hero-copy { animation: none; } .btn { transition: none; } }

/* ---------- Motion ---------- */
@keyframes reveal-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-12px) rotate(1deg); } }
@keyframes drop-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.35); } 70%, 100% { box-shadow: 0 0 0 12px rgba(5, 150, 105, 0); } }

/* Header */
#site-header { transition: box-shadow 0.3s ease, background 0.3s ease; }
#site-header.scrolled { box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08); }
#site-nav.open { animation: drop-in 0.2s ease-out; }
#site-nav a { transition: background 0.2s ease, color 0.2s ease; }
.menu-btn { transition: background 0.2s ease, border-color 0.2s ease; }
.menu-btn:hover { background: rgba(15, 23, 42, 0.06); }
.logo-img { transition: transform 0.3s ease; }
.bar > a:hover .logo-img { transform: rotate(-8deg) scale(1.06); }

/* Buttons */
.btn { transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, background 0.2s ease, color 0.2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn-primary:hover { box-shadow: 0 8px 20px rgba(4, 120, 87, 0.35); }
.btn-pending { animation: pulse-ring 2.4s ease-out infinite; }

/* Hero entrance: copy staggers in, phone floats */
.hero-copy { animation: none; }
.hero-copy > * { animation: reveal-up 0.7s ease-out both; }
.hero-copy > :nth-child(2) { animation-delay: 0.12s; }
.hero-copy > :nth-child(3) { animation-delay: 0.24s; }
#hero-phone { animation: reveal-up 0.8s 0.3s ease-out both; }
#hero-phone .phone { animation: float 6s 1.2s ease-in-out infinite; }

/* Cards and phones */
.card { transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease; }
.card:hover { transform: translateY(-5px); box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12); border-color: rgba(5, 150, 105, 0.45); }
#preview-grid .phone { transition: transform 0.3s ease, box-shadow 0.3s ease; }
#preview-grid .phone:hover { transform: translateY(-8px) scale(1.02); box-shadow: 0 28px 50px rgba(15, 23, 42, 0.3); }

/* Links and FAQ */
a { transition: color 0.2s ease; }
.foot a { transition: color 0.2s ease; }
.foot a:hover { color: var(--brand-dark); }
.faq summary { transition: color 0.2s ease; }
.faq summary:hover { color: var(--brand-dark); }
.faq details[open] > p { animation: drop-in 0.25s ease-out; }

/* Scroll reveal (class added by main.js only when motion is allowed) */
.reveal { opacity: 0; }
.reveal.in { opacity: 1; animation: reveal-up 0.7s ease-out var(--d, 0s) backwards; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; }
}