/* ==========================================================================
   Square & True Bookkeeping — site styles
   Design tokens lifted from the Square & True design canvas.
   ========================================================================== */

:root {
  --bg:          #F4F0E8;
  --white:       #FFFFFF;
  --ink:         #1D2420;
  --muted:       #4F5750;
  --accent:      #A8481C;
  --accent-dk:   #7E3412;
  --green:       #23392D;
  --green-dk:    #1B2D23;
  --green-line:  #4A6353;
  --peach:       #E9B48F;
  --mist:        #D3DBD4;
  --line:        #D9D2C4;
  --line-soft:   #E8E2D6;

  --gutter: clamp(20px, 6.5vw, 96px);
  --section-y: clamp(64px, 9vw, 112px);
  --maxw: 1440px;

  --display: 'Archivo', system-ui, sans-serif;
  --body: 'Public Sans', system-ui, -apple-system, sans-serif;
}

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

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

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

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

a { color: var(--accent); }
a:hover { color: var(--accent-dk); }

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

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px; top: 16px;
  z-index: 100;
  background: var(--ink); color: var(--bg);
  padding: 12px 20px; border-radius: 4px;
  text-decoration: none;
}

/* ---------- type ---------- */

.display {
  font-family: var(--display);
  font-stretch: 75%;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.98;
  letter-spacing: -0.5px;
  margin: 0;
}

h1.display { font-size: clamp(42px, 6.6vw, 96px); }
h2.display { font-size: clamp(32px, 4.4vw, 60px); }
h3.display { font-size: clamp(26px, 2.6vw, 36px); }

.eyebrow {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}
.eyebrow--light { color: var(--peach); }

.lede {
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.55;
  color: var(--muted);
  max-width: 60ch;
  margin: 0;
}

.muted { color: var(--muted); }
.small { font-size: 15px; }

/* Placeholder text you still need to fill in. Search the repo for "ph-" */
.ph {
  background: #FBE7D8;
  border-bottom: 2px dotted var(--accent);
  padding: 0 4px;
  font-weight: 600;
  overflow-wrap: break-word;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 32px;
  border-radius: 4px;
  font-size: 17px;
  font-weight: 600;
  font-family: var(--body);
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dk); color: #fff; }
.btn--ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: var(--bg); }
.btn--sm { min-height: 48px; padding: 0 24px; font-size: 16px; }
.btn--block { width: 100%; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

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

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 20px;
  padding-bottom: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}
.brand svg { width: 40px; height: 40px; flex-shrink: 0; }
.brand__name {
  font-family: var(--display);
  font-stretch: 75%;
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(15px, 1.7vw, 22px);
  letter-spacing: 0.5px;
  line-height: 1.1;
}
.nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.4vw, 36px);
  font-size: 16px;
  font-weight: 500;
}
.nav a { color: var(--ink); text-decoration: none; }
.nav a:hover { color: var(--accent); }
.nav a.btn { color: #fff; }

@media (max-width: 860px) {
  .site-header__inner { flex-wrap: wrap; }
  .nav { width: 100%; flex-wrap: wrap; gap: 14px 20px; font-size: 15px; }
}

/* ---------- sections ---------- */

.section { padding-top: var(--section-y); padding-bottom: var(--section-y); }
.section--white {
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section--green { background: var(--green); color: var(--bg); }
.section--green .lede,
.section--green p { color: var(--mist); }

.section__head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 860px;
  margin-bottom: 48px;
}

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.split--top { align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } }

.stack { display: flex; flex-direction: column; gap: 28px; }
.stack--sm { gap: 16px; }

.grid-3, .grid-4 {
  display: grid;
  gap: clamp(20px, 2.4vw, 32px);
}
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px)  { .grid-3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px)  { .grid-4 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- cards ---------- */

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: clamp(24px, 2.6vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.card--raised { box-shadow: 0 24px 48px -24px rgba(29, 36, 32, 0.25); }
.card--outline { background: transparent; border-color: var(--green-line); }
.card h3 { margin: 0; font-size: 23px; font-weight: 700; line-height: 1.3; }
.card p { margin: 0; color: var(--muted); line-height: 1.6; }
.card__num {
  font-family: var(--display);
  font-stretch: 80%;
  font-weight: 800;
  font-size: 44px;
  color: var(--accent);
  line-height: 1;
}
.card__foot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  font-size: 16px;
  font-weight: 600;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top: 4px solid var(--ink);
  padding-top: 24px;
}
.step__label { font-size: 15px; font-weight: 700; color: var(--accent); }
.step h3 { margin: 0; font-size: 22px; font-weight: 700; }
.step p { margin: 0; color: var(--muted); font-size: 16px; }

.pill-row { display: flex; flex-wrap: wrap; gap: 12px; }
.pill {
  padding: 12px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 16px;
  font-weight: 500;
}

/* ---------- product cards (templates page) ---------- */

.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.product {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.product__tag {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
}
.product h3 { margin: 0; font-size: 21px; font-weight: 700; line-height: 1.3; }
.product p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.55; flex-grow: 1; }
.product__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}
.product__price {
  font-family: var(--display);
  font-stretch: 80%;
  font-weight: 800;
  font-size: 30px;
  color: var(--green);
}
.product--feature { border: 2px solid var(--accent); }

/* ---------- lists ---------- */

.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.checklist li { display: flex; gap: 14px; align-items: flex-start; }
.checklist li::before {
  content: "";
  width: 12px; height: 12px;
  border-radius: 6px;
  background: var(--accent);
  margin-top: 8px;
  flex-shrink: 0;
}
.checklist strong { display: block; font-size: 18px; }
.checklist span { color: var(--muted); font-size: 15px; line-height: 1.5; }

.numbered { display: flex; flex-direction: column; }
.numbered__row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.numbered__n {
  font-family: var(--display);
  font-stretch: 75%;
  font-weight: 800;
  font-size: 30px;
  color: var(--accent);
  width: 34px;
  flex-shrink: 0;
}
.numbered__t { font-size: 18px; font-weight: 600; }

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 56px;
}
@media (max-width: 860px) { .faq-grid { grid-template-columns: minmax(0, 1fr); } }
.faq { display: flex; flex-direction: column; gap: 10px; padding-top: 20px; border-top: 1px solid var(--line); }
.faq h3 { margin: 0; font-size: 20px; font-weight: 700; }
.faq p { margin: 0; color: var(--muted); font-size: 17px; }

.detail { display: flex; flex-direction: column; gap: 6px; padding: 18px 0; border-top: 1px solid var(--green-line); }
.detail h4 { margin: 0; font-size: 19px; font-weight: 700; }
.detail p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--mist); }

/* ---------- forms ---------- */

.form { display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 17px; font-weight: 600; color: var(--ink); }
.field input,
.field select,
.field textarea {
  min-height: 54px;
  padding: 0 16px;
  border: 2px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  font-size: 17px;
  font-family: var(--body);
  color: var(--ink);
  width: 100%;
}
.field textarea { min-height: 130px; padding: 14px 16px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: none; }
.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
@media (max-width: 640px) { .field-row { grid-template-columns: minmax(0, 1fr); } }
.form__note { font-size: 14px; color: var(--muted); }

/* honeypot */
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; }

/* ---------- callouts ---------- */

.callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  padding: 24px 32px;
  background: var(--green-dk);
  border-radius: 6px;
  margin-top: 40px;
}
.callout__title {
  font-family: var(--display);
  font-stretch: 75%;
  font-weight: 800;
  font-size: 24px;
  text-transform: uppercase;
  color: var(--peach);
  flex: 1 1 260px;
}
.callout p { margin: 0; flex: 1 1 320px; }

.band {
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-top: 48px;
  padding-bottom: 48px;
}
.band__inner { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(24px, 4vw, 48px); }
.band__title {
  font-family: var(--display);
  font-stretch: 80%;
  font-weight: 700;
  font-size: 22px;
  text-transform: uppercase;
  flex: 0 0 auto;
  max-width: 280px;
}

.cta { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 28px; }
.cta h2 { max-width: 16ch; }
.cta .lede { max-width: 48ch; }

/* ---------- metric mock ---------- */

.meter { display: flex; flex-direction: column; gap: 6px; }
.meter__head { display: flex; justify-content: space-between; font-size: 15px; }
.meter__track { height: 10px; background: var(--line-soft); border-radius: 5px; overflow: hidden; }
.meter__fill { height: 10px; background: var(--green); border-radius: 5px; }
.meter__fill--over { background: var(--accent); }
.stat {
  padding: 16px;
  background: var(--bg);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat__label { font-size: 13px; color: var(--muted); }
.stat__value { font-size: 26px; font-weight: 700; }
.stat-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

.photo-slot {
  min-height: 420px;
  background: var(--line-soft);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  padding: 24px;
}

.price-tag {
  font-family: var(--display);
  font-stretch: 75%;
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(40px, 6vw, 88px);
  color: var(--green);
  line-height: 1;
  overflow-wrap: break-word;
}

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

.site-footer {
  background: var(--ink);
  color: var(--mist);
  padding-top: 48px;
  padding-bottom: 48px;
  font-size: 15px;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
}
.site-footer a { color: var(--peach); }
.site-footer__name {
  font-family: var(--display);
  font-stretch: 75%;
  font-weight: 800;
  font-size: 20px;
  text-transform: uppercase;
  color: var(--bg);
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }

/* Narrow screens: display type must wrap, never overflow. */
.display, .band__title, .callout__title { overflow-wrap: break-word; }
.products { grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); }

/* Very narrow phones: the wordmark must shrink with the viewport, not clip it. */
@media (max-width: 400px) {
  .brand { flex-shrink: 1; min-width: 0; }
  .brand__name { font-size: 14px; min-width: 0; }
  .brand svg { width: 32px; height: 32px; }
}

/* Phone nav: keep the call-to-action on a line of its own rather than
   letting it strand a single link beside it. */
@media (max-width: 520px) {
  .nav { justify-content: flex-start; }
  .nav a.btn { width: 100%; margin-top: 4px; }
}
