/* Concept A, revision 6 (two header actions, first and second fix): Concept A's palette, type and logo in a compact, gallery-led layout */
:root {
  --bg: #141210;
  --bg-2: #1c1a17;
  --gold: #d4a352;
  --gold-2: #e8cb94;
  --ivory: #efe8da;
  --body: #d9d1c3;
  --muted: #a89f91;
  --line: rgba(212, 163, 82, .26);
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Jost", "Avenir Next", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --gutter: clamp(1rem, 4vw, 3rem);
  --section: clamp(3.5rem, 6.5vw, 5.5rem);
  color-scheme: dark;
}
body { background: var(--bg); color: var(--ivory); font: 400 1rem/1.7 var(--sans); }
::selection { background: var(--gold); color: var(--bg); }
:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }
.wrap { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }

/* Type scale */
.display { font: 300 clamp(2.4rem, 4.8vw, 4.5rem)/1.04 var(--serif); letter-spacing: -.01em; }
.h2 { font: 300 clamp(1.7rem, 2.6vw, 2.35rem)/1.15 var(--serif); color: var(--gold-2); text-wrap: balance; }
.h3 { font: 400 1.35rem/1.2 var(--serif); color: var(--gold-2); }
p { max-width: 62ch; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .7rem 1.3rem; font: 500 .72rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; white-space: nowrap; transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease); }
.btn-gold { background: var(--gold); color: #17130c; }
.btn-gold:hover { background: var(--gold-2); }
.btn-line { border: 1px solid var(--line); color: var(--ivory); }
.btn-line:hover { border-color: var(--gold); color: var(--gold-2); }
.link { color: var(--gold-2); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .3em; }
.link:hover { color: var(--ivory); }

/* Header: navigation, phone and quote button always in reach */
.site-header { position: fixed; inset: 0 0 auto; z-index: 50; display: flex; align-items: center; gap: 1.5rem; padding: .85rem var(--gutter); background: linear-gradient(rgba(20,18,16,.8), rgba(20,18,16,0)); transition: padding .4s var(--ease); }
/* Blur lives on a pseudo-element: backdrop-filter on the header itself would trap the fixed mobile menu inside it */
.site-header::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(20,18,16,.94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); opacity: 0; transition: opacity .4s var(--ease); }
.site-header.is-scrolled { padding-block: .55rem; }
.site-header.is-scrolled::before { opacity: 1; }
/* Brand lockup: the EF monogram leads; Carpentry is small, muted and set beside it after a hairline */
.brand { display: flex; align-items: center; gap: .85rem; text-decoration: none; margin-right: auto; }
.brand img { width: 44px; height: auto; }
.brand span, .footer-brand span { font: 400 .62rem/1 var(--sans); letter-spacing: .34em; color: var(--muted); text-transform: uppercase; }
.brand span { padding: .35rem 0 .35rem .85rem; border-left: 1px solid var(--line); }
.site-nav { display: flex; align-items: center; gap: clamp(1rem, 2vw, 2rem); }
.site-nav a { font-size: .88rem; text-decoration: none; color: var(--ivory); opacity: .8; transition: opacity .3s, color .3s; }
.site-nav a:hover { opacity: 1; color: var(--gold-2); }
.site-nav .nav-phone, .site-nav .nav-contact { display: none; }
.header-actions { display: flex; align-items: center; gap: .6rem; }
.header-phone { margin-right: .65rem; }
.header-phone { font-size: .88rem; color: var(--gold-2); text-decoration: none; white-space: nowrap; }
.header-phone:hover { color: var(--ivory); }
.header-actions .btn { min-height: 40px; padding-inline: 1rem; }
.header-actions .btn-line { border-color: rgba(212, 163, 82, .55); color: var(--gold-2); }
.header-actions .btn-line:hover { border-color: var(--gold-2); color: var(--ivory); }
.nav-toggle { display: none; }
@media (max-width: 1080px) { .header-phone { display: none; } }
@media (max-width: 960px) {
  .header-actions { gap: .6rem; }
  .nav-toggle { display: grid; place-content: center; gap: 7px; width: 42px; height: 42px; background: none; border: 1px solid var(--line); cursor: pointer; position: relative; z-index: 2; }
  .nav-toggle i { display: block; width: 18px; height: 1px; background: var(--gold); transition: transform .3s var(--ease); }
  .nav-toggle[aria-expanded="true"] i:first-of-type { transform: translateY(4px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] i:last-of-type { transform: translateY(-4px) rotate(-45deg); }
  .site-nav { position: fixed; inset: 0; flex-direction: column; justify-content: center; gap: 1.1rem; background: var(--bg); visibility: hidden; opacity: 0; transition: opacity .4s var(--ease), visibility .4s; }
  .site-nav.is-open { visibility: visible; opacity: 1; }
  .site-nav a { font: 300 1.9rem/1.1 var(--serif); opacity: 1; }
  .site-nav .nav-contact { display: block; }
  .site-nav .nav-phone { display: block; margin-top: .5rem; font: 400 1.1rem/1 var(--sans); color: var(--gold-2); }
  /* Both actions move to the bar at the foot of the screen */
  .header-actions .btn { display: none; }
  body.nav-open { overflow: hidden; }
  /* Keep the quote button above the open menu */
  .brand { position: relative; z-index: 2; }
}

/* Hero: compact, one photograph, one clear action */
.hero { position: relative; min-height: clamp(32rem, 72svh, 42rem); display: grid; align-items: end; overflow: hidden; isolation: isolate; }
.hero-media { position: absolute; inset: 0; z-index: -1; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 55%; filter: saturate(.85); }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,18,16,.9) 0%, rgba(20,18,16,.55) 50%, rgba(20,18,16,.1) 100%), linear-gradient(0deg, var(--bg) 0%, rgba(20,18,16,0) 30%); }
.hero-inner { width: 100%; max-width: 1280px; margin-inline: auto; padding: 6.5rem var(--gutter) calc(clamp(2.5rem, 6vh, 3.5rem) + 3.5rem); }
.hero-rule { display: block; width: 72px; height: 1px; background: var(--gold); margin-bottom: 1.25rem; transform-origin: left; }
.hero-text { max-width: 44ch; margin: 1.1rem 0 1.6rem; color: var(--body); }
.actions { display: flex; flex-wrap: wrap; gap: .7rem; }
/* Opening sequence: the EF mark and a gold line, then the curtain lifts onto the hero (first visit per session) */
.curtain { display: none; }
html.opening { --intro: 1.25s; }
html.opening .curtain { position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; justify-items: center; gap: 1.25rem; background: var(--bg); pointer-events: none; animation: lift 1s 1.15s cubic-bezier(.7,0,.2,1) forwards; }
html.opening .curtain img { width: 76px; animation: mark-in .8s .1s var(--ease) both; }
html.opening .curtain span { width: 120px; height: 1px; background: var(--gold); animation: draw .9s .35s cubic-bezier(.7,0,.2,1) both; }
@keyframes lift { to { clip-path: inset(0 0 100% 0); visibility: hidden; } }
@keyframes mark-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes draw { from { transform: scaleX(0); } }
@media (prefers-reduced-motion: no-preference) {
  /* The photo settles in, then drifts very slowly */
  .hero-media img { animation: settle 2.2s var(--intro, 0s) cubic-bezier(.2,.7,.1,1) both, drift 28s calc(var(--intro, 0s) + 2.2s) ease-in-out infinite alternate; }
  .hero-rule { animation: draw 1.1s calc(var(--intro, 0s) + .2s) cubic-bezier(.7,0,.2,1) both; }
  .js .hero [data-reveal] { transition-delay: calc(var(--intro, 0s) + var(--i, 0) * 90ms); }
  .js .hero [data-reveal="line"] .line > span { transition-delay: calc(var(--intro, 0s) + var(--i, 0) * 110ms + 100ms); }
  @keyframes settle { from { transform: scale(1.06); opacity: 0; } to { transform: none; opacity: 1; } }
  @keyframes drift { from { transform: none; } to { transform: scale(1.05) translate(-1%, -.6%); } }
}
@media (max-width: 700px) {
  .hero { min-height: 34rem; }
  .hero-media img { object-position: 70% 50%; }
  .hero-media::after { background: linear-gradient(0deg, var(--bg) 0%, rgba(20,18,16,.78) 55%, rgba(20,18,16,.35) 100%); }
}

/* Work: horizontal gallery. Starts in line with the page content and runs off the right edge to show there's more. */
.work { padding-block: var(--section) calc(var(--section) * .8); }
.work-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem 2rem; margin-bottom: 1.5rem; }
.gallery-controls { display: flex; align-items: center; gap: .5rem; }
.gallery-hint { margin-right: .75rem; font-size: .82rem; color: var(--muted); }
.arrow { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; background: none; border: 1px solid var(--line); cursor: pointer; transition: border-color .3s var(--ease), opacity .3s var(--ease); }
.arrow svg { width: 18px; height: 18px; fill: none; stroke: var(--gold-2); stroke-width: 1.25; }
.arrow:hover:not(:disabled) { border-color: var(--gold); }
.arrow:disabled { opacity: .3; cursor: default; }

.track { --edge: max(var(--gutter), calc((100% - 1280px) / 2 + var(--gutter))); display: flex; gap: clamp(.75rem, 1.4vw, 1.25rem); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; padding-inline: var(--edge); scroll-padding-inline: var(--edge); scrollbar-width: none; cursor: grab; }
.track::-webkit-scrollbar { display: none; }
.track:focus-visible { outline-offset: -1px; }
.track.is-dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.card { flex: 0 0 clamp(15rem, 26vw, 22rem); scroll-snap-align: start; }
.card img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: var(--bg-2); user-select: none; }
/* Framed photographs: rounded corners, a fine warm edge, soft depth and a faint top-edge highlight */
.track { padding-block: .35rem 1.5rem; margin-bottom: -1rem; }
.frame { position: relative; border-radius: 12px; overflow: hidden; background: var(--bg-2); box-shadow: 0 0 0 1px rgba(212, 163, 82, .26), 0 2px 6px -2px rgba(0, 0, 0, .55), 0 22px 36px -22px rgba(0, 0, 0, .9); }
.frame::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 1px 0 rgba(255, 236, 205, .16), inset 0 0 0 1px rgba(255, 245, 225, .05); background: linear-gradient(180deg, rgba(255, 238, 210, .06), rgba(255, 238, 210, 0) 28%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, .14)); }
.frame img { display: block; }
.card .pos-tall { object-position: 50% 45%; }
.card > p { margin-top: .7rem; font: 400 1.05rem/1.3 var(--serif); color: var(--gold-2); letter-spacing: .01em; }
.card-end > .frame { aspect-ratio: 3 / 4; display: grid; align-content: center; justify-items: start; gap: 1rem; padding: clamp(1.5rem, 2.5vw, 2.25rem); }
.card-end > .frame::after { background: none; }
.card-end .end-title { font: 300 clamp(1.5rem, 2.2vw, 1.9rem)/1.15 var(--serif); color: var(--ivory); }
.card-end p { color: var(--body); font-size: .92rem; }
.card-end .link { font-size: .88rem; }
.progress { height: 1px; margin-top: 1.5rem; background: var(--line); }
.progress span { display: block; height: 100%; background: var(--gold); transform-origin: left; transform: scaleX(.04); transition: transform .15s linear; }
@media (max-width: 700px) {
  .gallery-hint { display: none; }
  .card { flex-basis: 70vw; }
}

/* Introduction: one framed panel that overlaps the bottom of the hero */
.intro { position: relative; z-index: 1; margin-top: -3.5rem; }
.intro-panel { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 1.5rem clamp(2rem, 5vw, 4.5rem); padding: clamp(1.5rem, 3.2vw, 2.5rem); background: var(--bg-2); border-radius: 14px; box-shadow: 0 0 0 1px rgba(212, 163, 82, .26), 0 2px 6px -2px rgba(0, 0, 0, .55), 0 26px 44px -26px rgba(0, 0, 0, .95); }
.intro-copy { display: grid; gap: .85rem; align-content: start; }
.intro-copy p { color: var(--body); font-size: .98rem; }
.intro-points { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem clamp(1.5rem, 3vw, 3rem); padding-top: 1.25rem; border-top: 1px solid var(--line); }
.intro-points li { font-size: .86rem; line-height: 1.5; color: var(--muted); }
.intro-points span { display: block; margin-bottom: .15rem; font: 400 1.15rem/1.3 var(--serif); color: var(--gold-2); }
@media (max-width: 860px) {
  .intro { margin-top: -2rem; }
  .intro-panel, .intro-points { grid-template-columns: 1fr; }
  .intro-points { gap: .9rem; }
}

/* What we do: six types of work, three columns */
.services { padding-top: var(--section); }
.services-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem 2rem; margin-bottom: 1.5rem; }
.services-head p { color: var(--muted); font-size: .95rem; }
.services-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: clamp(1.25rem, 2.5vw, 2.5rem); }
.services-list li { padding: 1rem 0 1.05rem; border-top: 1px solid var(--line); font: 400 clamp(1.15rem, 1.5vw, 1.35rem)/1.3 var(--serif); color: var(--ivory); }
.services-list .services-note { font: 400 .88rem/1.55 var(--sans); color: var(--muted); }
@media (max-width: 960px) { .services-list { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .services-list { grid-template-columns: 1fr; } .services-list li { padding-block: .8rem .85rem; } }

/* Areas and contractors: one small band */
.info { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem clamp(2rem, 6vw, 6rem); padding-block: 0 var(--section); }
.info-block { display: grid; gap: .6rem; align-content: start; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.info-block p { color: var(--body); font-size: .95rem; }
.info-block strong { font-weight: 500; color: var(--ivory); }
.info-block .link { justify-self: start; font-size: .92rem; }
@media (max-width: 760px) { .info { grid-template-columns: 1fr; } }

/* Contact strip */
.contact { background: var(--bg-2); border-top: 1px solid var(--line); padding-block: clamp(2.5rem, 4.5vw, 3.5rem); }
.contact-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.5rem 3rem; }
.contact-inner p { margin-top: .4rem; color: var(--muted); font-size: .95rem; }
.contact-details { display: flex; flex-wrap: wrap; gap: 1rem clamp(1.5rem, 3vw, 2.5rem); }
.contact-details dt { font-size: .78rem; color: var(--muted); margin-bottom: .3rem; }
.email { font-size: 1rem; color: var(--gold-2); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .3em; }
.email:hover { color: var(--ivory); }
.phone { font: 300 clamp(1.75rem, 2.6vw, 2.25rem)/1 var(--serif); color: var(--ivory); text-decoration: none; transition: color .3s var(--ease); }
.phone:hover { color: var(--gold-2); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 1.75rem; color: var(--muted); font-size: .85rem; }

/* Phones: Contact us and Get a free quote stay at the foot of the screen */
.dock { display: none; }
@media (max-width: 960px) {
  .dock { position: fixed; z-index: 45; inset: auto 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; padding: .6rem var(--gutter) calc(.6rem + env(safe-area-inset-bottom, 0px)); background: rgba(20, 18, 16, .96); border-top: 1px solid var(--line); }
  .dock .btn { min-height: 46px; padding-inline: .5rem; letter-spacing: .1em; }
  .dock .btn-line { border-color: rgba(212, 163, 82, .55); color: var(--gold-2); }
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
}
.footer-grid { display: grid; grid-template-columns: auto 1fr auto auto; gap: 1rem 2.5rem; align-items: center; }
.footer-brand { margin: 0; display: grid; justify-items: center; gap: .6rem; }
.footer-brand img { width: 60px; height: auto; }
.footer-brand span { padding-left: .34em; } /* balances the trailing letter-spacing so the word centres under EF */
.social { display: flex; gap: 1.25rem; }
.social a { color: var(--gold-2); text-decoration: none; }
.social a:hover { text-decoration: underline; }
.legal { font-size: .78rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: auto 1fr; } .social, .legal { grid-column: 1 / -1; } }

/* Review label sits at the end of the page so it never covers the gallery or buttons */
.concept-flag { position: static; max-width: none; }

/* Quote page */
.page-head { padding: clamp(6.5rem, 11vw, 8rem) 0 clamp(1.75rem, 3vw, 2.5rem); }
.page-head p { color: var(--body); margin-top: 1rem; }
.page-head .display { font-size: clamp(2.2rem, 4vw, 3.4rem); }
.quote-grid { display: grid; grid-template-columns: 1fr 20rem; gap: clamp(2rem, 5vw, 4.5rem); padding-bottom: var(--section); align-items: start; }
.quote-aside { position: sticky; top: 5.5rem; display: grid; gap: 1.4rem; padding: 1.6rem; border: 1px solid var(--line); }
.quote-aside h2 { font: 400 1.3rem/1.15 var(--serif); color: var(--gold-2); margin-bottom: .35rem; }
.quote-aside p { color: var(--body); font-size: .92rem; }
.quote-aside a { color: var(--ivory); }
@media (max-width: 960px) { .quote-grid { grid-template-columns: 1fr; } .quote-aside { position: static; } }

.form { display: grid; gap: 2rem; }
.form fieldset { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem 2rem; }
.form legend { font: 300 1.5rem/1.15 var(--serif); color: var(--gold-2); margin-bottom: 1rem; padding: 0; grid-column: 1 / -1; }
.field { display: grid; gap: .4rem; }
.field.full { grid-column: 1 / -1; }
.field label, .group-label { font-size: .88rem; color: var(--body); }
.field .hint { font-size: .8rem; color: var(--muted); }
.req { color: var(--gold); }
.form input:not([type="checkbox"], [type="radio"]), .form select, .form textarea { width: 100%; min-height: 46px; padding: .7rem 0; background: transparent; border: 0; border-bottom: 1px solid rgba(239,232,218,.3); border-radius: 0; color: var(--ivory); transition: border-color .3s; }
.form select { appearance: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23d4a352'/%3E%3C/svg%3E") right .25rem center no-repeat; }
.form select option { background: var(--bg-2); }
.form textarea { min-height: 120px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-bottom-color: var(--gold); }
.form input:user-invalid, .form textarea:user-invalid { border-bottom-color: #e08a6f; }
.choices { display: flex; flex-wrap: wrap; gap: .5rem; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span { display: inline-flex; align-items: center; min-height: 44px; padding: .5rem 1rem; border: 1px solid var(--line); font-size: .88rem; transition: background .3s, color .3s, border-color .3s; }
.choice input:checked + span { background: var(--gold); color: #17130c; border-color: var(--gold); }
.choice input:focus-visible + span { outline: 1px solid var(--gold-2); outline-offset: 3px; }
.form input[type="file"] { border-bottom-style: dashed; color: var(--muted); }
.form input[type="file"]::file-selector-button { margin-right: 1rem; padding: .5rem 1rem; background: none; border: 1px solid var(--line); color: var(--gold-2); cursor: pointer; }
.consent { display: flex; gap: .8rem; align-items: start; font-size: .88rem; color: var(--body); }
.consent input { width: 20px; height: 20px; accent-color: var(--gold); margin-top: .2rem; flex: none; }
.form-actions { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: center; }
.form-actions button { border: 0; cursor: pointer; }
.form-status { padding: 1rem 1.25rem; border-left: 2px solid var(--gold); background: var(--bg-2); color: var(--ivory); }
.form-status.is-error { border-left-color: #d9826b; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; } /* spam trap, hidden from people */
@media (max-width: 640px) { .form fieldset { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: .35s var(--ease) both fade-out; }
  ::view-transition-new(root) { animation: .45s .05s var(--ease) both fade-in; }
  @keyframes fade-out { to { opacity: 0; } }
  @keyframes fade-in { from { opacity: 0; } }
}
