:root {
  --cream: #f6f1e8;
  --paper: #fbf8f2;
  --sage: #6b7a5e;
  --sage-dark: #4c5943;
  --ink: #2a2924;
  --muted: #6c6860;
  --tan: #cdb99a;
  --line: #e2d9c8;
  --serif: "Cormorant Garamond", Georgia, serif;
  --script: "Great Vibes", cursive;
  --sans: "Jost", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 300 17px/1.65 var(--sans); }
img { max-width: 100%; display: block; }
a { color: var(--sage-dark); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.1; margin: 0 0 .5em; }
h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
h3 { font-size: 1.4rem; }

.announce { background: var(--sage-dark); color: var(--cream); text-align: center; font-size: .9rem; padding: 10px 16px; }
.announce strong { font-weight: 500; margin-right: .4em; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px clamp(16px, 4vw, 48px); background: rgba(251, 248, 242, .95); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.brand { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--script); font-size: 2rem; }
.brand-sub { font-size: .65rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.links { display: flex; align-items: center; gap: 28px; }
.links a { text-decoration: none; color: var(--ink); font-size: .95rem; letter-spacing: .04em; }
.links a:hover { color: var(--sage); }
.menu-btn { display: none; background: none; border: 0; font-size: 1.6rem; color: var(--ink); cursor: pointer; }

/* Buttons */
.btn { display: inline-block; background: var(--sage-dark); color: var(--cream) !important; border: 1px solid var(--sage-dark); padding: 13px 26px; border-radius: 2px; text-decoration: none; font: 400 .85rem var(--sans); letter-spacing: .14em; text-transform: uppercase; cursor: pointer; transition: background .2s; }
.btn:hover { background: var(--sage); }
.btn-small { padding: 9px 18px; font-size: .75rem; }
.btn-ghost { background: transparent; color: var(--cream) !important; border-color: var(--cream); }
.btn-ghost:hover { background: rgba(255, 255, 255, .15); }

/* Hero */
.hero { position: relative; min-height: min(86vh, 760px); display: flex; align-items: flex-end; color: #fff; }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(20, 22, 18, .8), rgba(20, 22, 18, .2) 70%), linear-gradient(to right, rgba(20, 22, 18, .55), transparent 60%); }
.hero-text { position: relative; z-index: 1; padding: clamp(28px, 6vw, 80px); max-width: 760px; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 500; }
.hero p { font-size: 1.15rem; margin: 0 0 1.6em; }
.hero .script { font-family: var(--script); font-size: clamp(2rem, 4vw, 2.8rem); margin: 0; color: #e8d9bd; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Sections */
.section { padding: clamp(64px, 9vw, 120px) clamp(16px, 5vw, 64px); max-width: 1280px; margin: 0 auto; }
.eyebrow { font-size: .75rem; letter-spacing: .25em; text-transform: uppercase; color: var(--sage); margin-bottom: 12px; }
.lead { max-width: 640px; color: var(--muted); font-size: 1.1rem; margin: 0 0 40px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.card { background: var(--cream); padding: 30px 26px; border-top: 3px solid var(--tan); }
.card p { margin: 0; color: var(--muted); }

/* Gallery */
.work { max-width: none; background: var(--cream); }
.work > * { max-width: 1280px; margin-left: auto; margin-right: auto; }
.work .lead { margin-left: auto; margin-right: auto; }
.gallery { columns: 3 300px; column-gap: 14px; }
.gallery a { display: block; margin-bottom: 14px; break-inside: avoid; overflow: hidden; }
.gallery img { width: 100%; transition: transform .5s; }
.gallery a:hover img { transform: scale(1.03); }

/* Process */
.process-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.process-grid img { aspect-ratio: 3 / 4; object-fit: cover; width: 100%; }

/* Estimator */
.estimator { background: var(--cream); max-width: none; }
.estimator > * { max-width: 1100px; margin-left: auto; margin-right: auto; }
.estimator .lead { margin-left: auto; margin-right: auto; }
.est { display: grid; grid-template-columns: 1fr 380px; gap: 24px; align-items: start; }
.est-inputs { display: grid; gap: 18px; min-width: 0; }
fieldset { border: 1px solid var(--line); background: var(--paper); padding: 22px; margin: 0; min-width: 0; }
fieldset[hidden] { display: none; }
legend { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; padding: 0 6px; }
.hint { font: 300 .85rem var(--sans); color: var(--muted); margin: 0; }
.hint:empty { display: none; }
label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 14px; }
label[hidden] { display: none; }
input, textarea, select { display: block; width: 100%; margin-top: 5px; padding: 11px 12px; font: 400 1rem var(--sans); color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 2px; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--sage); outline-offset: 0; border-color: var(--sage); }
.tabs { display: flex; border: 1px solid var(--sage-dark); }
.tabs button { flex: 1; padding: 12px 8px; border: 0; background: var(--paper); color: var(--sage-dark); font: 400 .9rem var(--sans); cursor: pointer; }
.tabs button + button { border-left: 1px solid var(--sage-dark); }
.tabs button[aria-selected="true"] { background: var(--sage-dark); color: var(--cream); }
.dims { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 16px; }
.dim { margin-bottom: 14px; min-width: 0; }
.dim-label { display: block; font-size: .85rem; color: var(--muted); }
.dim-pair { display: flex; align-items: center; gap: 6px; margin-top: 5px; }
.dim-pair input { margin: 0; min-width: 0; }
.dim-pair span { font-size: .85rem; color: var(--muted); }
.wall-row { display: grid; grid-template-columns: 1fr 1fr 42px; gap: 0 12px; align-items: end; position: relative; padding-top: 22px; border-top: 1px solid var(--line); margin-top: 6px; }
.wall-row:first-child { border-top: 0; margin-top: 0; padding-top: 18px; }
.wall-name { position: absolute; top: 2px; left: 0; font-family: var(--serif); font-weight: 600; font-size: 1.05rem; }
.wall-row button { margin-bottom: 14px; background: none; border: 1px solid var(--line); height: 44px; cursor: pointer; color: var(--muted); font-size: 1.2rem; }
.wall-row button[hidden] { visibility: hidden; display: block; }
.wall-row .wrap { grid-column: 1 / -1; margin: 0 0 14px; font-size: .9rem; }
.wall-row .wrap[hidden] { display: none; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.match { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; margin-bottom: 14px; }
.match-label { width: 100%; font-size: .85rem; color: var(--muted); }
.match label, .check { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--ink); font-size: .95rem; cursor: pointer; }
.match input, .check input { width: auto; margin: 0; accent-color: var(--sage-dark); }
.mural { font-style: italic; }
.openings { border: 1px solid var(--line); background: var(--paper); padding: 0 22px; }
.openings[hidden] { display: none; }
.openings summary { cursor: pointer; padding: 16px 0; font-family: var(--serif); font-size: 1.2rem; font-weight: 600; list-style-position: outside; }
.openings[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.openings > .hint { margin: 4px 0 18px; }
.badge { display: inline-block; min-width: 22px; padding: 1px 7px; border-radius: 11px; background: var(--sage-dark); color: var(--cream); font: 500 .75rem/1.6 var(--sans); text-align: center; vertical-align: middle; }
.badge[hidden] { display: none; }
.wall-editor { margin-bottom: 18px; }
.wall-editor[hidden] { display: none; }
.we-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.we-tabs button { background: #fff; border: 1px solid var(--line); color: var(--ink); padding: 6px 12px; font: 400 .85rem var(--sans); cursor: pointer; border-radius: 2px; }
.we-tabs button[aria-pressed="true"] { background: var(--sage-dark); border-color: var(--sage-dark); color: var(--cream); }
.we-dot { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--tan); color: var(--ink); font-size: .7rem; text-align: center; }
#we-svg { display: block; width: 100%; height: auto; max-height: 460px; background: #fff; border: 1px solid var(--line); touch-action: none; user-select: none; -webkit-user-select: none; }
#we-svg .s1 { fill: #f3ecdf; }
#we-svg .s2 { fill: #ebe2d1; }
#we-svg .cut { fill: url(#hatch); }
#we-svg .cut-bg { fill: #f8f4ec; }
#we-svg .cut-line { stroke: #cdb99a; stroke-width: 1.2; }
#we-svg .seam { stroke: #cdb99a; stroke-width: .5; stroke-dasharray: 2 2; }
#we-svg .wall { fill: none; stroke: var(--ink); stroke-width: 1; }
#we-svg .op { cursor: grab; outline: none; }
#we-svg .op rect { fill: var(--sage-dark); stroke: var(--ink); stroke-width: .8; }
#we-svg .op.active rect, #we-svg .op:focus-visible rect { fill: var(--sage); stroke: var(--tan); stroke-width: 2; }
#we-svg .op.active { cursor: grabbing; }
#we-svg .op text { fill: var(--cream); text-anchor: middle; font-family: var(--sans); font-weight: 500; pointer-events: none; }
#we-svg .op .op-size { font-weight: 300; opacity: .85; }
#we-svg .dl { stroke: var(--muted); stroke-width: .7; }
#we-svg .dt { fill: var(--ink); text-anchor: middle; font-family: var(--sans); }
.open-row { padding-bottom: 2px; margin-bottom: 14px; border-bottom: 1px dashed var(--line); }
.open-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.open-name { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; min-width: 110px; }
.open-wall { display: flex; align-items: center; gap: 8px; margin: 0; flex: 1; }
.open-wall select { margin: 0; padding: 7px 10px; font-size: .9rem; max-width: 200px; }
.open-head button { background: none; border: 1px solid var(--line); width: 38px; height: 38px; cursor: pointer; color: var(--muted); font-size: 1.2rem; flex: none; }
.open-row .dims { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
@media (max-width: 600px) { .open-name { min-width: 0; } .open-wall { gap: 6px; } .open-wall select { max-width: none; } }
.open-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.open-add span { font-size: .85rem; color: var(--muted); }
.open-add button { background: #fff; border: 1px solid var(--sage); color: var(--sage-dark); padding: 7px 12px; font: 400 .85rem var(--sans); cursor: pointer; border-radius: 2px; }
.open-add button:hover { background: var(--cream); }
.add-hint { font-size: .75rem; color: var(--muted); margin-left: 4px; }
#we-svg .op.object rect { fill: var(--tan); }
#we-svg .op.object text { fill: var(--ink); }
#we-svg .op.object.active rect, #we-svg .op.object:focus-visible rect { fill: #dccbb0; stroke: var(--sage-dark); }
.diagram .hole.object { fill: var(--tan); stroke-dasharray: none; }
.link-btn { background: none; border: 0; padding: 0; margin: 0 0 18px; color: var(--sage-dark); font: 400 .9rem var(--sans); cursor: pointer; text-decoration: underline; }
.est-result { background: var(--sage-dark); color: var(--cream); padding: 30px 24px; text-align: center; position: sticky; top: 90px; }
.result-num { font-family: var(--serif); font-size: 4.5rem; line-height: 1; font-variant-numeric: lining-nums; margin-bottom: 8px; }
.result-label { letter-spacing: .2em; text-transform: uppercase; font-size: .75rem; }
.result-detail { font-size: .9rem; opacity: .85; margin: 14px 0 16px; }
.diagram svg { width: 100%; height: auto; max-height: 220px; }
.diagram .s1 { fill: #f3ecdf; }
.diagram .s2 { fill: #e4d8c2; }
.diagram .motif { fill: var(--sage); opacity: .55; }
.diagram .cut { fill: #c9bfa9; }
.diagram .hole { fill: var(--sage-dark); stroke: var(--cream); stroke-width: 1; stroke-dasharray: 3 2; }
.diagram .frame { fill: none; stroke: var(--cream); stroke-width: 1.5; }
.diagram .lbl { fill: var(--cream); font: 500 11px var(--sans); text-anchor: middle; }
.diagram .sub { fill: var(--cream); opacity: .75; font: 300 10px var(--sans); text-anchor: middle; }
.warn { background: rgba(255, 255, 255, .12); border-left: 3px solid var(--tan); text-align: left; padding: 10px 12px; font-size: .88rem; margin: 14px 0 0; }
.warn[hidden] { display: none; }
.tips { text-align: left; font-size: .85rem; opacity: .9; padding-left: 18px; margin: 16px 0 22px; }
.tips li + li { margin-top: 6px; }
.est-result .btn { background: var(--cream); color: var(--sage-dark) !important; border-color: var(--cream); font-size: .75rem; padding: 12px 16px; width: 100%; }

/* About */
.about { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.about-img img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.script.small { font-family: var(--script); font-size: 2.2rem; color: var(--sage-dark); margin: 0; }

/* Contact */
.contact { max-width: 860px; text-align: center; }
.contact .lead { margin-left: auto; margin-right: auto; }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; text-align: left; }
.contact-form .full { grid-column: 1 / -1; }
.trap { position: absolute; left: -9999px; }
.attach-note { background: var(--cream); border-left: 3px solid var(--tan); padding: 10px 14px; margin: 0 0 16px; font-size: .9rem; }
.attach-note[hidden] { display: none; }
.attach-note .link-btn { margin: 0 0 0 6px; }
.form-note { text-align: center; color: var(--sage-dark); min-height: 1.5em; }

/* Footer */
.footer { background: var(--ink); color: #cfc9bd; text-align: center; padding: 48px 16px; font-size: .9rem; display: grid; gap: 6px; }
.footer .brand-name { color: var(--cream); font-size: 2.4rem; }
.footer a { color: #cfc9bd; }
.copy { opacity: .6; font-size: .8rem; margin-top: 10px; }

/* Lightbox */
dialog#lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
dialog#lightbox::backdrop { background: rgba(15, 15, 12, .92); }
dialog#lightbox[open] { display: flex; align-items: center; justify-content: center; }
dialog#lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; }
dialog#lightbox button { position: absolute; background: none; border: 0; color: #fff; font-size: 3rem; cursor: pointer; padding: 10px 18px; line-height: 1; }
.lb-close { top: 10px; right: 10px; }
.lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 4px; top: 50%; transform: translateY(-50%); }

/* Mobile */
@media (max-width: 900px) {
  .est { grid-template-columns: 1fr; }
  .est-result { position: static; }
  .about { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .menu-btn { display: block; }
  .links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); }
  .links.open { display: flex; }
  .links a { padding: 14px; width: 100%; text-align: center; }
  .links a.btn { width: auto; margin: 8px 0 16px; }
  .contact-form { grid-template-columns: 1fr; }
  .gallery { columns: 2 150px; column-gap: 8px; }
  .gallery a { margin-bottom: 8px; }
}
