:root {
  --color-bg: #FDF6F0;
  --color-bg-raised: #FFFFFF;
  --color-ink: #3A2A22;
  --color-brand: #7D5A50;
  --color-brand-deep: #5C4038;
  --color-accent: #7C8363;
  --color-accent-soft: #EDEFE4;
  --color-line: #E8DDD1;
  --color-muted: #8A7A6E;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-accent: 'Caveat', cursive;

  --text-display-xl: clamp(2.75rem, 5vw + 1rem, 4.5rem);
  --text-display-l: clamp(2rem, 3vw + 1rem, 3rem);
  --text-display-m: clamp(1.5rem, 2vw + 0.5rem, 2rem);
  --text-body-l: 1.125rem;
  --text-caption: 0.875rem;
  --text-micro: 0.75rem;

  --radius-button: 8px;
  --radius-card: 12px;
  --radius-pill: 999px;

  --shadow-card: 0 1px 2px rgba(58, 42, 34, 0.04), 0 8px 24px rgba(58, 42, 34, 0.06);

  --container-max: 1120px;
  --container-padding: clamp(1.25rem, 4vw, 3rem);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

p { max-width: 60ch; }
a { color: inherit; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: var(--radius-button);
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
  cursor: pointer;
}
.btn-sm { padding: 9px 18px; font-size: var(--text-caption); }
.btn-primary { background: var(--color-brand); color: var(--color-bg); border: 1.5px solid var(--color-brand); }
.btn-primary:hover { background: var(--color-brand-deep); border-color: var(--color-brand-deep); }
.btn-secondary { background: transparent; color: var(--color-brand); border: 1.5px solid var(--color-brand); }
.btn-secondary:hover { background: rgba(125, 90, 80, 0.06); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(253, 246, 240, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 88px;
}
.brand { display: flex; margin-right: auto; }
.brand img { height: 44px; width: auto; }
.nav {
  display: flex;
  gap: 28px;
  font-size: var(--text-caption);
  letter-spacing: 0.02em;
}
.nav a { text-decoration: none; color: var(--color-muted); transition: color 160ms ease; }
.nav a:hover { color: var(--color-ink); }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(3rem, 6vw, 5.5rem) clamp(2.5rem, 5vw, 4rem); }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.eyebrow {
  font-size: var(--text-caption);
  letter-spacing: 0.04em;
  color: var(--color-accent);
  font-variant: small-caps;
  margin-bottom: 14px;
}
.hero-copy h1 { font-size: var(--text-display-xl); margin-bottom: 20px; }
.hero-copy .lead { font-size: var(--text-body-l); color: var(--color-muted); margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-viewer { position: relative; }
.viewer {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  border-radius: var(--radius-card);
  background:
    radial-gradient(120% 120% at 50% 20%, #FFFFFF 0%, #F6ECE3 60%, #EFE3D8 100%);
  border: 1px solid var(--color-line);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
}
.viewer:active { cursor: grabbing; }
.viewer canvas { display: block; width: 100% !important; height: 100% !important; }

.viewer-loading, .viewer-error {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--color-muted);
  font-size: var(--text-caption);
  text-align: center;
  padding: 24px;
}
.spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--color-line);
  border-top-color: var(--color-brand);
  animation: spin 800ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.viewer-hint {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  font-size: var(--text-micro);
  letter-spacing: 0.03em;
  color: var(--color-muted);
  background: rgba(253, 246, 240, 0.75);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  pointer-events: none;
  transition: opacity 400ms ease;
}

/* ---------- Ribbon divider ---------- */
.ribbon-divider {
  color: var(--color-brand);
  opacity: 0.28;
  max-width: var(--container-max);
  margin: clamp(3rem, 7vw, 6rem) auto;
  padding-inline: var(--container-padding);
}
.ribbon-divider svg { width: 100%; height: 48px; display: block; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(3rem, 7vw, 6rem); }
.section-raised { background: var(--color-bg-raised); border-block: 1px solid var(--color-line); }
.section-head { max-width: 46ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head h2 { font-size: var(--text-display-l); margin-bottom: 12px; }
.section-head p { color: var(--color-muted); font-size: var(--text-body-l); }

/* ---------- Features ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 3vw, 2rem);
}
.feature {
  background: var(--color-bg-raised);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-card);
  padding: 28px 24px;
  box-shadow: var(--shadow-card);
}
.feature:nth-child(2) { transform: translateY(-14px); }
.feature-icon { width: 40px; height: 40px; color: var(--color-brand); margin-bottom: 16px; }
.feature h3 { font-size: var(--text-display-m); margin-bottom: 8px; }
.feature p { font-size: var(--text-caption); color: var(--color-muted); }

/* ---------- Guarantee ---------- */
.guarantee-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 3vw, 2rem);
}
.guarantee-card {
  border: 1px solid var(--color-line);
  border-radius: var(--radius-card);
  padding: 26px 24px;
  background: var(--color-bg);
}
.guarantee-card h3 { font-size: 1.25rem; margin-bottom: 10px; color: var(--color-brand-deep); }
.guarantee-card p { font-size: var(--text-caption); color: var(--color-muted); }

/* ---------- Steps ---------- */
.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 3vw, 2rem);
}
.steps li { counter-increment: step; padding-top: 20px; border-top: 1.5px solid var(--color-line); }
.steps li::before {
  content: counter(step);
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--color-accent);
  display: block;
  margin-bottom: 10px;
}
.steps h3 { font-size: var(--text-display-m); margin-bottom: 6px; }
.steps p { font-size: var(--text-caption); color: var(--color-muted); }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--color-accent-soft);
  padding-block: clamp(3rem, 7vw, 5rem);
  text-align: center;
}
.cta-inner h2 { font-size: var(--text-display-l); margin-bottom: 10px; }
.cta-inner p { color: var(--color-muted); margin: 0 auto 26px; }

/* ---------- Footer ---------- */
.site-foot { background: var(--color-bg); border-top: 1px solid var(--color-line); }
.foot-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 40px 64px;
  align-items: flex-start;
  justify-content: space-between;
  padding-top: 64px;
  padding-bottom: 56px;
}
.foot-brand { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.foot-logo { height: 42px; opacity: 0.9; }
.foot-tagline { font-family: var(--font-accent); font-size: 1.4rem; color: var(--color-brand); }
.foot-copy { font-size: var(--text-micro); color: var(--color-muted); }
.foot-copy a { color: var(--color-muted); text-decoration: underline; text-underline-offset: 2px; }
.foot-copy a:hover { color: var(--color-brand); }

.foot-contact { display: flex; flex-direction: column; align-items: flex-start; }
.foot-q { font-size: var(--text-caption); color: var(--color-brand); margin-bottom: 6px; }
.foot-addr { font-size: var(--text-caption); color: var(--color-ink-muted, currentColor); margin-top: 10px; opacity: .8; }
.foot-walink {
  font-size: var(--text-body-l);
  color: var(--color-brand);
  text-decoration: underline;
  text-underline-offset: 4px;
  font-family: var(--font-display);
}
.foot-walink:hover { color: var(--color-brand-deep); }
.foot-follow { font-size: var(--text-micro); letter-spacing: 0.03em; color: var(--color-muted); margin: 24px 0 10px; }
.foot-social { display: flex; gap: 14px; }
.foot-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  color: var(--color-brand);
  transition: background 180ms ease, border-color 180ms ease;
}
.foot-social a:hover { background: rgba(125, 90, 80, 0.08); border-color: var(--color-brand); }

@media (max-width: 640px) {
  .foot-inner { flex-direction: column; align-items: flex-start; gap: 36px; }
}

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 600ms ease, transform 600ms ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-viewer { max-width: 420px; margin-inline: auto; width: 100%; }
  .feature-grid, .guarantee-grid, .steps { grid-template-columns: 1fr; }
  .feature:nth-child(2) { transform: none; }
  .nav { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .spinner { animation-duration: 2s; }
}
