/* Quillfeather Tree Care, direction d1 "paper-craft" (2026-12-01).
   A family trade card: Fraunces display on a paper field, Public Sans for reading, deep forest with sawdust amber.
   Fonts are self-hosted from the RedoLocal font library (SIL Open Font License 1.1). No script anywhere (R16).
   base.css: fonts, tokens, page basics, header and phone menu, buttons, labels, framed pictures. */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/Fraunces-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Public Sans";
  src: url("../fonts/public-sans-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* color: their own header green deepened, sawdust amber, paper */
  --forest: #2f5a24;
  --forest-deep: #1e3b17;
  --forest-ink: #264a1d;
  --amber: #c8893a;
  --amber-ink: #7c5017;
  --amber-light: #e3b673;
  --paper: #f4efe3;
  --paper-light: #fbf8f0;
  --paper-deep: #ebe3d0;
  --paper-edge: #ddd1b5;
  --ink: #1f2619;
  --ink-soft: #474c3c;
  --rule: #cfc2a3;
  --rule-strong: #a99a72;
  --on-dark: #f4efe3;
  --on-dark-soft: #d3dbc8;
  --tape: rgba(200, 137, 58, 0.3);
  --hatch: repeating-linear-gradient(115deg, rgba(244, 239, 227, 0.05) 0 1px, transparent 1px 11px);

  /* type */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-text: "Public Sans", ui-sans-serif, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: clamp(1.15rem, 1.06rem + 0.45vw, 1.42rem);
  --step-2: clamp(1.4rem, 1.18rem + 1vw, 2.05rem);
  --step-3: clamp(2rem, 1.45rem + 2.3vw, 3.35rem);
  --step-4: clamp(2.5rem, 1.55rem + 3.7vw, 4.75rem);
  --track-caps: 0.14em;
  --leading-tight: 1.04;
  --leading-text: 1.6;

  /* space */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: clamp(4rem, 2.6rem + 5vw, 7.25rem);
  --gutter: clamp(1.15rem, 0.6rem + 2.4vw, 3rem);
  --wrap: 1240px;
  --wrap-wide: 1340px;
  --header-h: 64px;

  /* shape, depth, motion */
  --radius: 3px;
  --corner: clamp(30px, 3.2vw, 46px);
  --shadow-sheet: 0 1px 0 rgba(90, 72, 38, 0.14), 0 22px 44px -26px rgba(52, 40, 18, 0.48);
  --shadow-press: 4px 4px 0 var(--amber);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --t-fast: 180ms;
  --t-zoom: 1.6s;
}

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

/* no scroll-padding here: it made a tap on the pinned menu button scroll the page, so the render gate read the
   close as navigating away (round 1). Every section's own top padding clears the 64 px header. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-0);
  line-height: var(--leading-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--leading-tight);
  letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: balance;
  font-variation-settings: "SOFT" 40, "WONK" 1;
}

h3 { letter-spacing: -0.005em; }

p, li, blockquote, figcaption { text-wrap: pretty; }

a { color: var(--forest); text-underline-offset: 0.18em; }

a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
}

.nw { white-space: nowrap; }

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

/* ---------- Header: pinned, exactly 64 px (R1, LESSONS L-03); the double rule under it is a shadow ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-h);
  background: var(--paper);
  box-shadow: 0 1px 0 var(--rule-strong), 0 4px 0 var(--paper), 0 5px 0 var(--rule);
}

.masthead-inner {
  height: 100%;
  max-width: var(--wrap-wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 48px;
  margin-right: auto;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.1);
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 620;
  font-size: clamp(1.05rem, 0.98rem + 0.4vw, 1.3rem);
  letter-spacing: -0.01em;
  white-space: nowrap;
  font-variation-settings: "SOFT" 50, "WONK" 1;
}

.desk-nav { display: none; align-items: center; }

.desk-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 0.62rem;
  color: var(--ink);
  font: 600 1rem/1 var(--font-text);
  letter-spacing: 0.005em;
  text-decoration: none;
  white-space: nowrap;
  background-image: linear-gradient(var(--amber), var(--amber));
  background-repeat: no-repeat;
  background-size: 0 2px;
  background-position: 0.62rem calc(100% - 11px);
  transition: background-size var(--t-fast) var(--ease), color var(--t-fast);
}

.desk-nav a:hover { color: var(--forest); background-size: calc(100% - 1.24rem) 2px; }

.masthead-phone {
  display: none;
  align-items: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0 0.25rem;
  color: var(--forest);
  font: 650 1rem/1 var(--font-text);
  text-decoration: none;
  white-space: nowrap;
}

.masthead-phone svg { width: 1.05em; height: 1.05em; flex: none; }
.masthead-phone:hover { text-decoration: underline; text-decoration-color: var(--amber); text-decoration-thickness: 2px; }

/* the phone menu: a CSS-only <details>; closed, its <nav> is display none (LESSONS L-02); the panel sits over the
   page from the header's own stacking level (L-04), so it never pushes content down (R1) */
.menu { display: block; }

.nav-toggle {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 48px;
  min-width: 48px;
  padding: 0 0.8rem;
  border: 1.5px solid var(--forest);
  border-radius: var(--radius);
  background: var(--paper-light);
  color: var(--forest);
  font: 650 1rem/1 var(--font-text);
  letter-spacing: 0.02em;
}

.nav-toggle::-webkit-details-marker { display: none; }
.nav-toggle::marker { content: ""; }

.bars {
  position: relative;
  width: 18px;
  height: 12px;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transition: border-color var(--t-fast);
}

.bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 3px;
  border-top: 2px solid currentColor;
}

.menu[open] .nav-toggle { background: var(--forest); color: var(--paper-light); }

.menu-panel {
  position: absolute;
  z-index: 30;
  top: 100%;
  left: 0;
  right: 0;
  display: grid;
  padding: 0.75rem var(--gutter) 1.5rem;
  background: var(--paper-light);
  border-top: 5px double var(--rule-strong);
  box-shadow: 0 18px 30px -12px rgba(40, 32, 14, 0.35);
}

.menu:not([open]) > nav { display: none; }

.menu-panel a {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 52px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 520;
  text-decoration: none;
  border-bottom: 1px dotted var(--rule-strong);
  white-space: nowrap;
}

.menu-panel a::before {
  content: "";
  flex: none;
  width: 8px;
  height: 12px;
  background: var(--amber);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

@media (max-width: 419px) {
  .menu-word { display: none; }
  .nav-toggle { justify-content: center; padding: 0 0.8rem; }
}

@media (min-width: 640px) {
  .masthead-phone { display: inline-flex; }
}

@media (min-width: 1280px) {
  .desk-nav { display: flex; }
  .menu { display: none; }
}

/* ---------- Buttons: links with class btn; a letterpress block with an offset amber impression ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 54px;
  padding: 0 1.45rem;
  border-radius: var(--radius);
  font: 650 1.03rem/1 var(--font-text);
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background-color var(--t-fast);
}

.btn svg { width: 1.15em; height: 1.15em; flex: none; }

.btn-primary {
  background: var(--forest);
  color: var(--paper-light);
  box-shadow: var(--shadow-press);
}

.btn-primary:hover {
  background: var(--forest-deep);
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--amber);
}

/* ---------- Labels: small caps on a rule line, opened by the diamond of their own logo ---------- */

.label {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.1rem;
  color: var(--amber-ink);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  white-space: nowrap;
  font-variation-settings: "SOFT" 0, "WONK" 0;
}

.label::before {
  content: "";
  flex: none;
  width: 9px;
  height: 13px;
  background: var(--amber);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.label-rule::after {
  content: "";
  flex: 1 1 auto;
  min-width: 2rem;
  height: 5px;
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
}

.label-short::after {
  content: "";
  flex: 0 1 3.5rem;
  min-width: 1rem;
  height: 5px;
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
}

@media (max-width: 439px) {
  .label-short::after { display: none; }
}

/* ---------- Framed pictures: a paper mat with two photo corners; the house hover zoom on the image only ---------- */

.frame {
  position: relative;
  z-index: 1;
  padding: clamp(10px, 1.15vw, 16px);
  background: var(--paper-light);
  border: 1px solid var(--paper-edge);
  box-shadow: var(--shadow-sheet);
}

.frame::before,
.frame::after {
  content: "";
  position: absolute;
  z-index: 2;
  width: var(--corner);
  height: var(--corner);
  background: linear-gradient(135deg, var(--forest) 0%, var(--forest-deep) 100%);
  pointer-events: none;
}

.frame::before { top: 4px; left: 4px; clip-path: polygon(0 0, 100% 0, 0 100%); }
.frame::after { right: 4px; bottom: 4px; clip-path: polygon(100% 0, 100% 100%, 0 100%); }

.frame-photo { overflow: hidden; background: var(--paper-deep); }

.frame-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-zoom) ease;
}

@media (hover: hover) and (pointer: fine) {
  .frame:hover .frame-photo img,
  .frame:focus-within .frame-photo img { transform: scale(1.07); }
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .desk-nav a { transition: none; }
}
