/* ============================================
   Scribble and Save — Design System
   Concept: a household ledger / working notebook.
   The site behaves like a page you'd actually
   write your numbers and plans on — ruled lines,
   circled totals, checked-off boxes.
   ============================================ */

:root {
  /* Color */
  --paper: #F1EEE3;
  --paper-raised: #FBF9F3;
  --ink: #1C2321;
  --ink-soft: #46514E;
  --teal: #44BDB4;
  --pine: #1F5C56;
  --pine-dark: #163F3B;
  --gold: #B8862E;
  --gold-soft: #E4C77E;
  --clay: #A6503F;
  --rule: #D3CCB9;
  --rule-strong: #B7AF97;

  /* Type */
  --display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --hand: "Caveat", cursive;
  --body: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --content-width: 1100px;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

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

/* Faint ledger-line texture across the whole page */
body {
  background-image: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 37px,
    rgba(179, 172, 148, 0.35) 38px
  );
  background-attachment: local;
}

img, svg { max-width: 100%; display: block; }

a {
  color: var(--pine);
  text-decoration-color: var(--rule-strong);
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.08;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.6rem, 5vw, 4.4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; color: var(--ink-soft); }

.container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 32px;
}

.eyebrow {
  font-family: var(--hand);
  font-size: 1.4rem;
  color: var(--clay);
  display: inline-block;
  transform: rotate(-2deg);
  margin-bottom: 0.4em;
}

/* Hand-drawn circle used to mark the one word that matters most.
   Real content stays selectable text; the mark is decorative SVG. */
.circle-mark {
  position: relative;
  white-space: nowrap;
}
.circle-mark svg {
  position: absolute;
  left: -8%;
  top: -18%;
  width: 116%;
  height: 145%;
  overflow: visible;
  pointer-events: none;
}
.circle-mark path {
  fill: none;
  stroke: var(--clay);
  stroke-width: 3.5;
  stroke-linecap: round;
}

/* ---------- Header / nav ---------- */
.site-header {
  border-bottom: 2px solid var(--ink);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 22px;
  padding-bottom: 18px;
}

.brand {
  font-family: var(--display);
  font-size: 1.7rem;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand img.brand-icon {
  height: 40px;
  width: auto;
  display: block;
}
.brand .brand-mark {
  font-family: var(--hand);
  color: var(--pine);
  font-size: 1.3rem;
  transform: rotate(-4deg);
  display: inline-block;
}

/* Full logo used as a small "wax seal" stamp tucked onto the hero notebook */
.logo-stamp {
  position: absolute;
  bottom: -22px;
  right: -18px;
  width: 132px;
  background: var(--teal);
  padding: 12px 14px 10px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  box-shadow: 4px 4px 0 var(--ink);
  transform: rotate(-6deg);
}
.logo-stamp img { width: 100%; height: auto; }

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-logo img { height: 44px; width: auto; }

nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0;
}

nav.main-nav a {
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  text-decoration: none;
  position: relative;
  padding: 4px 2px;
}

nav.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
nav.main-nav a:hover::after,
nav.main-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}
nav.main-nav a[aria-current="page"] {
  color: var(--pine-dark);
}

.nav-toggle { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 13px 26px;
  border-radius: 3px;
  text-decoration: none;
  border: 2px solid var(--ink);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background: var(--pine);
  color: var(--paper-raised);
  border-color: var(--pine-dark);
  box-shadow: 3px 3px 0 var(--ink);
}
.btn-primary:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--ink);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--rule-strong);
}
.btn-ghost:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--rule-strong);
}

/* ---------- Hero ---------- */
.hero {
  padding: 78px 0 60px;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.hero-copy p.lede {
  font-size: 1.2rem;
  max-width: 46ch;
}
.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 30px;
  flex-wrap: wrap;
}

/* Illustration card standing in for a photo */
.notebook-card {
  position: relative;
  background: var(--paper-raised);
  border: 2px solid var(--ink);
  border-radius: 4px;
  box-shadow: 8px 8px 0 var(--pine);
  padding: 28px;
  transform: rotate(1.3deg);
}
.notebook-card svg { width: 100%; height: auto; }
.notebook-caption {
  font-family: var(--hand);
  font-size: 1.15rem;
  color: var(--pine-dark);
  text-align: center;
  margin-top: 10px;
  transform: rotate(-1deg);
}

/* ---------- Ledger strip (Time / Money / Energy) ---------- */
.ledger {
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  background: var(--paper-raised);
}
.ledger .container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.ledger-item {
  padding: 34px 28px;
  border-left: 1px dashed var(--rule-strong);
}
.ledger-item:first-child { border-left: none; }
.ledger-item .label {
  font-family: var(--hand);
  font-size: 1.6rem;
  color: var(--clay);
  margin-bottom: 6px;
  display: block;
}
.ledger-item p { margin: 0; font-size: 0.98rem; }

/* ---------- Generic sections ---------- */
.section { padding: 76px 0; }
.section-tight { padding: 50px 0; }
.section-alt { background: var(--paper-raised); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }

.section-head {
  max-width: 60ch;
  margin-bottom: 44px;
}

/* ---------- Cards / grids ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.card {
  background: var(--paper-raised);
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  padding: 30px;
  position: relative;
}
.card .check {
  position: absolute;
  top: -14px;
  right: -10px;
  width: 40px;
  height: 40px;
  transform: rotate(6deg);
}

.stat-line {
  display: flex;
  align-items: baseline;
  gap: 14px;
  border-bottom: 1px dashed var(--rule-strong);
  padding: 14px 0;
}
.stat-line:last-child { border-bottom: none; }
.stat-line .num {
  font-family: var(--display);
  font-size: 1.6rem;
  color: var(--pine-dark);
  min-width: 2.4ch;
}

/* ---------- Testimonials ---------- */
.testimonial {
  background: var(--paper-raised);
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  padding: 34px;
  box-shadow: 6px 6px 0 var(--rule-strong);
}
.testimonial p.quote {
  font-family: var(--display);
  font-size: 1.35rem;
  color: var(--ink);
  line-height: 1.4;
}
.testimonial .who {
  font-family: var(--hand);
  font-size: 1.25rem;
  color: var(--clay);
  margin-top: 10px;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--pine);
  color: var(--paper-raised);
  padding: 64px 0;
  text-align: center;
}
.cta-band h2 { color: var(--paper-raised); }
.cta-band p { color: rgba(251, 249, 243, 0.85); max-width: 50ch; margin-left: auto; margin-right: auto; }
.cta-band .btn-primary {
  background: var(--gold);
  border-color: var(--paper-raised);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--paper-raised);
}
.cta-band .btn-primary:hover { box-shadow: 5px 5px 0 var(--paper-raised); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 2px solid var(--ink);
  padding: 44px 0 34px;
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-tagline {
  font-family: var(--hand);
  font-size: 1.5rem;
  color: var(--pine-dark);
}
.footer-nav {
  list-style: none;
  display: flex;
  gap: 22px;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
}
.footer-nav a { color: var(--ink-soft); text-decoration: none; }
.footer-nav a:hover { color: var(--pine-dark); }
.footer-fine {
  width: 100%;
  font-size: 0.82rem;
  color: var(--rule-strong);
  margin-top: 18px;
}

/* ---------- Page hero (interior pages) ---------- */
.page-hero {
  padding: 56px 0 44px;
  border-bottom: 2px solid var(--ink);
}
.page-hero .eyebrow { margin-bottom: 0.2em; }
.page-hero p.lede { max-width: 60ch; font-size: 1.1rem; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(14px);
    animation: rise 0.7s ease forwards;
  }
  @keyframes rise {
    to { opacity: 1; transform: translateY(0); }
  }
}

/* ---------- Focus states ---------- */
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
  .notebook-card { max-width: 420px; margin: 0 auto; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .ledger .container { grid-template-columns: 1fr; }
  .ledger-item { border-left: none; border-top: 1px dashed var(--rule-strong); }
  .ledger-item:first-child { border-top: none; }
}

@media (max-width: 680px) {
  nav.main-nav ul { gap: 18px; flex-wrap: wrap; }
  .site-header .container { flex-direction: column; align-items: flex-start; gap: 14px; }
  .hero { padding: 44px 0 40px; }
  .section { padding: 54px 0; }
  .container { padding: 0 20px; }
}
