/* Memory Calendar: shared tokens, landing page and legal pages. Warm paper and ink, a terracotta accent. */

:root {
  --paper: #f4eee3;
  --surface: #fffcf6;
  --sunk: #ebe3d5;
  --ink: #1e1a15;
  --muted: #675e52;
  --line: #ddd3c2;
  --accent: #b9472a;
  --accent-hover: #9e3b22;
  --accent-soft: #f3ddd2;
  --on-accent: #ffffff;
  --fb: #1877f2;
  --fb-hover: #0f63d6;
  --focus: #2457a6;
  --radius: 16px;
  --shadow: 0 1px 2px rgb(30 26 21 / 0.06), 0 10px 28px rgb(30 26 21 / 0.08);
  --display: 'Fraunces', Georgia, serif;
  --text: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #17140f;
    --surface: #221e18;
    --sunk: #2c271f;
    --ink: #f2ece1;
    --muted: #b0a698;
    --line: #3b352c;
    --accent: #e3794f;
    --accent-hover: #ee9068;
    --accent-soft: #3d2319;
    --on-accent: #1b110c;
    --focus: #8db3f0;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 10px 28px rgb(0 0 0 / 0.35);
    color-scheme: dark;
  }
}

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

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
}

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

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

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 50;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.display,
.headline {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.display {
  font-size: clamp(2.4rem, 5.2vw, 4.2rem);
}

.headline {
  font-size: clamp(1.8rem, 3.4vw, 2.7rem);
}

.lede {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1.15rem;
  max-width: 34em;
}

.fine {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: 600 0.95rem/1.2 var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.btn:hover {
  border-color: var(--ink);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-ink {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.btn-ink:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.btn-accent {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}

.btn-accent:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
}

.btn-fb {
  min-height: 50px;
  padding: 12px 22px;
  border-color: var(--fb);
  background: var(--fb);
  color: #fff;
  font-size: 1rem;
}

.btn-fb:hover {
  border-color: var(--fb-hover);
  background: var(--fb-hover);
}

.btn-fb svg {
  width: 20px;
  height: 20px;
}

.btn-quiet {
  background: transparent;
}

.text-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  margin-top: 30px;
}

/* ---------- header ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(10px);
}

.head-in {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  margin-right: auto;
}

.brand .logo {
  display: block;
  width: auto;
  height: 34px;
  border-radius: 6px;
}

.site-nav {
  display: flex;
  gap: 22px;
}

.site-nav a {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--ink);
}

.menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
}

.menu-lines,
.menu-lines::before,
.menu-lines::after {
  display: block;
  width: 16px;
  height: 2px;
  margin: auto;
  border-radius: 2px;
  background: var(--ink);
  content: '';
}

.menu-lines::before {
  transform: translateY(-5px);
}

.menu-lines::after {
  transform: translateY(3px);
}

@media (max-width: 760px) {
  .head-in {
    gap: 10px;
  }

  .menu-btn {
    display: grid;
  }

  .head-cta {
    min-height: 38px;
    padding: 7px 14px;
    font-size: 0.85rem;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    right: 12px;
    left: 12px;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 12px 14px;
    border-radius: 10px;
  }

  .site-nav a:hover {
    background: var(--sunk);
  }
}

/* ---------- landing ---------- */

.hero {
  padding: 56px 0 72px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 48px;
}

.hero-stage {
  position: relative;
  margin: 0;
  aspect-ratio: 5 / 6;
}

.hero-page {
  position: absolute;
  width: 74%;
}

.hero-page--front {
  left: 4%;
  top: 6%;
  transform: rotate(-2.5deg);
  z-index: 2;
}

.hero-page--back {
  right: 0;
  top: 0;
  transform: rotate(4deg);
  opacity: 0.92;
}

.hero-hook {
  position: absolute;
  left: 41%;
  top: 2.5%;
  z-index: 3;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 2px 4px rgb(0 0 0 / 0.3);
}

.section {
  padding: 72px 0;
  border-top: 1px solid var(--line);
}

.steps,
.formats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

.steps li,
.formats li {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.steps h3,
.formats h3 {
  margin: 10px 0 6px;
  font-size: 1.15rem;
}

.steps p,
.formats p {
  margin: 0;
  color: var(--muted);
}

.step-num {
  color: var(--accent);
  font-family: var(--display);
  font-size: 2.2rem;
  font-weight: 600;
  line-height: 1;
}

.format-shape {
  display: grid;
  align-items: end;
  justify-items: start;
  height: 120px;
}

.format-shape i {
  display: block;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: linear-gradient(var(--accent-soft) 0 58%, var(--surface) 58%);
}

.format-shape--a4 i { width: 70px; height: 99px; }
.format-shape--a3 i { width: 85px; height: 120px; }
.format-shape--a5 i { width: 99px; height: 70px; background: linear-gradient(90deg, var(--accent-soft) 0 50%, var(--surface) 50%); }

.closing {
  background: var(--sunk);
}

.closing-in {
  text-align: center;
}

.closing-in .headline {
  max-width: 18em;
  margin: 0 auto;
}

.closing-in .cta-row {
  justify-content: center;
}

@media (max-width: 900px) {
  .hero {
    padding-top: 36px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .hero-stage {
    width: min(100%, 440px);
    margin: 0 auto;
  }

  .steps,
  .formats {
    grid-template-columns: minmax(0, 1fr);
  }

  .section {
    padding: 56px 0;
  }
}

/* ---------- legal and company pages ---------- */

.doc {
  padding: 48px 0 72px;
}

.doc-wrap {
  max-width: 820px;
}

.doc-body {
  padding: 36px clamp(20px, 5vw, 48px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.doc-body h1 {
  margin: 0 0 24px;
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-align: left !important;
}

.doc-body h2,
.doc-body h3,
.doc-body h4 {
  margin: 32px 0 10px;
  line-height: 1.3;
}

.doc-body h3 {
  font-size: 1.25rem;
}

.doc-body h4 {
  font-size: 1.05rem;
}

.doc-body p,
.doc-body li {
  color: var(--muted);
}

.doc-body strong {
  color: var(--ink);
}

.doc-body a {
  color: var(--accent);
}

.doc-body ul,
.doc-body ol {
  padding-left: 1.3em;
}

.doc-body form {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.doc-body label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-weight: 600;
}

.doc-body input,
.doc-body textarea,
.doc-body select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}

.doc-body button[type='submit'],
.doc-body .btn-primary {
  justify-self: start;
  min-height: 44px;
  padding: 10px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font: 600 1rem var(--text);
  cursor: pointer;
}

.form-response.is-success {
  color: #2f7a46;
  font-weight: 600;
}

/* ---------- footer ---------- */

.site-foot {
  padding: 56px 0 28px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.92rem;
}

.foot-top {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.foot-brand p {
  max-width: 28em;
  color: var(--muted);
}

.footer-logo {
  display: block;
  width: auto;
  height: 36px;
  border-radius: 6px;
}

.site-foot h2 {
  margin: 0 0 10px;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-foot ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-foot li + li {
  margin-top: 6px;
}

.site-foot a {
  color: var(--muted);
  text-decoration: none;
}

.site-foot a:hover {
  color: var(--ink);
}

.foot-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.foot-bottom p,
.foot-bottom address {
  margin: 0;
  font-style: normal;
}

@media (max-width: 760px) {
  .foot-top {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .foot-brand {
    grid-column: 1 / -1;
  }
}
