/* ==========================================================================
   Stone & Leaf Landscaping — base
   Fonts, design tokens, reset, typography and layout primitives.
   ========================================================================== */

/* --- Fonts (self-hosted) -------------------------------------------------- */
@font-face { font-family: "Boska"; src: url("../fonts/boska-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Boska"; src: url("../fonts/boska-400i.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Boska"; src: url("../fonts/boska-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Boska"; src: url("../fonts/boska-500i.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "Boska"; src: url("../fonts/boska-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Synonym"; src: url("../fonts/synonym-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Synonym"; src: url("../fonts/synonym-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Synonym"; src: url("../fonts/synonym-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Fragment Mono"; src: url("../fonts/fragmentmono-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

/* --- Tokens --------------------------------------------------------------- */
:root {
  /* Colour: taken from the work itself. Limestone paper, peat-green ground,
     lawn green, and the orange of a mini digger as the one spot colour. */
  --paper:      #ece7db;
  --paper-deep: #e1d9c7;
  --ink:        #1b211d;
  --ink-soft:   #474f48;
  --earth:      #1e2520;
  --earth-2:    #2b332d;
  --leaf:       #4f6d30;
  --leaf-light: #a3ba72;
  --plant:      #e5590f;
  --plant-ink:  #b4400a;

  --line:       rgba(27, 33, 29, 0.22);
  --line-light: rgba(236, 231, 219, 0.24);

  --serif: "Boska", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans:  "Synonym", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono:  "Fragment Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: clamp(1.25rem, 4vw, 4rem);
  --gap:    clamp(1rem, 1.8vw, 1.5rem);
  --max:    88rem;
  --header-h: 4.25rem;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  padding-top: var(--header-h);
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, figure, blockquote { margin: 0; }

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

::selection { background: var(--ink); color: var(--paper); }

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

.skip-link {
  position: fixed; top: 0.75rem; left: 0.75rem; z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--ink); color: var(--paper);
  transform: translateY(-200%);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: none; }

/* --- Layout primitives ---------------------------------------------------- */
.wrap {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
}

/* --- Type ----------------------------------------------------------------- */
.label {
  display: flex; align-items: center; gap: 0.75rem;
  font: 400 0.72rem/1.3 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.label__num { color: var(--plant-ink); }
.label::before {
  content: ""; width: 1.75rem; height: 1px; background: currentColor; opacity: 0.55;
}

.display {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.04;
  font-size: clamp(2.2rem, 4vw, 3.9rem);
  text-wrap: balance;
}
.display em { font-style: italic; font-weight: 400; }

.lead {
  font-size: clamp(1.1rem, 1.35vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 38ch;
  text-wrap: pretty;
}

.mono {
  font: 400 0.72rem/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* --- Buttons and links ---------------------------------------------------- */
.btn {
  --btn-bg: var(--ink); --btn-fg: var(--paper); --btn-bd: var(--ink);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.75rem;
  min-height: 3.25rem;
  padding: 0.85rem 1.5rem;
  border: 1px solid var(--btn-bd);
  background: var(--btn-bg); color: var(--btn-fg);
  font: 500 0.98rem/1.2 var(--sans);
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn::after {
  /* a small level-bubble square that slides in on hover */
  content: ""; width: 0.5rem; height: 0.5rem; background: var(--plant);
  transition: transform 0.35s var(--ease);
}
.btn:hover::after { transform: translateX(0.3rem) rotate(45deg); }
.btn:hover { --btn-bg: var(--earth-2); --btn-bd: var(--earth-2); }

.btn--ghost { --btn-bg: transparent; --btn-fg: currentColor; --btn-bd: currentColor; }
.btn--ghost:hover { --btn-bg: var(--ink); --btn-fg: var(--paper); --btn-bd: var(--ink); }
.btn--paper { --btn-bg: var(--paper); --btn-fg: var(--ink); --btn-bd: var(--paper); }
.btn--paper:hover { --btn-bg: #fff; --btn-bd: #fff; }
.btn--ghost-light { --btn-bg: transparent; --btn-fg: var(--paper); --btn-bd: var(--line-light); }
.btn--ghost-light:hover { --btn-bg: var(--paper); --btn-fg: var(--ink); --btn-bd: var(--paper); }

.link {
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  padding-bottom: 0.1em;
  transition: background-size 0.4s var(--ease), color 0.2s;
}
.link:hover { background-size: 0 1px; background-position: 100% 100%; }

/* --- Reveal on scroll ----------------------------------------------------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(1.1rem);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
