/* Akdi Premium Countertops — light stone-gallery system.
   Tokens follow the leadgen convention (--bg/--fg/--accent/--card).
   Light ground per niche_brief.md ("the stone is the color; dark grounds
   fight it"); one deep accent reserved for CTAs. All text pairs AA+. */

:root {
  --bg: #faf9f7;          /* warm stone white */
  --card: #f1eee8;        /* limestone */
  --fg: #26221c;          /* warm near-black — 15.6:1 on bg */
  --fg-soft: #4c463c;     /* ledes — 9.5:1 on bg */
  --muted: #635c4f;       /* captions — 6.7:1 on bg */
  --accent: #1f5e66;      /* deep sea-teal, CTAs & links — 6.9:1 on bg */
  --accent-strong: #17474d;
  --accent-fg: #ffffff;   /* on accent — 6.5:1 */
  --slot-bg: #f6ead1;     /* pending-input chip ground */
  --slot-border: #b98f3e;
  --slot-fg: #5c4308;     /* 7.3:1 on slot-bg */
  --line: rgba(84, 74, 58, 0.22);
  --line-strong: #8a8070;
  --radius: 3px;
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --section-y: clamp(3.25rem, 5.5vw, 4.75rem);
  --gutter: 1.5rem;
  --max-w: 72rem;
  --max-w-narrow: 46rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.65;
}

h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0 0 0.6em; font-weight: 700; }
h1 { font-size: clamp(2.3rem, 5.5vw, 4rem); letter-spacing: 0.005em; }
h2 { font-size: clamp(1.45rem, 3vw, 2rem); }
h3 { font-size: 1.1rem; }

p { margin: 0 0 1em; }
a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius);
}

* { scroll-margin-top: 5rem; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: absolute; left: 0.75rem; top: -3.5rem; z-index: 20;
  background: var(--accent); color: var(--accent-fg);
  padding: 0.6rem 1rem; border-radius: var(--radius);
  text-decoration: none; font-weight: 600;
  transition: top 150ms ease-out;
}
.skip-link:focus { top: 0.75rem; }

.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: var(--max-w-narrow); }
.wrap-narrow-p { max-width: var(--max-w-narrow); }

/* ---------- pending-input slot chips ---------- */

.slot {
  display: inline-block;
  background: var(--slot-bg);
  color: var(--slot-fg);
  border: 1px dashed var(--slot-border);
  border-radius: var(--radius);
  padding: 0 0.4em;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85em;
  white-space: nowrap;
}
.pending-line { color: var(--fg-soft); }

/* ---------- top bar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(250, 249, 247, 0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex; align-items: center; gap: 1rem 1.25rem; flex-wrap: wrap;
  padding-top: 0.7rem; padding-bottom: 0.7rem;
}
.brand {
  font-family: var(--display); font-weight: 700; font-size: 1.15rem;
  color: var(--fg); text-decoration: none; margin-right: auto;
}
.brand span { color: var(--muted); font-weight: 600; }
.topbar nav ul {
  display: flex; gap: 0.25rem; list-style: none; margin: 0; padding: 0;
  overflow-x: auto;
}
.topbar nav a {
  display: inline-block; padding: 0.55rem 0.65rem;
  color: var(--fg-soft); text-decoration: none; font-weight: 500;
  border-radius: var(--radius);
}
.topbar nav a:hover { color: var(--fg); }
.topbar nav a[aria-current="page"] {
  color: var(--fg);
  box-shadow: inset 0 -2px 0 var(--accent);
}

/* Hamburger — rendered only at the mobile breakpoint. */
.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--line-strong);
  border-radius: var(--radius); cursor: pointer;
  padding: 0.55rem 0.6rem; min-height: 44px; min-width: 44px;
}
.nav-toggle-bars { display: block; width: 20px; }
.nav-toggle-bars span {
  display: block; height: 2px; margin: 4px 0;
  background: var(--fg); border-radius: 1px;
  transition: transform 160ms ease, opacity 160ms ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  min-height: 44px;
}
.btn-solid, .btn.btn-pill { background: var(--accent); color: var(--accent-fg); }
.btn-solid:hover, .btn.btn-pill:hover { background: var(--accent-strong); color: var(--accent-fg); }
.btn-ghost { border-color: var(--line-strong); color: var(--fg); }
.btn-ghost:hover { border-color: var(--fg); color: var(--fg); }
.btn-pill { border-radius: 999px; padding: 0.55rem 1.2rem; }
button.btn { font-size: 1rem; font-family: var(--body); cursor: pointer; border: 0; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(160deg, #f6f4ef 0%, #efeae1 55%, #e7e0d3 100%);
}
/* Hand-authored stone-veining impression: layered soft gradients, no images. */
.hero-veins {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60rem 8rem at 12% 30%, rgba(138, 128, 112, 0.18), transparent 60%),
    radial-gradient(48rem 6rem at 78% 18%, rgba(31, 94, 102, 0.10), transparent 65%),
    radial-gradient(70rem 9rem at 60% 82%, rgba(138, 128, 112, 0.14), transparent 60%),
    linear-gradient(115deg, transparent 44%, rgba(120, 110, 94, 0.12) 46%, transparent 49%),
    linear-gradient(100deg, transparent 68%, rgba(120, 110, 94, 0.09) 70%, transparent 74%);
}
.hero-inner {
  position: relative;
  padding-top: clamp(3.5rem, 8vw, 6.5rem);
  padding-bottom: clamp(3.5rem, 8vw, 6rem);
  max-width: 56rem;
}
.hero .lede { max-width: 34rem; }
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin: 1.4rem 0 1rem; }

.hero-note { color: var(--fg-soft); font-weight: 500; margin-bottom: 0; }

/* 3-up band of the owner's own project photos. Fixed-height crop
   (object-fit: cover) so 640px sources render sharp — never stretched. */
.hero-band {
  position: relative;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
  list-style: none; margin: 0; padding: 0;
  border-top: 1px solid var(--line);
}
.hero-band li { margin: 0; min-width: 0; }
.hero-band img {
  display: block; width: 100%; height: clamp(9rem, 18vw, 14rem);
  object-fit: cover;
  /* The counters sit in the lower half of every source photo — bias the
     crop to the bottom or the band shows walls and windows instead. */
  object-position: 50% 88%;
}
@media (max-width: 40rem) {
  .hero-band { grid-template-columns: repeat(3, 1fr); }
  .hero-band img { height: 7rem; }
}

.eyebrow {
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem;
  font-weight: 600; color: var(--muted); margin-bottom: 1rem;
}
.eyebrow-num {
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem;
  font-weight: 600; color: var(--accent); margin-bottom: 0.5rem;
}
.lede { font-size: 1.12rem; color: var(--fg-soft); }

/* ---------- trust strip ---------- */

.trust-strip { border-bottom: 1px solid var(--line); background: var(--bg); }
.trust-strip-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem 2rem; padding-top: 1.4rem; padding-bottom: 1.4rem;
}
.trust-strip-grid p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.trust-strip-grid strong { color: var(--fg); font-size: 1rem; }

/* ---------- sections ---------- */

.section { padding: var(--section-y) 0; }
.section-alt { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.page-head {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(160deg, #f6f4ef, #eee9df);
  padding: clamp(2.5rem, 5vw, 4rem) 0;
}
.page-head .lede { max-width: 38rem; margin-bottom: 0; }

/* ---------- material tiles & swatches ---------- */

.tile-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.25rem; margin-top: 1.5rem;
}
.tile {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; text-decoration: none; color: var(--fg);
  overflow: hidden;
}
.tile:hover { border-color: var(--line-strong); color: var(--fg); }
.tile-body { padding: 1rem 1.1rem 1.2rem; display: block; }
.tile-label { display: block; font-family: var(--display); font-weight: 700; font-size: 1.15rem; margin-bottom: 0.3rem; }
.tile-teaser { display: block; color: var(--muted); font-size: 0.95rem; line-height: 1.5; }

/* Stylized color impressions — hand-authored gradients, deliberately abstract
   so they can never be mistaken for photographs of real slabs. */
.tile-swatch { display: block; height: 7rem; }
.material-swatch { display: block; width: 100%; height: 9rem; border-radius: var(--radius); border: 1px solid var(--line); }

.swatch-quartz {
  background:
    radial-gradient(18rem 3rem at 30% 40%, rgba(255,255,255,0.75), transparent 70%),
    linear-gradient(135deg, #dfe5e9 0%, #c4ced5 50%, #aebbc4 100%);
}
.swatch-granite {
  background:
    radial-gradient(3px 3px at 20% 30%, #3f3830 50%, transparent 51%),
    radial-gradient(4px 4px at 60% 60%, #55493c 50%, transparent 51%),
    radial-gradient(3px 3px at 80% 25%, #362f28 50%, transparent 51%),
    radial-gradient(4px 4px at 40% 75%, #6a5d4d 50%, transparent 51%),
    radial-gradient(3px 3px at 72% 82%, #493f34 50%, transparent 51%),
    radial-gradient(2px 2px at 12% 68%, #37302a 50%, transparent 51%),
    linear-gradient(120deg, #93887a, #776c5e 60%, #8d8172);
}
.swatch-quartzite {
  background:
    linear-gradient(105deg, transparent 30%, rgba(122, 110, 92, 0.55) 32%, transparent 36%),
    linear-gradient(112deg, transparent 60%, rgba(122, 110, 92, 0.4) 62%, transparent 67%),
    linear-gradient(98deg, transparent 78%, rgba(122, 110, 92, 0.3) 80%, transparent 85%),
    linear-gradient(150deg, #ece7db, #d8d0bd 55%, #c6bba3);
}
.swatch-marble {
  background:
    linear-gradient(115deg, transparent 40%, rgba(90, 95, 105, 0.55) 41.5%, transparent 44%),
    linear-gradient(95deg, transparent 70%, rgba(90, 95, 105, 0.4) 71.5%, transparent 75%),
    linear-gradient(128deg, transparent 22%, rgba(90, 95, 105, 0.28) 23.5%, transparent 27%),
    linear-gradient(160deg, #f3f1ee, #e0dfdc 60%, #cfcecb);
}

/* ---------- materials page ---------- */

.material-row {
  display: grid; grid-template-columns: minmax(10rem, 16rem) 1fr;
  gap: 1.5rem 2rem; align-items: start;
  padding: 2rem 0; border-bottom: 1px solid var(--line);
}
.material-row:last-of-type { border-bottom: 0; }
.care-note { color: var(--muted); font-size: 0.95rem; margin-bottom: 0; }

@media (max-width: 40rem) {
  .material-row { grid-template-columns: 1fr; }
}

/* ---------- process ---------- */

.process-strip {
  counter-reset: step;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1.5rem; list-style: none; margin: 1.5rem 0 1rem; padding: 0;
}
.process-strip li { counter-increment: step; }
.process-strip h3::before, .process-list h2::before {
  content: counter(step, decimal-leading-zero) " — ";
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.process-strip p { color: var(--fg-soft); font-size: 0.95rem; margin: 0; }

.process-list {
  counter-reset: step;
  list-style: none; margin: 0; padding: 0;
}
.process-list li {
  counter-increment: step;
  padding: 1.5rem 0; border-bottom: 1px solid var(--line);
}
.process-list li:last-child { border-bottom: 0; }
.process-list p { color: var(--fg-soft); margin-bottom: 0; }

/* ---------- gallery ---------- */

.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1.25rem; list-style: none; margin: 1rem 0 1.5rem; padding: 0;
}
.gallery-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; overflow: hidden;
}
.gallery-card img {
  display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
}
.gallery-caption {
  margin: 0; padding: 0.7rem 0.9rem;
  color: var(--fg-soft); font-size: 0.92rem;
}
.section-tight { padding-top: 0; }

.about-figure { margin: 2rem 0 0; }
.about-figure img {
  display: block; width: 100%; max-width: 28rem;
  border-radius: var(--radius); border: 1px solid var(--line);
}
.about-figure figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 0.5rem; }

/* ---------- value strip / contact ---------- */

.value-strip {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; padding: 1.5rem;
}
.value-strip-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.5rem 2.5rem;
}
.value-strip h2 { font-size: 1.15rem; }

.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.field input, .field textarea, .field select {
  width: 100%; padding: 0.7rem 0.8rem;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: #fff; color: var(--fg);
  font: inherit;
}
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible {
  outline-offset: 1px;
}
.field-hint { color: var(--muted); font-size: 0.88rem; margin: 0.35rem 0 0; }

.form-status {
  margin-top: 1rem; padding: 0.9rem 1.1rem;
  background: var(--slot-bg); border: 1px solid var(--slot-border);
  border-radius: var(--radius);
}
.form-status p { margin: 0; color: var(--slot-fg); }

.price-note { color: var(--muted); font-size: 0.95rem; }

/* ---------- CTA band ---------- */

.cta-band { background: var(--accent); color: var(--accent-fg); }
.cta-band-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
  padding-top: 2.5rem; padding-bottom: 2.5rem;
}
.cta-band h2 { color: var(--accent-fg); margin-bottom: 0.4rem; }
.cta-band p { margin: 0; color: #d9e6e8; max-width: 34rem; }
.cta-band .btn-solid { background: var(--bg); color: var(--accent-strong); }
.cta-band .btn-solid:hover { background: #fff; color: var(--accent-strong); }
.cta-band .btn-solid:focus-visible { outline-color: var(--accent-fg); }

/* ---------- 404 ---------- */

.notfound { text-align: center; }
.notfound-num {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(4rem, 12vw, 7rem); color: var(--line-strong);
  margin: 0;
}
.notfound .btn { margin: 0 0.3rem; }

/* ---------- footer ---------- */

footer { border-top: 1px solid var(--line); background: var(--card); }
.footer-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.5rem 2.5rem; padding-top: 2.5rem; padding-bottom: 1.5rem;
}
.footer-brand { font-family: var(--display); font-weight: 700; font-size: 1.1rem; margin-bottom: 0.5rem; }
.footer-heading {
  text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.78rem;
  font-weight: 600; color: var(--muted); margin-bottom: 0.5rem;
}
footer ul { list-style: none; margin: 0; padding: 0; }
footer li { margin-bottom: 0.35rem; }
footer p { color: var(--fg-soft); }
.footer-fine {
  border-top: 1px solid var(--line);
  padding-top: 1rem; padding-bottom: 1.5rem;
}
.footer-fine p { color: var(--muted); font-size: 0.9rem; margin: 0; }

/* ---------- persistent estimate widget (every page, bottom right) ---------- */

.estimate-fab {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 30;
  display: flex; flex-direction: column; align-items: flex-end; gap: 0.6rem;
}
.estimate-fab-toggle { box-shadow: 0 6px 18px rgba(31, 41, 38, 0.28); }
.estimate-card {
  width: min(20rem, calc(100vw - 2rem));
  background: var(--bg, #faf9f7);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(31, 41, 38, 0.22);
  padding: 1rem 1.1rem;
}
.estimate-card-title {
  font-family: var(--display); font-weight: 700; font-size: 1.1rem;
  margin: 0 0 0.35rem;
}
.estimate-card-copy { margin: 0 0 0.75rem; color: var(--fg-soft); font-size: 0.95rem; }
.estimate-card-cta { display: block; text-align: center; }
.estimate-card-links { margin: 0.75rem 0 0; font-size: 0.95rem; }

/* ---------- mobile ---------- */

@media (max-width: 46rem) {
  .topbar-inner { row-gap: 0.4rem; }
  .brand { flex: 1 1 auto; }
  .nav-toggle { display: inline-block; order: 2; }
  .topbar nav { order: 3; flex-basis: 100%; display: none; }
  .topbar nav.is-open { display: block; }
  .topbar nav.is-open ul {
    flex-direction: column; gap: 0;
    padding: 0.25rem 0 0.6rem; overflow: visible;
  }
  .topbar nav.is-open a { display: block; padding: 0.7rem 0.4rem; }
  .cta-band-inner { flex-direction: column; align-items: flex-start; }
  /* Reserve room so the fixed estimate-fab pill/card never sits on top of
     the footer or a page's own submit button on short mobile viewports. */
  body { padding-bottom: 4.5rem; }
}
