/* Oakstone Remodeling Co. — site styles
   Palette from the logo: forest green + gold, set on Kentucky limestone neutrals. Type: Gloock (display) + Hanken Grotesk (text). */

:root {
  --gold-text: #86642A;
  --paper: #F5F6F3;
  --limestone: #E2DFD6;
  --limestone-deep: #CFCBBF;
  --walnut: #16261B;
  --oak: #6B4A2F;
  --sage: #234A30;
  --sage-dark: #183522;
  --brass: #B7893F;
  --ink: #1C221F;
  --muted: #545C57;
  --white: #FFFFFF;

  --display: "Gloock", Georgia, "Times New Roman", serif;
  --text: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --measure: 66ch;
  --wrap: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(4rem, 9vw, 7.5rem);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--sage-dark); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--oak); }

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

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.1; margin: 0 0 0.6em; letter-spacing: -0.01em; color: var(--ink); }
h1 { font-size: clamp(2.5rem, 5.4vw, 4.5rem); }
h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
h3 { font-size: 1.375rem; line-height: 1.25; }
h4 { font-family: var(--text); font-weight: 600; font-size: 1.0625rem; margin: 0 0 0.4em; }
p { margin: 0 0 1.1em; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 58ch; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.prose { max-width: var(--measure); }
.prose h2 { margin-top: 1.6em; font-size: clamp(1.75rem, 3vw, 2.4rem); }
.prose h3 { margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--walnut); color: var(--white); padding: 0.75rem 1rem; z-index: 100; }
.skip-link:focus { left: 1rem; top: 1rem; }

/* Buttons */
.btn {
  display: inline-block; font-family: var(--text); font-weight: 600; font-size: 1rem;
  padding: 0.85rem 1.4rem; border-radius: 2px; text-decoration: none; border: 1.5px solid transparent;
  cursor: pointer; line-height: 1.2;
}
.btn-primary { background: var(--sage); color: var(--white); }
.btn-primary:hover { background: var(--sage-dark); color: var(--white); }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-light { background: var(--paper); color: var(--walnut); }
.btn-light:hover { background: var(--limestone); color: var(--walnut); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

/* Header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--limestone-deep); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; gap: 1.25rem; min-height: 76px; }
.hero-drawing { margin: 0; }
.logo { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.logo img { width: 230px; height: auto; }
@media (max-width: 520px) { .logo img { width: 180px; } }
.logo-word { font-family: var(--display); font-size: 1.5rem; line-height: 1; color: var(--sage-dark); letter-spacing: 0.06em; }
.logo-word small { display: block; font-family: var(--text); font-size: 0.68rem; font-weight: 600; color: var(--brass); letter-spacing: 0.22em; margin-top: 5px; }

.nav { margin-left: auto; }
.nav > ul { list-style: none; display: flex; gap: 0.25rem; margin: 0; padding: 0; align-items: center; }
.nav a { display: block; padding: 0.6rem 0.7rem; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.97rem; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--sage); }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--brass); text-decoration-thickness: 2px; text-underline-offset: 0.45em; }
.has-sub { position: relative; }
.sub { list-style: none; margin: 0; padding: 0.5rem 0; position: absolute; top: 100%; left: 0; min-width: 240px; background: var(--white); border: 1px solid var(--limestone-deep); box-shadow: 0 12px 28px rgba(22, 38, 27, 0.14); display: none; }
.has-sub:hover .sub, .has-sub:focus-within .sub { display: block; }
.sub a { padding: 0.5rem 1rem; font-weight: 400; }
.header-cta { display: flex; align-items: center; gap: 1rem; }
.header-phone { font-weight: 600; color: var(--ink); text-decoration: none; white-space: nowrap; }
.nav-toggle { display: none; background: none; border: 1.5px solid var(--ink); padding: 0.5rem 0.8rem; font: inherit; font-weight: 600; border-radius: 2px; color: var(--ink); }

@media (max-width: 1260px) {
  .header-phone { display: none; }
}
@media (max-width: 1040px) {
  .nav-toggle { display: inline-block; margin-left: auto; }
  .header-cta { display: none; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--limestone-deep); display: none; max-height: calc(100vh - 76px); overflow-y: auto; }
  .nav.open { display: block; }
  .nav > ul { flex-direction: column; align-items: stretch; padding: 0.5rem var(--gutter) 1.5rem; gap: 0; }
  .nav a { padding: 0.8rem 0; border-bottom: 1px solid var(--limestone); }
  .sub { position: static; display: block; border: 0; box-shadow: none; background: transparent; padding: 0 0 0 1rem; }
  .sub a { padding: 0.6rem 0; }
  .nav .mobile-call { display: block; margin-top: 1rem; }
}
@media (min-width: 1041px) { .nav .mobile-call { display: none; } }

/* Hero */
.hero { padding: clamp(3rem, 7vw, 6rem) 0 clamp(3.5rem, 7vw, 6rem); }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { max-width: 17ch; font-size: clamp(2.5rem, 4.6vw, 4.1rem); }
.hero-areas { margin-top: 2rem; font-size: 0.95rem; color: var(--muted); max-width: 52ch; }
.hero-drawing { background: var(--limestone); padding: clamp(1rem, 2.5vw, 2rem); border: 1px solid var(--limestone-deep); }
.hero-drawing svg { width: 100%; }
.hero-drawing figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 0.75rem; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero h1 { max-width: 18ch; } }

/* Drawing reveal — the one orchestrated motion moment */
.draw path, .draw line, .draw rect, .draw circle, .draw polyline { stroke-dasharray: 1200; stroke-dashoffset: 0; }
@media (prefers-reduced-motion: no-preference) {
  .draw.animate path, .draw.animate line, .draw.animate rect, .draw.animate circle, .draw.animate polyline { animation: draw 1.6s ease-out both; }
  .draw.animate .dim line { animation-delay: 0.9s; animation-duration: 0.9s; }
  .draw.animate text { animation: fade 0.5s ease-out 1.6s both; }
}
@keyframes draw { from { stroke-dashoffset: 1200; } to { stroke-dashoffset: 0; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* Page hero (interior pages) */
.page-hero { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2.5rem, 5vw, 4rem); border-bottom: 1px solid var(--limestone-deep); }
.page-hero h1 { max-width: 20ch; }
.page-hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: end; }
.page-hero-grid .hero-drawing { align-self: center; }
@media (max-width: 860px) { .page-hero-grid { grid-template-columns: 1fr; } }

.breadcrumbs { font-size: 0.9rem; color: var(--muted); margin-bottom: 1.5rem; }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.breadcrumbs li + li::before { content: "/"; margin-right: 0.4rem; color: var(--limestone-deep); }
.breadcrumbs a { color: var(--muted); }

/* Sections */
.section { padding: var(--section) 0; }
.section-stone { background: var(--limestone); }
.section-walnut { background: var(--walnut); color: #E9EDE6; }
.section-walnut h2, .section-walnut h3 { color: var(--white); }
.section-walnut a { color: #E3C98F; }
.section-walnut .btn-light, .section-walnut .btn-light:hover { color: var(--walnut); }
.section-walnut .btn-primary { color: var(--white); }
.section-walnut .form h3 { color: var(--ink); }
.section-walnut .form a { color: var(--sage-dark); }
.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section-head p { color: var(--muted); font-size: 1.125rem; }
.section-walnut .section-head p { color: #C6CEC4; }

/* Services */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 clamp(1.5rem, 3vw, 2.5rem); }
.service { border-top: 1px solid var(--ink); padding: 1.5rem 0 2.5rem; display: flex; flex-direction: column; }
.service .art { background: var(--limestone); margin-bottom: 1.25rem; padding: 1rem 1.25rem; }
.service p { color: var(--muted); flex-grow: 1; }
.service .more { font-weight: 600; }
@media (max-width: 900px) { .services { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .services { grid-template-columns: 1fr; } }

/* Split / commitments */
.split { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.commitments { list-style: none; margin: 0; padding: 0; }
.commitments li { padding: 1.25rem 0; border-top: 1px solid var(--limestone-deep); }
.commitments li:last-child { border-bottom: 1px solid var(--limestone-deep); }
.section-stone .commitments li { border-color: var(--limestone-deep); }
.commitments h3 { font-size: 1.25rem; margin-bottom: 0.3em; }
.commitments p { margin: 0; color: var(--muted); }

/* Process — a real sequence, so numbered */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1.25rem, 3vw, 2.25rem); counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-top: 4.25rem; }
.steps li::before { content: counter(step); position: absolute; top: 0; left: 0; font-family: var(--display); font-size: 2.6rem; line-height: 1; color: var(--brass); }
.steps li::after { content: ""; position: absolute; top: 1.3rem; left: 2.6rem; right: -1rem; height: 1px; background: currentColor; opacity: 0.3; }
.steps li:last-child::after { display: none; }
.steps h3 { font-size: 1.25rem; }
.steps p { color: inherit; opacity: 0.85; margin: 0; }
.steps .time { display: block; font-size: 0.9rem; margin-top: 0.75rem; opacity: 0.7; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } .steps li::after { display: none; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* Price table */
.prices { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: 1rem; }
.prices caption { text-align: left; font-family: var(--display); font-size: 1.375rem; padding-bottom: 0.75rem; }
.prices tbody th { min-width: 9rem; }
.prices th, .prices td { text-align: left; padding: 0.9rem 1rem 0.9rem 0; border-bottom: 1px solid var(--limestone-deep); vertical-align: top; }
.prices thead th { font-weight: 600; font-size: 0.9rem; color: var(--muted); border-bottom: 1px solid var(--ink); }
.prices td:nth-child(2) { white-space: nowrap; font-weight: 600; }
.prices td:last-child { color: var(--muted); }
.note { font-size: 0.92rem; color: var(--muted); }

/* Areas */
.areas { list-style: none; padding: 0; margin: 0; columns: 3 14rem; column-gap: 2rem; }
.areas li { break-inside: avoid; border-top: 1px solid var(--limestone-deep); }
.areas a { display: flex; justify-content: space-between; padding: 0.85rem 0; text-decoration: none; color: var(--ink); font-weight: 500; }
.areas a span { color: var(--muted); font-weight: 400; font-size: 0.9rem; }
.areas a:hover { color: var(--sage); }

/* Two-column lists on service pages */
.cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(2rem, 5vw, 4rem); }
@media (max-width: 760px) { .cols { grid-template-columns: 1fr; } }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { padding: 0.7rem 0 0.7rem 1.75rem; border-bottom: 1px solid var(--limestone-deep); position: relative; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 1.2rem; width: 0.9rem; height: 1px; background: var(--brass); }

.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li { border-bottom: 1px solid var(--limestone-deep); }
.link-list a { display: block; padding: 0.7rem 0; text-decoration: none; font-weight: 500; }

/* FAQ */
.faq { max-width: 52rem; }
.faq details { border-top: 1px solid var(--limestone-deep); }
.faq details:last-child { border-bottom: 1px solid var(--limestone-deep); }
.faq summary { cursor: pointer; list-style: none; padding: 1.2rem 2.5rem 1.2rem 0; position: relative; font-weight: 600; font-size: 1.1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.25rem; top: 0.95rem; font-family: var(--text); font-weight: 400; font-size: 1.75rem; line-height: 1; color: var(--sage); }
.faq details[open] summary::after { content: "\2212"; }
.faq .answer { padding: 0 0 1.25rem; color: var(--muted); max-width: var(--measure); }
.faq .answer p:last-child { margin-bottom: 0; }

/* Reviews */
.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.reviews blockquote { margin: 0; border-left: 2px solid var(--brass); padding-left: 1.25rem; }
.reviews p { font-family: var(--display); font-size: 1.2rem; line-height: 1.4; }
.reviews cite { font-style: normal; color: var(--muted); font-size: 0.95rem; }
@media (max-width: 860px) { .reviews { grid-template-columns: 1fr; } }

/* Contact / form */
.cta-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
@media (max-width: 900px) { .cta-grid { grid-template-columns: 1fr; } }
.contact-lines { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.contact-lines li { padding: 0.6rem 0; border-top: 1px solid rgba(255,255,255,0.15); }
.section:not(.section-walnut) .contact-lines li { border-color: var(--limestone-deep); }
.contact-lines strong { display: block; font-size: 0.85rem; font-weight: 600; opacity: 0.75; }

.form { background: var(--paper); color: var(--ink); padding: clamp(1.5rem, 3.5vw, 2.5rem); border-radius: 2px; }
.form h3 { margin-bottom: 0.25em; }
.form .hint { color: var(--muted); font-size: 0.95rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.25rem; margin-top: 1.25rem; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.form label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 0.35rem; }
.form input, .form select, .form textarea {
  width: 100%; font: inherit; font-size: 1rem; padding: 0.75rem 0.85rem; border: 1px solid #A9A69C; border-radius: 2px; background: var(--white); color: var(--ink);
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--brass); outline-offset: 0; border-color: var(--brass); }
.form textarea { min-height: 120px; resize: vertical; }
.form .hp { position: absolute; left: -5000px; }
.form button { margin-top: 1.25rem; width: 100%; }
.form-status { margin-top: 1rem; font-weight: 500; }
.form-status[data-state="ok"] { color: var(--sage-dark); }
.form-status[data-state="error"] { color: #8A2E1F; }
.form .fine { font-size: 0.85rem; color: var(--muted); margin-top: 0.75rem; }

/* CTA band */
.band { padding: clamp(3rem, 6vw, 4.5rem) 0; background: var(--sage-dark); color: var(--white); border-top: 3px solid var(--brass); }
.band-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.band h2 { color: var(--white); margin: 0; font-size: clamp(1.75rem, 3.2vw, 2.5rem); max-width: 22ch; }

/* Footer — light, so the full-color logo reads as designed */
.site-footer { background: var(--limestone); color: var(--muted); padding: 4.5rem 0 2rem; font-size: 0.97rem; border-top: 3px solid var(--brass); }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { color: var(--sage); text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h2 { font-family: var(--text); font-size: 0.95rem; font-weight: 600; color: var(--ink); margin-bottom: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.5rem; }
.footer-logo { width: 190px; height: auto; margin-bottom: 1.25rem; }
.footer-base { border-top: 1px solid var(--limestone-deep); margin-top: 3rem; padding-top: 1.5rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: 0.88rem; }

/* Misc */
.empty-state { background: var(--limestone); padding: clamp(1.5rem, 4vw, 2.5rem); max-width: 46rem; }
.inline-stat { font-family: var(--display); font-size: 1.5rem; color: var(--sage-dark); margin: 0.1em 0 0.3em !important; }
.price-list h3 { font-family: var(--text); font-weight: 600; font-size: 1rem; margin: 0; }
.prose .checklist { padding-left: 0; }
.mt-0 { margin-top: 0; }
.center-404 { text-align: left; padding: var(--section) 0; }

@media (max-width: 640px) {
  .prices thead { display: none; }
  .prices tr { display: block; padding: 0.9rem 0; border-bottom: 1px solid var(--limestone-deep); }
  .prices th, .prices td { display: block; border: 0; padding: 0.15rem 0; }
  .prices tbody th { min-width: 0; }
  .prices td:nth-child(2) { white-space: normal; color: var(--sage-dark); }
}
.split > *, .cols > *, .hero-grid > *, .cta-grid > * { min-width: 0; }
.prose > h2:first-child { margin-top: 0; }

/* Photos */
.photo { width: 100%; height: auto; object-fit: cover; display: block; background: var(--limestone); }
.hero-media { margin: 0; }
.hero-media .photo { border-radius: 2px; }
.card-photo { margin-bottom: 1.25rem; overflow: hidden; }
.page-hero-grid .hero-media { align-self: center; }
@media (max-width: 860px) { .hero .hero-media .photo { aspect-ratio: 4 / 3 !important; } }

/* Dropdown chevrons, as in the reference nav */
.has-sub > a::after { content: ""; display: inline-block; width: 0.42em; height: 0.42em; margin-left: 0.45em; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-0.2em) rotate(45deg); }
@media (max-width: 1040px) { .has-sub > a::after { display: none; } }

/* Portfolio galleries */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2vw, 1.5rem); margin-top: 1.5rem; }
.gallery .g-wide { grid-column: span 2; grid-row: span 2; }
.gallery .g-span2 { grid-column: span 2; }
.gallery .g-span3 { grid-column: span 3; }
.gallery .g-span2 .photo { aspect-ratio: 8 / 3 !important; } .gallery .g-span3 .photo { aspect-ratio: 4 / 1 !important; }
.g-item { margin: 0; }
.g-item a { display: block; overflow: hidden; border-radius: 2px; }
.g-item .photo { transition: transform .4s ease; }
.g-item a:hover .photo, .g-item a:focus-visible .photo { transform: scale(1.03); }
.g-item figcaption { font-size: 0.92rem; color: var(--muted); margin-top: 0.55rem; }
.g-wide .photo { height: calc(100% - 0px); }
.g-note { max-width: 60ch; border-left: 2px solid var(--brass); padding-left: 0.9rem; }
.pf-cat { margin-top: clamp(2.5rem, 5vw, 4rem); }
.pf-cat-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border-top: 1px solid var(--ink); padding-top: 1.25rem; }
.pf-cat-head h2 { margin: 0; }
@media (max-width: 900px) { .gallery { grid-template-columns: repeat(2, 1fr); } .gallery .g-span2, .gallery .g-span3 { grid-column: auto; } .gallery .g-span2 .photo, .gallery .g-span3 .photo { aspect-ratio: 4 / 3 !important; } }
@media (max-width: 560px) { .gallery { grid-template-columns: 1fr; } .gallery .g-wide, .gallery .g-span2, .gallery .g-span3 { grid-column: auto; grid-row: auto; } }
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1200px, 94vw); }
.lightbox::backdrop { background: rgba(14, 22, 17, 0.88); }
.lightbox img { max-height: 82vh; width: auto; max-width: 100%; display: block; margin: 0 auto; }
.lightbox p { color: #E9EDE6; text-align: center; margin: 0.75rem 0 0; }
.lightbox button { position: fixed; top: 1rem; right: 1rem; background: var(--paper); border: 0; font: inherit; font-weight: 600; padding: 0.6rem 1rem; border-radius: 2px; cursor: pointer; }
