/* Tabby Gardens
   Fonts are self-hosted (no third-party requests). No JavaScript anywhere.
   Palette pulled from Tina's leaf logo, toned down for text. */

@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fonts/fraunces.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 400 600; font-display: swap; src: url("fonts/fraunces-italic.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fonts/figtree.woff2") format("woff2"); }

:root {
  --paper: #f6f3ea;
  --paper-2: #efeadc;
  --ink: #23291f;
  --soft: #5d6455;
  --green: #2f5d34;
  --green-deep: #1f3f24;
  --marigold: #e0a21b;
  --rule: #d9d2bf;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Figtree", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --wrap: 1080px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.65 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-underline-offset: .18em; }
a:hover { color: var(--green-deep); }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; color: var(--green-deep); line-height: 1.12; letter-spacing: -.01em; margin: 0; font-variation-settings: "opsz" 96; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.3rem; font-variation-settings: "opsz" 24; }
em, .ital { font-family: var(--serif); font-style: italic; font-weight: 400; }
p { margin: 0 0 1rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* Small overline above headings */
.kicker { font: 600 .78rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--soft); margin: 0 0 1rem; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.logo { flex: none; }
.logo img { width: 150px; mix-blend-mode: multiply; } /* drops the logo's white box onto the paper color */
.nav { margin-left: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.nav a:hover { color: var(--green); }
.nav a[aria-current="page"] { color: var(--green); box-shadow: inset 0 -2px 0 var(--marigold); }
.header-phone { font-weight: 700; text-decoration: none; color: var(--green-deep); white-space: nowrap; }
.menu-toggle { display: none; }

@media (max-width: 760px) {
  .nav { display: none; }
  .header-phone { margin-left: auto; font-size: .95rem; }
  .menu-toggle { display: block; position: relative; }
  .menu-toggle summary { list-style: none; cursor: pointer; font-weight: 600; padding: 6px 2px; border-bottom: 2px solid var(--marigold); }
  .menu-toggle summary::-webkit-details-marker { display: none; }
  .menu-toggle ul { position: absolute; right: 0; top: calc(100% + 12px); z-index: 10; min-width: 190px; list-style: none; margin: 0; padding: 6px 0; background: var(--paper); border: 1px solid var(--rule); }
  .menu-toggle li a { display: block; padding: 11px 18px; text-decoration: none; color: var(--ink); font-weight: 500; }
  .menu-toggle li a[aria-current="page"] { color: var(--green); }
}

/* ---------- Page opening ---------- */
.opening { padding: 56px 0 48px; }
.opening .wrap { display: grid; gap: 40px; align-items: center; }
@media (min-width: 880px) { .opening .wrap { grid-template-columns: 1.1fr .9fr; gap: 64px; } }
.opening .intro { font-size: 1.2rem; color: var(--soft); max-width: 34ch; margin-top: 1.25rem; }
.opening .intro strong { color: var(--ink); font-weight: 600; }

.call { margin-top: 2rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; }
.call .number { font: 500 clamp(1.5rem, 3vw, 1.9rem)/1.1 var(--serif); color: var(--green-deep); text-decoration: none; border-bottom: 2px solid var(--marigold); }
.call .number:hover { color: var(--green); }
.call .or { color: var(--soft); }

/* A photo framed like a print, with a caption under it */
.print { margin: 0; background: #fff; padding: 10px 10px 0; box-shadow: 0 1px 0 var(--rule), 0 14px 30px -18px rgba(35, 41, 31, .45); }
.print img { width: 100%; }
.print figcaption { font: italic 400 .95rem/1.4 var(--serif); color: var(--soft); padding: 10px 2px 12px; }
@media (min-width: 880px) { .opening .print { transform: rotate(1.2deg); } }

/* ---------- Sections ---------- */
.section { padding: 64px 0; border-top: 1px solid var(--rule); }
.section.tint { background: var(--paper-2); }
.split { display: grid; gap: 24px 64px; }
@media (min-width: 880px) { .split { grid-template-columns: 0.8fr 1.2fr; } }
.split > header p { color: var(--soft); max-width: 32ch; margin-top: .8rem; }

/* Before / after */
.pair { display: grid; gap: 20px; margin-top: 8px; }
@media (min-width: 640px) { .pair { grid-template-columns: 1fr 1fr; } }
.pair .print img { aspect-ratio: 3 / 2; object-fit: cover; }

/* Services: a ruled list, not boxes */
.services { list-style: none; margin: 0; padding: 0; counter-reset: svc; }
.services li { counter-increment: svc; display: grid; grid-template-columns: 3rem 1fr; gap: 0 12px; padding: 22px 0; border-top: 1px solid var(--rule); }
.services li:last-child { border-bottom: 1px solid var(--rule); }
.services li::before { content: counter(svc, decimal-leading-zero); font: italic 400 1.1rem/1.6 var(--serif); color: var(--marigold); }
.services h3 { margin-bottom: .3rem; }
.services p { margin: 0; color: var(--soft); }

/* Plain-language detail lists on the services page */
.ticks { margin: .6rem 0 0; padding-left: 1.1rem; color: var(--soft); }
.ticks li { margin: .2rem 0; }

/* Closing note */
.closing { padding: 72px 0 80px; border-top: 1px solid var(--rule); text-align: left; }
.closing h2 { max-width: 20ch; }
.closing p { color: var(--soft); margin-top: .8rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-deep); color: #dfe6d8; padding: 36px 0 44px; font-size: .95rem; }
.site-footer .wrap { display: grid; gap: 8px 32px; }
@media (min-width: 720px) { .site-footer .wrap { grid-template-columns: 1fr auto; align-items: end; } }
.site-footer a { color: #fff; }
.site-footer .name { font: 500 1.35rem/1.2 var(--serif); color: #fff; margin: 0; }
.site-footer p { margin: 0; }

.pair { margin-top: 28px; }
.note { margin-top: 1.5rem; }

/* Areas served, as tags */
.towns { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.towns li { padding: 7px 15px; border: 1px solid var(--rule); border-radius: 999px; background: var(--paper); font-weight: 500; color: var(--green-deep); }

/* Balance: section headings stay beside their content while it scrolls */
@media (min-width: 880px) { .split > header { position: sticky; top: 32px; align-self: start; } }

/* Closing call centered */
.closing { text-align: center; }
.closing h2 { margin: 0 auto; }
.closing .call { justify-content: center; }

/* ---------- Motion: CSS only, no scripts. Skipped for people who turn motion off. ---------- */
@media screen and (prefers-reduced-motion: no-preference) {
  @keyframes rise { from { opacity: 0; translate: 0 22px; } to { opacity: 1; translate: 0 0; } }
  .opening .wrap > * { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
  .opening .wrap > :nth-child(2) { animation-delay: .18s; }

  .print { transition: transform .5s cubic-bezier(.2, .7, .2, 1), box-shadow .5s; }
  .print:hover { transform: rotate(0deg) scale(1.015); box-shadow: 0 1px 0 var(--rule), 0 22px 40px -20px rgba(35, 41, 31, .5); }

  .nav a { background: linear-gradient(var(--marigold), var(--marigold)) 0 100% / 0 2px no-repeat; transition: background-size .25s ease, color .2s; }
  .nav a:hover { background-size: 100% 2px; }
  .call .number { transition: color .2s, border-color .2s; }
  .call .number:hover { border-color: var(--green); }
  .towns li { transition: background-color .2s, border-color .2s; }
  .towns li:hover { background: var(--paper-2); border-color: var(--marigold); }

  /* Hero heading wipes up into view on load */
  @keyframes wipe { from { clip-path: inset(0 0 100% 0); translate: 0 30px; } to { clip-path: inset(0 0 -10% 0); translate: 0 0; } }
  .opening h1 { animation: wipe 1.1s cubic-bezier(.2, .7, .2, 1) .1s both; }

  /* Header shadow appears once you scroll (browsers that support it) */
  @supports (animation-timeline: scroll()) {
    @keyframes shadow-in { to { box-shadow: 0 8px 24px -16px rgba(35, 41, 31, .35); } }
    .site-header { animation: shadow-in linear both; animation-timeline: scroll(); animation-range: 0 120px; }
  }

  /* Scroll reveals: reveal.js adds .js to the page, then .in to each item the first time it
     scrolls into view. Plays once, never reverses. If the script doesn't run, nothing is hidden. */
  .js .reveal { opacity: 0; translate: 0 26px; transition: opacity .8s cubic-bezier(.2, .7, .2, 1), translate .8s cubic-bezier(.2, .7, .2, 1), scale .8s cubic-bezier(.2, .7, .2, 1); }
  .js .services li.reveal { translate: 60px 0; }
  .js .towns li.reveal { translate: 0 0; scale: .7; }
  .js .reveal.in, .js .services li.reveal.in, .js .towns li.reveal.in { opacity: 1; translate: 0 0; scale: 1; }

  .services li:nth-child(2) { transition-delay: .12s; }
  .services li:nth-child(3) { transition-delay: .24s; }
  .towns li:nth-child(2) { transition-delay: .05s; } .towns li:nth-child(3) { transition-delay: .1s; }
  .towns li:nth-child(4) { transition-delay: .15s; } .towns li:nth-child(5) { transition-delay: .2s; }
  .towns li:nth-child(6) { transition-delay: .25s; } .towns li:nth-child(7) { transition-delay: .3s; }
  .towns li:nth-child(8) { transition-delay: .35s; } .towns li:nth-child(9) { transition-delay: .4s; }
  .towns li:nth-child(10) { transition-delay: .45s; }

  /* Gold rule under section labels draws itself in */
  .section .kicker::after { content: ""; display: block; width: 40px; height: 2px; margin-top: 10px; background: var(--marigold); transform-origin: left; transition: scale .9s cubic-bezier(.2, .7, .2, 1) .2s; }
  .js .section .kicker.reveal::after { scale: 0 1; }
  .js .section .kicker.reveal.in::after { scale: 1 1; }
}

/* Header stays at the top while scrolling */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--paper); }

/* Keep slide-in items from making the page scroll sideways on phones */
body { overflow-x: clip; }
