/* ==========================================================================
   Verde Valley Photo Preservation
   Design system + site styles. Hand-written, no framework.

   Audience skews 40-80, so legibility is a hard requirement, not a nicety:
   18px body minimum, generous line-height, 48px tap targets throughout.

   All colour pairings below were contrast-checked against WCAG 2.2 AA.
   Ratios are recorded next to each token. Do not change a colour without
   re-checking the pairs it appears in.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Fonts — self-hosted variable subsets (latin only)
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'Fraunces';
  src: url('../fonts/fraunces-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Libre Franklin';
  src: url('../fonts/libre-franklin-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   2. Tokens
   -------------------------------------------------------------------------- */

:root {
  /* Colour. Ratios are against --paper unless stated. */
  --paper:       #FAF6EF;
  --paper-2:     #F1E9DB;
  --ink:         #1F1B16;  /* 15.89:1 */
  --ink-soft:    #574E44;  /*  7.56:1 */
  --pine:        #1E4A38;  /*  9.32:1 */
  --pine-deep:   #132F24;
  --terra:       #A6442A;  /*  5.60:1 */
  --terra-light: #D98A66;  /*  5.33:1 on --pine-deep */
  --line:        #E2D8C6;  /* decorative dividers only */
  --line-strong: #8C7C64;  /*  3.76:1 — used for input borders */
  --error:       #8E2C1B;  /*  7.02:1 */

  /* Type */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Libre Franklin', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --step--1: 1rem;
  --step-0:  1.125rem;                             /* 18px floor */
  --step-1:  clamp(1.25rem, 1.15rem + 0.5vw,  1.5rem);
  --step-2:  clamp(1.5rem,  1.3rem  + 1vw,    2rem);
  --step-3:  clamp(1.875rem,1.5rem  + 1.9vw,  2.75rem);
  --step-4:  clamp(2.25rem, 1.7rem  + 2.8vw,  3.75rem);

  /* Spacing */
  --s1: 0.25rem;  --s2: 0.5rem;   --s3: 0.75rem;  --s4: 1rem;
  --s5: 1.5rem;   --s6: 2rem;     --s7: 3rem;     --s8: 4rem;
  --s9: 6rem;     --s10: 8rem;

  --measure: 62ch;
  --container: 72rem;
  --radius: 4px;
  --radius-lg: 10px;
}

/* --------------------------------------------------------------------------
   3. Reset and base
   -------------------------------------------------------------------------- */

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  line-height: 1.12;
  margin: 0 0 var(--s4);
  color: var(--pine);
  font-weight: 600;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); font-weight: 700; }

p, li { max-width: var(--measure); text-wrap: pretty; }
p { margin: 0 0 var(--s4); }

a { color: var(--terra); text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
a:hover { color: var(--pine); }

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

strong { font-weight: 700; }

/* Visible focus on everything interactive, in one place. */
:focus-visible {
  outline: 3px solid var(--pine);
  outline-offset: 3px;
  border-radius: 2px;
}

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

.skip-link {
  position: absolute; left: var(--s4); top: var(--s4);
  transform: translateY(-200%);
  background: var(--pine); color: var(--paper);
  padding: var(--s3) var(--s5); border-radius: var(--radius);
  text-decoration: none; font-weight: 600; z-index: 100;
}
.skip-link:focus { transform: translateY(0); color: var(--paper); }

/* --------------------------------------------------------------------------
   4. Layout
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--s5);
}
@media (min-width: 48rem) { .container { padding-inline: var(--s6); } }

.section { padding-block: var(--s8); }
@media (min-width: 48rem) { .section { padding-block: var(--s9); } }

.section--tint { background: var(--paper-2); }

/* Dark surfaces. .cta-band shares this treatment — every rule below has to
   name both, or text inherits the light-surface colours and fails contrast. */
.section--pine { background: var(--pine-deep); color: var(--paper); }
.section--pine h2, .section--pine h3,
.cta-band h2, .cta-band h3 { color: var(--paper); }
.section--pine a, .cta-band a { color: var(--terra-light); }
.section--pine .lede, .cta-band .lede { color: var(--paper); }

.stack > * + * { margin-top: var(--s4); }

.lede { font-size: var(--step-1); color: var(--ink-soft); line-height: 1.5; }

.eyebrow {
  font-family: var(--font-body);
  /* 14px rather than 13: the audience skews older and this is the smallest
     text on the page. */
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terra);
  margin: 0 0 var(--s3);
}
.section--pine .eyebrow, .cta-band .eyebrow { color: var(--terra-light); }

/* --------------------------------------------------------------------------
   5. Header
   -------------------------------------------------------------------------- */

/* Two rows on mobile, one on desktop. With only three destinations there is
   no hamburger anywhere: a hidden nav costs more than it saves here.

   Not sticky on mobile. A two-row header is ~110px, and pinning that to the
   top of a phone spends a fifth of the screen permanently on navigation for a
   three-page site. It sticks from 56rem up, where it is a single short row and
   carries the phone number. */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s2);
  padding-block: var(--s3);
}

.site-header__brand { display: block; line-height: 0; }
.site-header__brand picture { display: block; }
.site-header__brand img { width: 196px; height: auto; }

.site-nav ul {
  display: flex;
  align-items: center;
  justify-content: center;
  /* Four items are a tight fit on a 375px phone. Wrapping is the safety net;
     the gap tightens below 26rem rather than letting anything overflow. */
  flex-wrap: wrap;
  gap: var(--s2) var(--s4);
  list-style: none;
  margin: 0; padding: 0;
}
@media (min-width: 26rem) { .site-nav ul { gap: var(--s2) var(--s5); } }

/* The nav's FAQ link jumps to a section rather than a page. From 56rem up the
   header is sticky, so the target needs to clear it or the heading lands
   underneath. */
#faq { scroll-margin-top: var(--s5); }
@media (min-width: 56rem) { #faq { scroll-margin-top: 7rem; } }
.site-nav a {
  display: block;
  padding: var(--s2) var(--s1);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.0625rem;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--pine); border-bottom-color: var(--line-strong); }
.site-nav a[aria-current="page"] { color: var(--pine); border-bottom-color: var(--terra); }

.site-header__phone { display: none; }

@media (min-width: 56rem) {
  .site-header { position: sticky; top: 0; z-index: 50; }
  .site-header__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: var(--s6);
    padding-block: var(--s4);
  }
  .site-header__brand img { width: 260px; }
  .site-header__phone {
    display: inline-flex;
    align-items: center;
    gap: var(--s2);
    padding-block: var(--s3);
    font-weight: 700;
    color: var(--pine);
    text-decoration: none;
    white-space: nowrap;
  }
  .site-header__phone:hover { text-decoration: underline; }
}

/* --------------------------------------------------------------------------
   6. Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: 52px;
  padding: var(--s3) var(--s6);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}

.btn--primary { background: var(--pine); color: var(--paper); border-color: var(--pine); }
.btn--primary:hover { background: var(--pine-deep); border-color: var(--pine-deep); color: var(--paper); }

.btn--ghost { background: transparent; color: var(--pine); border-color: var(--pine); }
.btn--ghost:hover { background: var(--pine); color: var(--paper); }

.section--pine .btn--ghost { color: var(--paper); border-color: var(--paper); }
.section--pine .btn--ghost:hover { background: var(--paper); color: var(--pine-deep); }

.btn[disabled], .btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s4);
  margin-top: var(--s6);
}
.btn-row .btn { flex: 1 1 auto; }
@media (min-width: 30rem) { .btn-row .btn { flex: 0 0 auto; } }

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */

.hero { padding-block: var(--s7) var(--s8); }

.hero__grid { display: grid; gap: var(--s7); align-items: center; }

@media (min-width: 56rem) {
  .hero { padding-block: var(--s9); }
  .hero__grid { grid-template-columns: 1.1fr 0.9fr; gap: var(--s8); }
}

.hero__figure { margin: 0; position: relative; }
.hero__figure img {
  width: 100%;
  border-radius: var(--radius-lg);
  /* Warm frame rather than a hard edge — the photograph should feel like an
     object on the page, not a browser default. */
  box-shadow: 0 1px 2px rgba(31,27,22,0.10), 0 12px 28px -8px rgba(31,27,22,0.22);
}

.hero__note {
  display: inline-block;
  margin-top: var(--s5);
  font-size: var(--step--1);
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   8. Steps, cards, feature grids
   -------------------------------------------------------------------------- */

.grid { display: grid; gap: var(--s6); }
@media (min-width: 44rem) { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 52rem) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }

.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: calc(var(--s8) + var(--s2));
  max-width: none;
}
.steps > li + li { margin-top: var(--s6); }
.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: var(--s8); height: var(--s8);
  display: grid; place-items: center;
  background: var(--pine); color: var(--paper);
  font-family: var(--font-display);
  font-size: var(--step-1); font-weight: 600;
  border-radius: 50%;
}
.steps h3 { margin-bottom: var(--s2); }
.steps p { margin-bottom: 0; }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--s6);
}
.section--tint .card { background: var(--paper); }
.card h3 { margin-bottom: var(--s3); }
.card p:last-child { margin-bottom: 0; }

/* Trust list — the site's core work, so it gets its own treatment. */
.trust-list { list-style: none; margin: 0; padding: 0; }
.trust-list > li {
  position: relative;
  padding-left: var(--s7);
  max-width: var(--measure);
}
.trust-list > li + li { margin-top: var(--s5); }
.trust-list > li::before {
  content: "";
  position: absolute; left: 0; top: 0.45em;
  width: 1.35rem; height: 0.7rem;
  border-left: 3px solid var(--terra-light);
  border-bottom: 3px solid var(--terra-light);
  transform: rotate(-45deg);
}

/* Same list on a light background needs the darker terracotta to stay legible
   as a graphical object (3:1). */
.trust-list--light > li::before {
  border-left-color: var(--terra);
  border-bottom-color: var(--terra);
}

/* <picture> is inline by default, which leaves a descender gap under the image. */
.figure picture, .hero__figure picture { display: block; }

.figure { margin: 0; }
.figure img { width: 100%; border-radius: var(--radius-lg); }
.figure figcaption {
  margin-top: var(--s3);
  font-size: var(--step--1);
  color: var(--ink-soft);
}
.section--pine .figure figcaption { color: var(--paper); opacity: 0.85; }

/* --------------------------------------------------------------------------
   9. Pricing
   -------------------------------------------------------------------------- */

.price-table-wrap { overflow-x: auto; }

.price-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--s5);
  min-width: 30rem;
}
.price-table caption {
  text-align: left;
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  color: var(--pine);
  margin-bottom: var(--s4);
}
.price-table th, .price-table td {
  text-align: left;
  padding: var(--s4);
  border-bottom: 1px solid var(--line);
  vertical-align: baseline;
}
.price-table thead th {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 2px solid var(--line-strong);
}
.price-table tbody th { font-weight: 600; }
.price-table td.price {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  color: var(--pine);
  white-space: nowrap;
}

.price-cards { display: grid; gap: var(--s5); }
@media (min-width: 44rem) { .price-cards { grid-template-columns: repeat(3, 1fr); } }
.price-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--s6);
  text-align: center;
}
.price-card__count {
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 var(--s3);
}
.price-card__amount {
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 600;
  color: var(--pine);
  line-height: 1;
  margin: 0;
}

.example {
  border-left: 4px solid var(--terra);
  padding: var(--s2) 0 var(--s2) var(--s5);
  margin-bottom: var(--s6);
}
.example p:last-child { margin-bottom: 0; }
.example .total { font-weight: 700; color: var(--pine); }

/* --------------------------------------------------------------------------
   10. FAQ
   -------------------------------------------------------------------------- */

.faq { border-top: 1px solid var(--line); max-width: var(--measure); }
.faq > div { border-bottom: 1px solid var(--line); padding-block: var(--s5); }
.faq h3 { margin-bottom: var(--s3); font-size: var(--step-1); }
.faq p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   11. Form
   -------------------------------------------------------------------------- */

.form { max-width: 34rem; }

/* On the dark call-to-action band the form sits on its own light panel.
   Labels, hints and helper text then keep their light-surface colours, which
   is both the accessible answer and the clearer one — the form reads as a
   distinct object rather than text floating on a dark field. */
.cta-band .form {
  background: var(--paper);
  color: var(--ink);
  padding: var(--s6);
  border-radius: var(--radius-lg);
}
.cta-band .form a { color: var(--terra); }
.cta-band .form a:hover { color: var(--pine); }

.field { margin-bottom: var(--s5); }

.field label {
  display: block;
  font-weight: 700;
  margin-bottom: var(--s2);
  color: var(--ink);
}

.field .hint {
  display: block;
  font-size: var(--step--1);
  color: var(--ink-soft);
  font-weight: 400;
  margin-top: var(--s1);
  margin-bottom: var(--s2);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: var(--s3) var(--s4);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.4;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--line-strong);
  border-radius: var(--radius);
}
.field textarea { min-height: 8rem; resize: vertical; }

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%238C7C64' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--s4) center;
  padding-right: var(--s7);
}

.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--pine); }

.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: var(--error); }

/* Errors are always text, never colour alone. */
.field-error {
  display: none;
  margin-top: var(--s2);
  color: var(--error);
  font-size: var(--step--1);
  font-weight: 700;
}
.field-error.is-visible { display: block; }

/* Replaces the form after a successful background submission. Sits on the same
   light panel as the form so the dark CTA band doesn't swallow it. */
.form-success {
  background: var(--paper);
  color: var(--ink);
  padding: var(--s6);
  border-radius: var(--radius-lg);
  border-left: 5px solid var(--terra);
  max-width: 34rem;
}
.form-success:focus { outline: 3px solid var(--pine); outline-offset: 3px; }
.form-success h3 { margin-bottom: var(--s4); }
.form-success a { color: var(--terra); font-weight: 700; }
.form-success a:hover { color: var(--pine); }

.form-status {
  margin-bottom: var(--s5);
  padding: var(--s4) var(--s5);
  border-radius: var(--radius);
  border-left: 4px solid var(--error);
  background: var(--paper-2);
  color: var(--ink);
  font-weight: 600;
}
.form-status:empty { display: none; }

.form__footnote { font-size: var(--step--1); color: var(--ink-soft); }

.honeypot {
  position: absolute; left: -9999px;
  width: 1px; height: 1px; overflow: hidden;
}

.btn.is-loading { position: relative; color: transparent; }
.btn.is-loading::after {
  content: "";
  position: absolute; inset: 0; margin: auto;
  width: 1.25rem; height: 1.25rem;
  border: 3px solid rgba(250,246,239,0.4);
  border-top-color: var(--paper);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .btn.is-loading { color: var(--paper); }
  .btn.is-loading::after { display: none; }
}

/* --------------------------------------------------------------------------
   12. Call-to-action band
   -------------------------------------------------------------------------- */

.cta-band { background: var(--pine-deep); color: var(--paper); }
.cta-band h2 { color: var(--paper); }
.cta-band .lede { color: var(--paper); opacity: 0.9; }
.cta-band a.tel { color: var(--terra-light); font-weight: 700; }

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--pine-deep);
  color: var(--paper);
  padding-block: var(--s8) var(--s6);
  border-top: 6px solid var(--terra);
}
.site-footer h2, .site-footer h3 { color: var(--paper); font-size: var(--step-1); }
.site-footer a { color: var(--paper); }
.site-footer a:hover { color: var(--terra-light); }
.site-footer img.footer-logo { width: 240px; margin-bottom: var(--s5); }

.site-footer__grid { display: grid; gap: var(--s7); }
@media (min-width: 44rem) { .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }

.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li + li { margin-top: var(--s2); }

/* Footer links are list items, not inline links in a sentence, so the WCAG 2.2
   target-size exception does not apply to them. Padding brings them clear of
   the minimum. */
.site-footer li a { display: inline-block; padding-block: var(--s2); }

.site-footer__bottom {
  margin-top: var(--s8);
  padding-top: var(--s5);
  border-top: 1px solid rgba(250,246,239,0.22);
  font-size: var(--step--1);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3) var(--s5);
  justify-content: space-between;
  opacity: 0.9;
}
.site-footer__bottom p { margin: 0; max-width: none; }

/* --------------------------------------------------------------------------
   14. Utility
   -------------------------------------------------------------------------- */

/* A link standing alone on its own line is a control, not prose, so the WCAG
   2.2 inline-link exception doesn't cover it. Give it a real target. */
.link-block { display: inline-block; padding-block: var(--s2); }

.narrow { max-width: 44rem; }
.center { text-align: center; margin-inline: auto; }
.center p, .center h2 { margin-inline: auto; }
.mb-0 { margin-bottom: 0; }
.mt-6 { margin-top: var(--s6); }
