/* ============================================================
   Snaile — design system
   Aesthetic: warm "archival safety net". Paper ivory, deep ink,
   a moss-green snail-trail that threads the page as a timeline.
   Display: Fraunces · Body: Spline Sans · Mono: Spline Sans Mono
   ============================================================ */

:root {
  --paper:      #f3ecdd;
  --paper-2:    #ece2cf;
  --paper-card: #f8f3e9;
  --ink:        #1b1610;
  --ink-soft:   #5b5142;
  --ink-faint:  #8a7e6b;
  --moss:       #2f6b44;
  --moss-deep:  #1d4a2d;
  --moss-bright:#3f8e5b;
  --amber:      #bf6b29;
  --line:       rgba(27, 22, 16, 0.12);
  --line-soft:  rgba(27, 22, 16, 0.07);
  --shadow:     0 1px 0 rgba(255,255,255,.6) inset, 0 18px 40px -24px rgba(27,22,16,.45);
  --shadow-lg:  0 30px 70px -40px rgba(27,22,16,.6);
  --radius:     18px;
  --radius-sm:  11px;
  --maxw:       1140px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body:   "Spline Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono:   "Spline Sans Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  letter-spacing: .01em;
  overflow-x: hidden;
  /* paper grain + soft moss glow top-left */
  background-image:
    radial-gradient(1200px 600px at 12% -8%, rgba(63,142,91,.16), transparent 60%),
    radial-gradient(900px 500px at 110% 4%, rgba(191,107,41,.10), transparent 55%);
  background-attachment: fixed;
}

/* grain overlay */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: .35; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; position: relative; z-index: 2; }

/* ---------- typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 540;
  font-optical-sizing: auto;
  line-height: 1.04;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--moss-deep);
  display: inline-flex; align-items: center; gap: .6em;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--moss); display: inline-block; }

.lead { font-size: 1.22rem; color: var(--ink-soft); max-width: 46ch; }

/* ---------- buttons ---------- */
.btn {
  --bg: var(--ink); --fg: var(--paper);
  font-family: var(--font-body);
  font-weight: 600; font-size: .98rem;
  display: inline-flex; align-items: center; gap: .55em;
  padding: .82em 1.4em;
  border-radius: 999px;
  background: var(--bg); color: var(--fg);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s, background .2s;
  box-shadow: 0 10px 24px -14px rgba(27,22,16,.7);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -16px rgba(27,22,16,.7); }
.btn:active { transform: translateY(0); }
.btn--moss { --bg: var(--moss); --fg: #f6f3e9; }
.btn--ghost {
  --bg: transparent; --fg: var(--ink);
  border-color: var(--line); box-shadow: none;
  backdrop-filter: blur(4px);
}
.btn--ghost:hover { border-color: var(--ink); background: rgba(27,22,16,.04); }
.btn svg { width: 1.05em; height: 1.05em; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(10px) saturate(120%);
  background: linear-gradient(var(--paper), rgba(243,236,221,.72));
  border-bottom: 1px solid var(--line-soft);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: .6em; font-family: var(--font-display); font-weight: 600; font-size: 1.32rem; letter-spacing: -.02em; }
.brand .mark { width: 34px; height: 34px; color: var(--moss); flex: none; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: .95rem; color: var(--ink-soft); transition: color .2s; position: relative; }
.nav-links a:hover { color: var(--ink); }
.nav-links a::after { content:""; position:absolute; left:0; bottom:-6px; height:1.5px; width:0; background:var(--moss); transition:width .25s; }
.nav-links a:hover::after { width:100%; }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.menu-toggle { display: none; }

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(56px, 9vw, 130px) 0 clamp(40px, 6vw, 90px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 70px); align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 5.1rem); font-weight: 560; }
.hero h1 em { font-style: italic; color: var(--moss); font-weight: 500; }
.hero .lead { margin-top: 1.4rem; font-size: clamp(1.06rem, 1.8vw, 1.3rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 2.2rem; }
.hero-note { margin-top: 1.4rem; font-family: var(--font-mono); font-size: .8rem; color: var(--ink-faint); letter-spacing: .02em; }

/* ---------- trust bar (DSGVO) ---------- */
.trustbar { border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); background: rgba(248,243,233,.55); }
.trustbar .wrap { display: flex; flex-wrap: wrap; gap: 12px 30px; align-items: center; justify-content: center; padding: 18px 28px; }
.trustbar .tb { display: inline-flex; align-items: center; gap: .5em; font-family: var(--font-mono); font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.trustbar .tb svg { width: 1.15em; height: 1.15em; color: var(--moss); flex: none; }
/* DSGVO seal in privacy section */
.dsgvo-seal { display: inline-flex; align-items: center; gap: .55em; margin-top: 1.4rem; padding: .5em 1em; border: 1px solid var(--moss); border-radius: 999px; color: var(--moss-deep); font-family: var(--font-mono); font-size: .8rem; letter-spacing: .04em; background: rgba(47,107,68,.06); }
.dsgvo-seal svg { width: 1.2em; height: 1.2em; }

/* staggered entrance */
.reveal { opacity: 0; transform: translateY(18px); animation: rise .9s cubic-bezier(.2,.7,.2,1) forwards; }
.d1{animation-delay:.05s} .d2{animation-delay:.16s} .d3{animation-delay:.27s} .d4{animation-delay:.38s} .d5{animation-delay:.5s}
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce){ .reveal{animation:none;opacity:1;transform:none} }

/* hero visual: a stylized history timeline window */
.window {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: rotate(.6deg);
}
.window:hover { transform: rotate(0); transition: transform .5s; }
.window-bar { display: flex; align-items: center; gap: 7px; padding: 13px 16px; border-bottom: 1px solid var(--line-soft); background: linear-gradient(var(--paper-card), var(--paper-2)); }
.window-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.window-bar i:nth-child(1){ background:#d98b6a } .window-bar i:nth-child(2){ background:#dcb45f } .window-bar i:nth-child(3){ background:#7bb083 }
.window-bar span { margin-left: 10px; font-family: var(--font-mono); font-size: .72rem; color: var(--ink-faint); }
.window-body { padding: 22px 22px 26px; }
.tl { list-style: none; position: relative; padding-left: 30px; }
.tl::before { content:""; position:absolute; left:8px; top:6px; bottom:6px; width:2px; background:linear-gradient(var(--moss-bright), var(--moss-deep)); border-radius:2px; }
.tl li { position: relative; padding: 11px 0; }
.tl li::before { content:""; position:absolute; left:-26px; top:16px; width:12px; height:12px; border-radius:50%; background:var(--paper-card); border:2px solid var(--moss); }
.tl li.pin::before { background: var(--moss); box-shadow: 0 0 0 4px rgba(47,107,68,.18); }
.tl .t { font-family: var(--font-mono); font-size: .72rem; color: var(--ink-faint); letter-spacing: .04em; }
.tl .ev { font-weight: 600; font-size: .98rem; }
.tl .tag { font-family: var(--font-mono); font-size: .68rem; padding: .15em .6em; border-radius: 999px; border: 1px solid var(--line); color: var(--moss-deep); margin-left: .5em; vertical-align: middle; }
.tl .restore-btn { margin-top: 14px; }

/* ---------- section scaffolding ---------- */
section { position: relative; padding: clamp(56px, 8vw, 110px) 0; }
.section-head { max-width: 64ch; }
.section-head h2 { font-size: clamp(2rem, 4.4vw, 3.3rem); margin-top: .8rem; }
.section-head p { margin-top: 1.1rem; color: var(--ink-soft); font-size: 1.12rem; }

/* divider trail */
.trail-divider { height: 80px; position: relative; }
.trail-divider svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.trail-divider path { fill: none; stroke: var(--moss); stroke-width: 2; stroke-dasharray: 3 9; stroke-linecap: round; opacity: .5; }

/* ---------- problem band ---------- */
.band { background: var(--ink); color: var(--paper); border-radius: 26px; }
.band .wrap { padding: clamp(40px,6vw,76px) 36px; }
.band h2 { color: var(--paper); font-size: clamp(1.9rem,4vw,3rem); max-width: 22ch; }
.band h2 em { color: var(--moss-bright); font-style: italic; }
.band p { color: rgba(243,236,221,.72); margin-top: 1.2rem; max-width: 52ch; font-size: 1.1rem; }
.band .eyebrow { color: var(--moss-bright); }
.band .eyebrow::before { background: var(--moss-bright); }

/* ---------- features ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 52px; }
.card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px 30px;
  box-shadow: var(--shadow);
  transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card .ico { width: 44px; height: 44px; color: var(--moss); margin-bottom: 18px; }
.card h3 { font-size: 1.34rem; }
.card p { margin-top: .6rem; color: var(--ink-soft); font-size: 1rem; }
.card.span2 { grid-column: span 2; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 26px; margin-top: 52px; counter-reset: step; }
.step { position: relative; padding-top: 30px; }
.step::before {
  counter-increment: step; content: counter(step,decimal-leading-zero);
  font-family: var(--font-mono); font-size: .82rem; color: var(--moss-deep);
  border: 1px solid var(--moss); border-radius: 999px; padding: .35em .8em;
  position: absolute; top: -10px; left: 0; background: var(--paper);
}
.step h3 { font-size: 1.4rem; margin-bottom: .5rem; }
.step p { color: var(--ink-soft); }
.step .line { height: 2px; background: repeating-linear-gradient(90deg, var(--moss) 0 4px, transparent 4px 12px); margin: 18px 0; opacity: .5; }

/* ---------- pricing ---------- */
.prices { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-top: 52px; align-items: stretch; }
.price {
  display: flex; flex-direction: column;
  background: var(--paper-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px 28px; box-shadow: var(--shadow);
}
.price.featured { background: var(--ink); color: var(--paper); border-color: var(--ink); transform: translateY(-10px); box-shadow: var(--shadow-lg); }
.price.featured h3, .price.featured .amount { color: var(--paper); }
.price.featured .muted { color: rgba(243,236,221,.6); }
.price.featured .feat li { color: rgba(243,236,221,.86); }
.price.featured .feat li::before { color: var(--moss-bright); }
.price .badge { align-self: flex-start; font-family: var(--font-mono); font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; padding: .3em .7em; border-radius: 999px; background: var(--moss); color: #f3ece0; margin-bottom: 14px; }
.price h3 { font-size: 1.5rem; }
.price .amount { font-family: var(--font-display); font-size: 2.9rem; font-weight: 560; margin-top: 10px; line-height: 1; }
.price .amount small { font-family: var(--font-mono); font-size: .82rem; font-weight: 400; color: var(--ink-faint); letter-spacing: .02em; }
.price.featured .amount small { color: rgba(243,236,221,.6); }
.price .muted { color: var(--ink-faint); font-size: .92rem; margin-top: 6px; min-height: 2.6em; }
.feat { list-style: none; margin: 22px 0 26px; display: grid; gap: 11px; }
.feat li { position: relative; padding-left: 28px; font-size: .96rem; color: var(--ink-soft); }
.feat li::before { content: "↺"; position: absolute; left: 0; top: -1px; color: var(--moss); font-weight: 700; }
.price .btn { margin-top: auto; width: 100%; justify-content: center; }
.price .ideal { font-size: .85rem; color: var(--ink-faint); margin: 2px 0 18px; font-style: italic; }
.price.featured .ideal { color: rgba(243,236,221,.6); }
.feat .hint { font-family: var(--font-mono); font-size: .72rem; color: var(--ink-faint); white-space: nowrap; }
.price.featured .feat .hint { color: rgba(243,236,221,.55); }
.price.featured .btn--moss { --bg: var(--moss-bright); --fg: #16240f; }

/* ---------- privacy strip ---------- */
.privacy { display: grid; grid-template-columns: 1.1fr .9fr; gap: 50px; align-items: center; }
.privacy .keys { display: grid; gap: 14px; }
.keyrow { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper-card); }
.keyrow svg { width: 26px; height: 26px; color: var(--moss); flex: none; margin-top: 2px; }
.keyrow b { display: block; }
.keyrow span { color: var(--ink-soft); font-size: .96rem; }

/* ---------- faq ---------- */
.faq { display: grid; gap: 12px; margin-top: 44px; max-width: 820px; }
details.qa { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper-card); padding: 4px 22px; transition: border-color .2s; }
details.qa[open] { border-color: var(--moss); }
.qa summary { cursor: pointer; list-style: none; padding: 18px 0; font-family: var(--font-display); font-size: 1.16rem; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; font-family: var(--font-mono); font-size: 1.5rem; color: var(--moss); transition: transform .25s; }
.qa[open] summary::after { transform: rotate(45deg); }
.qa p { padding: 0 0 20px; color: var(--ink-soft); }

/* ---------- final CTA ---------- */
.cta-final { text-align: center; }
.cta-final h2 { font-size: clamp(2.2rem,5vw,3.8rem); max-width: 18ch; margin: 0 auto; }
.cta-final h2 em { color: var(--moss); font-style: italic; }
.cta-final .hero-actions { justify-content: center; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 30px; padding: 56px 0 40px; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; }
.foot-grid p { color: var(--ink-soft); font-size: .95rem; margin-top: 12px; max-width: 34ch; }
.foot-col h4 { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 14px; }
.foot-col a { display: block; color: var(--ink-soft); padding: 5px 0; font-size: .96rem; transition: color .2s; }
.foot-col a:hover { color: var(--moss-deep); }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line-soft); font-size: .86rem; color: var(--ink-faint); font-family: var(--font-mono); letter-spacing: .02em; }

/* ---------- legal pages ---------- */
.legal { padding-top: 60px; }
.legal .wrap { max-width: 820px; }
.legal h1 { font-size: clamp(2.2rem,5vw,3.2rem); }
.legal h2 { font-size: 1.5rem; margin: 2.2rem 0 .6rem; }
.legal h3 { font-size: 1.15rem; margin: 1.4rem 0 .4rem; }
.legal p, .legal li { color: var(--ink-soft); margin-bottom: .8rem; }
.legal ul { padding-left: 1.3rem; }
.legal a { color: var(--moss-deep); text-decoration: underline; text-underline-offset: 3px; }
.todo { background: rgba(191,107,41,.12); border: 1px dashed var(--amber); color: #7a3f10; border-radius: 8px; padding: 2px 8px; font-family: var(--font-mono); font-size: .85em; }
.legal .back { display: inline-flex; gap: .4em; align-items: center; font-family: var(--font-mono); font-size: .85rem; color: var(--moss-deep); margin-bottom: 20px; }

/* ---------- billing pages ---------- */
.billing { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 80px 0; }
.billing .panel { max-width: 560px; background: var(--paper-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 44px 38px; box-shadow: var(--shadow-lg); }
.billing .seal { width: 64px; height: 64px; margin: 0 auto 22px; color: var(--moss); }
.billing h1 { font-size: 2.2rem; }
.billing p { color: var(--ink-soft); margin-top: 12px; }
.token-box { margin: 24px 0 8px; }
.token-box label { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }
.token { display: flex; gap: 8px; margin-top: 8px; }
.token input { flex: 1; font-family: var(--font-mono); font-size: .9rem; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); }
.steps-mini { text-align: left; margin: 20px 0; padding-left: 1.2rem; color: var(--ink-soft); }
.steps-mini li { margin-bottom: 8px; }
.muted-note { font-family: var(--font-mono); font-size: .78rem; color: var(--ink-faint); margin-top: 18px; }

/* ---------- responsive ---------- */
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero .window { max-width: 520px; margin-top: 10px; }
  .features, .steps, .prices { grid-template-columns: 1fr; }
  .card.span2 { grid-column: auto; }
  .price.featured { transform: none; }
  .privacy { grid-template-columns: 1fr; gap: 28px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .nav-links { display: none; }
  .foot-grid { grid-template-columns: 1fr; }
  body { font-size: 16px; }
}
