/* ==========================================================================
   Finca Santa Rosa — single stylesheet for all three pages.
   Organised top to bottom: variables, reset, layout, header, components,
   page sections, footer, responsive tweaks.
   ========================================================================== */

/* --- Design tokens -------------------------------------------------------- */

:root {
  --bean:      #2e1d14;  /* darkest brown, body text */
  --soil:      #4a3527;
  --cherry:    #8c2f23;  /* accent: ripe coffee cherry */
  --cherry-dk: #6e2419;
  --leaf:      #3f5d43;  /* secondary accent */
  --cream:     #faf6f0;  /* page background */
  --cream-dk:  #f0e8dc;  /* alternating band */
  --line:      #ddd0be;
  --muted:     #756153;

  --measure: 66ch;       /* comfortable reading width for prose */
  --wrap:    1080px;     /* max page width */

  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans:  system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* --- Reset / base --------------------------------------------------------- */

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--bean);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  color: var(--soil);
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2rem, 5vw, 3.1rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1.1em; }

a {
  color: var(--cherry);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

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

/* Always keep a visible focus ring — important for keyboard users. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--cherry);
  outline-offset: 2px;
}

/* --- Layout helpers ------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.section {
  padding-block: 3.5rem;
}

.lede {
  font-size: 1.15rem;
  color: var(--soil);
  max-width: var(--measure);
}

/* --- Header --------------------------------------------------------------- */

.site-header {
  background: var(--bean);
  color: var(--cream);
  border-bottom: 3px solid var(--cherry);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-block: 1rem;
}

.brand {
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--cream);
  text-decoration: none;
  line-height: 1.1;
}

.brand-sub {
  display: block;
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--line);
  margin-top: 0.2rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  color: var(--cream);
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
}

.nav a:hover {
  color: #fff;
  border-bottom-color: var(--cherry);
}

/* Marks the current page in the nav — driven by aria-current in the HTML,
   so the styling and the accessibility information can't drift apart. */
.nav a[aria-current="page"] {
  border-bottom-color: var(--cream);
}

/* --- Buttons -------------------------------------------------------------- */

.button {
  display: inline-block;
  background: var(--cherry);
  color: #fff;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  padding: 0.7rem 1.4rem;
  border: 2px solid var(--cherry);
  border-radius: 2px;
  cursor: pointer;
  font-family: var(--sans);
}

.button:hover {
  background: var(--cherry-dk);
  border-color: var(--cherry-dk);
  color: #fff;
}

.button-quiet {
  background: transparent;
  color: var(--cherry);
}

.button-quiet:hover {
  background: var(--cherry);
  color: #fff;
  border-color: var(--cherry);
}

/* --- Home: hero ----------------------------------------------------------- */

.hero {
  background: var(--cream-dk);
  border-bottom: 1px solid var(--line);
  padding-block: 4.5rem;
}

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

.hero h1 {
  max-width: 24ch;
}

.hero .button {
  margin-right: 0.5rem;
  margin-top: 0.5rem;
}

/* --- Cards ---------------------------------------------------------------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--leaf);
  padding: 1.5rem;
}

.card h3 {
  margin-bottom: 0.2em;
}

.card-meta {
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.9em;
}

.card p:last-child { margin-bottom: 0; }

/* --- Facts band ----------------------------------------------------------- */

.band {
  background: var(--bean);
  color: var(--cream);
  padding-block: 3rem;
}

.band h2 { color: var(--cream); }

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.5rem;
  margin: 0;
}

.fact dt {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--line);
  margin-bottom: 0.35rem;
}

.fact dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.3rem;
}

/* --- Interior page heading ------------------------------------------------ */

.page-head {
  background: var(--cream-dk);
  border-bottom: 1px solid var(--line);
  padding-block: 3rem;
}

/* --- Prose (about page) --------------------------------------------------- */

.prose {
  max-width: var(--measure);
}

.prose h2 {
  margin-top: 2.4em;
  padding-top: 0.6em;
  border-top: 1px solid var(--line);
}

.prose h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.prose h3 {
  margin-top: 1.8em;
  color: var(--leaf);
}

.list {
  padding-left: 1.2rem;
}

.list li {
  margin-bottom: 0.4em;
}

.callout {
  background: #fff;
  border-left: 4px solid var(--cherry);
  padding: 1.1rem 1.3rem;
  margin-top: 2.5rem;
}

/* --- Table ---------------------------------------------------------------- */

.table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0 2rem;
  font-size: 0.95rem;
}

.table caption {
  caption-side: bottom;
  text-align: left;
  font-size: 0.85rem;
  color: var(--muted);
  padding-top: 0.6rem;
}

.table th,
.table td {
  text-align: left;
  padding: 0.6rem 0.7rem;
  border-bottom: 1px solid var(--line);
}

.table thead th {
  background: var(--cream-dk);
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.table tbody th {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--soil);
}

/* --- Contact page --------------------------------------------------------- */

.contact-layout {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 3rem;
  align-items: start;
}

.contact-details {
  background: #fff;
  border: 1px solid var(--line);
  padding: 1.5rem;
}

.contact-details h3 {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 1.6em;
  margin-bottom: 0.4em;
}

.contact-details h2 + h3 { margin-top: 0; }

.address { font-style: normal; }

/* --- Form ----------------------------------------------------------------- */

.field {
  margin-bottom: 1.1rem;
}

.field label {
  display: block;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.optional {
  text-transform: none;
  letter-spacing: 0;
  font-style: italic;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  color: inherit;
  background: #fff;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 2px;
}

.field textarea {
  resize: vertical;
}

.form-note {
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 0.9rem;
}

/* --- Footer --------------------------------------------------------------- */

.site-footer {
  background: var(--bean);
  color: var(--line);
  margin-top: 2rem;
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 1.75rem;
}

.footer-inner p { margin: 0; }

.site-footer a { color: var(--cream); }

/* --- Narrow screens ------------------------------------------------------- */

@media (max-width: 720px) {

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav {
    gap: 1rem;
  }

  .hero {
    padding-block: 3rem;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  /* Let a wide table scroll sideways instead of breaking the layout. */
  .table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
