/* =========================================================================
   Digital Guestbook: marketing site
   Aesthetic: "heirloom editorial". Warm paper, espresso ink, a single
   terracotta accent, fine gold hairlines, characterful serif display.
   Plain CSS, no build step. Server-rendered for SEO/AEO.
   ========================================================================= */

:root {
  --paper:    #faf5ec;
  --paper-2:  #f3ebdb;
  --paper-3:  #ede2cd;
  --ink:      #2b2018;
  --ink-2:    #6f6253;
  --ink-3:    #97897a;
  --accent:   #b4543a;
  --accent-2: #8f3f2c;
  --gold:     #be9e5e;
  --line:     rgba(43, 32, 24, 0.14);
  --line-2:   rgba(43, 32, 24, 0.08);

  --display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --body:    Georgia, "Iowan Old Style", "Times New Roman", serif;

  --maxw: 1140px;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --radius: 4px;

  --shadow-sm: 0 1px 2px rgba(43, 32, 24, 0.06), 0 4px 14px rgba(43, 32, 24, 0.05);
  --shadow-md: 0 6px 18px rgba(43, 32, 24, 0.08), 0 22px 48px rgba(43, 32, 24, 0.10);
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--body);
  font-size: clamp(1.02rem, 0.55vw + 0.92rem, 1.18rem);
  line-height: 1.66;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(60rem 40rem at 82% -10%, rgba(190, 158, 94, 0.16), transparent 60%),
    radial-gradient(48rem 36rem at -8% 4%, rgba(180, 84, 58, 0.10), transparent 55%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Fine paper grain over everything. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.5;
  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='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
}

img { max-width: 100%; height: auto; display: block; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  font-optical-sizing: auto;
}
h1 { font-size: clamp(2.6rem, 6vw + 0.5rem, 5rem); font-weight: 400; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.9rem, 3vw + 0.6rem, 2.9rem); }
h3 { font-size: clamp(1.25rem, 1vw + 0.95rem, 1.5rem); }
p  { margin: 0 0 1.1rem; }
a  { color: var(--accent-2); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
em { font-style: italic; }

.display-italic { font-style: italic; color: var(--accent); }

.eyebrow {
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.26em;
  color: var(--accent-2);
  margin: 0 0 1.2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}
.eyebrow::before {
  content: "";
  width: 1.8rem;
  height: 1px;
  background: var(--gold);
}

.lede {
  font-size: clamp(1.15rem, 0.8vw + 1rem, 1.4rem);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 38ch;
}

/* The "answer block" each page opens with (also great for AEO citation). */
.answer {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.3rem, 1.3vw + 1rem, 1.85rem);
  line-height: 1.42;
  color: var(--ink);
  max-width: 32ch;
}

/* ---------- Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
  position: relative;
  z-index: 2;
}
section { position: relative; z-index: 2; }
.section { padding-block: clamp(3.5rem, 8vw, 7rem); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* Ornamental divider */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--gold);
  margin-block: 0.5rem;
}
.ornament::before, .ornament::after {
  content: "";
  height: 1px;
  width: min(8rem, 22vw);
  background: linear-gradient(to var(--dir, right), transparent, var(--gold));
}
.ornament::after { --dir: left; }
.ornament span { font-family: var(--display); font-style: italic; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--display);
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}
.btn-primary {
  background: var(--accent);
  color: #fdf7ee;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--accent-2);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn .arrow { transition: transform 0.18s ease; }
.btn:hover .arrow { transform: translateX(3px); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-2);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand .mark { color: var(--accent); }
.nav { display: flex; align-items: center; gap: 1.9rem; }
.nav a:not(.btn) {
  font-family: var(--display);
  font-size: 1rem;
  color: var(--ink-2);
  text-decoration: none;
  position: relative;
}
.nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.22s ease;
}
.nav a:not(.btn):hover { color: var(--ink); }
.nav a:not(.btn):hover::after { width: 100%; }
.nav-cta { display: inline-flex; align-items: center; gap: 1.4rem; }
.nav-links { display: flex; gap: 1.9rem; }
@media (max-width: 820px) {
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .site-header__inner { gap: 0.6rem; }
  .brand { font-size: 1.05rem; gap: 0.4rem; white-space: nowrap; }
  .nav-cta a:not(.btn) { display: none; }   /* hide "Sign in"; reachable from the register page + footer */
  .nav-cta .btn-primary { padding: 0.55rem 0.95rem; font-size: 0.92rem; white-space: nowrap; }
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(3rem, 7vw, 6.5rem) clamp(2.5rem, 5vw, 4.5rem); }
.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
}
.hero h1 { margin-bottom: 1.4rem; }
.hero .lede { margin-bottom: 2rem; max-width: 46ch; }
.hero__meta {
  margin-top: 2.2rem;
  display: flex;
  gap: 2.2rem;
  flex-wrap: wrap;
  font-family: var(--display);
}
.hero__meta b { display: block; font-size: 1.5rem; color: var(--accent); font-weight: 600; }
.hero__meta span { font-size: 0.92rem; color: var(--ink-2); }

/* Signature card with self-drawing SVG */
.signature-card {
  background: linear-gradient(180deg, #fffdf8, var(--paper-2));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 2rem 1.8rem 1.4rem;
  box-shadow: var(--shadow-md);
  transform: rotate(-1.4deg);
  position: relative;
}
.signature-card::after {
  content: "";
  position: absolute;
  inset: 0.45rem;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  pointer-events: none;
}
.signature-card .label {
  font-family: var(--display);
  font-style: italic;
  color: var(--ink-3);
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
}
.signature-card svg { width: 100%; height: auto; color: var(--ink); overflow: visible; }
.signature-card .sig-path,
.signature-card .sig-flourish {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* Draws on, holds, then erases from the start for a seamless loop. */
.signature-card .sig-path {
  stroke-width: 3.4;
  stroke-dasharray: 2200;
  stroke-dashoffset: 2200;
  animation: sign 8s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}
.signature-card .sig-flourish {
  stroke-width: 2;
  stroke-dasharray: 760;
  stroke-dashoffset: 760;
  color: var(--accent);
  opacity: 0.85;
  animation: sign-flourish 8s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}
.signature-card .sig-name {
  text-align: right;
  font-family: var(--display);
  font-style: italic;
  color: var(--ink-2);
  margin: 0.4rem 0.2rem 0;
  font-size: 0.95rem;
}
@keyframes sign {
  0%   { stroke-dashoffset: 2200; }
  42%  { stroke-dashoffset: 0; }
  74%  { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -2200; }
}
@keyframes sign-flourish {
  0%, 34% { stroke-dashoffset: 760; }
  54%     { stroke-dashoffset: 0; }
  74%     { stroke-dashoffset: 0; }
  100%    { stroke-dashoffset: -760; }
}

/* ---------- Steps (how it works) ---------- */
.steps { display: grid; gap: 2.5rem; counter-reset: step; }
.steps--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 820px) { .steps--3 { grid-template-columns: 1fr; } }
.step { position: relative; padding-top: 1.4rem; border-top: 2px solid var(--ink); }
.step__num {
  font-family: var(--display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 0.8rem;
}
.step h3 { margin-bottom: 0.4rem; }
.step p { color: var(--ink-2); margin: 0; }

/* ---------- Feature grid ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
@media (max-width: 900px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .features-grid { grid-template-columns: 1fr; } }
.feature {
  background: var(--paper-2);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  padding: 1.7rem 1.6rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--line);
}
.feature .ic {
  width: 2.6rem; height: 2.6rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 12%, var(--paper));
  color: var(--accent-2);
  margin-bottom: 1.1rem;
}
.feature .ic svg { width: 1.35rem; height: 1.35rem; }
.feature h3 { font-size: 1.22rem; margin-bottom: 0.35rem; }
.feature p { color: var(--ink-2); margin: 0; font-size: 0.98rem; }
.feature--wide { grid-column: span 2; }
@media (max-width: 600px) { .feature--wide { grid-column: span 1; } }

/* ---------- Split / prose ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.prose { max-width: 62ch; }
.prose h2 { margin-top: 2.2rem; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.1rem; }
.prose li { margin-bottom: 0.5rem; }
.prose--narrow { margin-inline: auto; }

/* Quote / card panel */
.panel {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(1.8rem, 4vw, 3rem);
  box-shadow: var(--shadow-sm);
}
.pullquote {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.4rem, 2vw + 1rem, 2.1rem);
  line-height: 1.34;
  color: var(--ink);
}
.pullquote cite { display: block; font-size: 1rem; font-style: normal; color: var(--ink-2); margin-top: 1rem; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 70ch; margin-inline: auto; }
.faq {
  border-top: 1px solid var(--line);
}
.faq:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 1.3rem 2.5rem 1.3rem 0;
  font-family: var(--display);
  font-size: clamp(1.1rem, 1vw + 0.9rem, 1.35rem);
  color: var(--ink);
  position: relative;
  transition: color 0.18s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent-2); }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.2rem; top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  color: var(--accent);
  transition: transform 0.2s ease;
}
.faq[open] summary::after { content: "\2013"; }
.faq__a { padding: 0 2.5rem 1.5rem 0; color: var(--ink-2); margin: 0; }

/* ---------- CTA band ---------- */
.cta-band {
  background:
    radial-gradient(40rem 30rem at 80% 120%, rgba(190,158,94,0.22), transparent 60%),
    var(--ink);
  color: var(--paper);
  border-radius: 12px;
  padding: clamp(2.5rem, 6vw, 4.5rem);
  text-align: center;
}
.cta-band h2 { color: var(--paper); }
.cta-band p { color: rgba(250,245,236,0.78); max-width: 46ch; margin-inline: auto; }
.cta-band .btn-ghost { color: var(--paper); border-color: rgba(250,245,236,0.4); }
.cta-band .btn-ghost:hover { border-color: var(--paper); }
.cta-band .btn-row { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: clamp(2.5rem, 5vw, 4rem) 2rem;
  margin-top: clamp(2rem, 6vw, 5rem);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 2rem;
}
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-brand .brand { margin-bottom: 0.8rem; }
.footer-brand p { color: var(--ink-2); max-width: 30ch; font-style: italic; }
.footer-col h4 {
  font-family: var(--display);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink-3);
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 0.6rem; }
.footer-col a { color: var(--ink-2); text-decoration: none; font-size: 0.98rem; }
.footer-col a:hover { color: var(--accent-2); }
.footer-base {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-2);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.88rem;
  color: var(--ink-3);
}

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }
.mt-0 { margin-top: 0; }
.measure { max-width: 60ch; }
.measure-narrow { max-width: 44ch; }
.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 1rem; top: 1rem;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
}

/* ---------- Load reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: reveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.reveal-1 { animation-delay: 0.05s; }
.reveal-2 { animation-delay: 0.18s; }
.reveal-3 { animation-delay: 0.31s; }
.reveal-4 { animation-delay: 0.44s; }
@keyframes reveal { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-delay: 0s !important; scroll-behavior: auto; }
  .sig-path, .sig-flourish {
    animation: none !important;
    stroke-dashoffset: 0 !important;
  }
  .reveal { opacity: 1; transform: none; }
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* =========================================================================
   Romantic / botanical layer
   ========================================================================= */

/* Sprig divider */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  color: var(--gold);
  margin-block: clamp(2rem, 5vw, 3.5rem);
}
.divider__line {
  height: 1px;
  flex: 1;
  max-width: 14rem;
  background: linear-gradient(to var(--dir, right), transparent, color-mix(in srgb, var(--gold) 70%, transparent));
}
.divider__line:last-child { --dir: left; }
.divider__sprig { color: var(--gold); flex: none; }

/* Botanical branch accent */
.flourish { color: color-mix(in srgb, var(--accent) 42%, var(--gold)); opacity: 0.5; }
.hero { overflow: clip; }
.hero__grid { position: relative; }
.flourish--hero {
  position: absolute;
  top: -2.6rem;
  right: -2.2rem;
  width: clamp(90px, 12vw, 150px);
  height: auto;
  transform: rotate(8deg);
  pointer-events: none;
  z-index: 0;
}
.signature-card { z-index: 1; }
@media (max-width: 900px) { .flourish--hero { display: none; } }

/* Illuminated drop cap for opening answer blocks */
.dropcap::first-letter {
  font-family: var(--display);
  font-weight: 500;
  font-style: normal;
  initial-letter: 3;
  -webkit-initial-letter: 3;
  float: left;
  line-height: 0.8;
  font-size: 3.4em;
  padding: 0.06em 0.12em 0 0;
  color: var(--accent);
}

/* Invitation-style double-rule frame */
.frame { position: relative; }
.frame::before {
  content: "";
  position: absolute;
  inset: 0.7rem;
  border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent);
  border-radius: inherit;
  pointer-events: none;
}
.cta-band.frame::before { inset: 0.8rem; border-color: rgba(190, 158, 94, 0.5); }

/* Softer, warmer cards */
.feature { border-radius: 10px; }
.panel { border-radius: 12px; }

/* Decorative corner accents on panels */
.panel { position: relative; }
.panel::before,
.panel::after {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  border: 1px solid var(--gold);
  opacity: 0.6;
}
.panel::before { top: 0.7rem; left: 0.7rem; border-right: 0; border-bottom: 0; }
.panel::after { bottom: 0.7rem; right: 0.7rem; border-left: 0; border-top: 0; }
