/* ============================================================
   CHANAN CONSTRUCTION — Design System
   Editorial luxury: ivory ground, ink type, bronze accent.
   Display: Cormorant Garamond · Text: Inter
   ============================================================ */

:root {
  --ivory: #faf8f4;
  --ivory-deep: #f3efe8;
  --ink: #16150f;
  --ink-soft: #3d3a30;
  --grey: #85806f;
  --line: #e4dfd3;
  --bronze: #9c7c4c;
  --bronze-deep: #7d6138;
  --white: #ffffff;

  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-text: "Inter", -apple-system, "Helvetica Neue", sans-serif;

  --pad: clamp(1.25rem, 4vw, 4rem);
  --section: clamp(5rem, 10vw, 9rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-text);
  background: var(--ivory);
  color: var(--ink);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

::selection { background: var(--bronze); color: var(--white); }

/* ---------- Typography ---------- */

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-family: var(--font-text);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: 1.4rem;
  display: block;
}

.h-xl { font-size: clamp(3rem, 7.5vw, 6.5rem); }
.h-lg { font-size: clamp(2.4rem, 5vw, 4.2rem); }
.h-md { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
.h-sm { font-size: clamp(1.4rem, 2.2vw, 1.8rem); }

.lede {
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.75;
  color: var(--ink-soft);
  max-width: 38em;
}

.muted { color: var(--grey); }

/* ---------- Layout ---------- */

.wrap { max-width: 1440px; margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.section { padding-top: var(--section); padding-bottom: var(--section); }

.section-head { max-width: 720px; margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.rule { border: 0; border-top: 1px solid var(--line); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-text);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 1.1rem 2.2rem;
  border-radius: 100px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  cursor: pointer;
  transition: transform 0.45s var(--ease), background 0.45s, color 0.45s, border-color 0.45s;
}
.btn:hover { background: var(--bronze-deep); border-color: var(--bronze-deep); transform: translateY(-2px); }
.btn .arrow { transition: transform 0.45s var(--ease); }
.btn:hover .arrow { transform: translateX(5px); }

.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }

.btn.light { background: var(--white); border-color: var(--white); color: var(--ink); }
.btn.light:hover { background: transparent; color: var(--white); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 0.35rem;
  transition: color 0.3s, border-color 0.3s;
}
.text-link:hover { color: var(--bronze); border-color: var(--bronze); }

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background 0.5s var(--ease), box-shadow 0.5s, transform 0.5s var(--ease);
}
.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.4rem var(--pad);
  max-width: 1440px;
  margin: 0 auto;
}

.site-header.scrolled {
  background: rgba(250, 248, 244, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.site-header.hidden { transform: translateY(-100%); }

.brand { display: flex; flex-direction: column; line-height: 1; z-index: 102; }
.brand .name {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.brand .tag {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--bronze);
  margin-top: 0.3rem;
}

/* header over dark hero */
.header-light:not(.scrolled) { color: var(--white); }
.header-light:not(.scrolled) .brand .tag { color: #d8bd8e; }
.header-light:not(.scrolled) .nav a::after { background: var(--white); }

.nav { display: flex; align-items: center; gap: clamp(1.2rem, 2.4vw, 2.4rem); }
.nav a {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  position: relative;
  padding: 0.4rem 0;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s var(--ease);
}
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); transform-origin: left; }

.nav .nav-cta {
  border: 1px solid currentColor;
  border-radius: 100px;
  padding: 0.7rem 1.5rem;
  transition: background 0.35s, color 0.35s, border-color 0.35s;
}
.nav .nav-cta::after { display: none; }
.nav .nav-cta:hover { background: var(--bronze); border-color: var(--bronze); color: var(--white); }

/* mobile nav */
.menu-toggle {
  display: none;
  z-index: 102;
  background: none;
  border: 0;
  cursor: pointer;
  width: 40px; height: 40px;
  position: relative;
}
.menu-toggle span {
  position: absolute;
  left: 8px; right: 8px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.4s var(--ease), opacity 0.3s, top 0.4s var(--ease);
}
.menu-toggle span:nth-child(1) { top: 14px; }
.menu-toggle span:nth-child(2) { top: 20px; }
.menu-toggle span:nth-child(3) { top: 26px; }

@media (max-width: 900px) {
  .menu-toggle { display: block; }
  .nav {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    background: var(--ivory);
    color: var(--ink);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.45s var(--ease);
    z-index: 101;
  }
  .nav a { font-size: 1.05rem; }
  body.nav-open .nav { opacity: 1; pointer-events: auto; }
  body.nav-open { overflow: hidden; }
  body.nav-open .site-header { color: var(--ink); }
  body.nav-open .menu-toggle span:nth-child(1) { top: 20px; transform: rotate(45deg); }
  body.nav-open .menu-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .menu-toggle span:nth-child(3) { top: 20px; transform: rotate(-45deg); }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  color: var(--white);
  isolation: isolate;
  overflow: hidden;
}
.hero .media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero .media img {
  width: 100%; height: 100%;
  object-fit: cover;
  animation: heroZoom 18s var(--ease) forwards;
}
@keyframes heroZoom {
  from { transform: scale(1.12); }
  to { transform: scale(1); }
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(10, 9, 6, 0.72) 0%, rgba(10, 9, 6, 0.25) 45%, rgba(10, 9, 6, 0.25) 100%);
}
.hero .hero-inner {
  width: 100%;
  padding: 0 var(--pad) clamp(3rem, 7vh, 6rem);
  max-width: 1440px;
  margin: 0 auto;
}
.hero h1 { max-width: 12em; }
.hero .lede { color: rgba(255, 255, 255, 0.85); margin-top: 1.6rem; }
.hero .hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.6rem; }

.hero .scroll-cue {
  position: absolute;
  right: var(--pad);
  bottom: clamp(3rem, 7vh, 6rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  writing-mode: vertical-rl;
}
.hero .scroll-cue::after {
  content: "";
  width: 1px;
  height: 56px;
  background: rgba(255, 255, 255, 0.5);
  animation: cueDrop 2.2s var(--ease) infinite;
}
@keyframes cueDrop {
  0% { transform: scaleY(0); transform-origin: top; }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}
@media (max-width: 700px) { .hero .scroll-cue { display: none; } }

/* page hero (interior pages) */
.page-hero {
  position: relative;
  min-height: 62svh;
  display: flex;
  align-items: flex-end;
  color: var(--white);
  isolation: isolate;
  overflow: hidden;
}
.page-hero .media { position: absolute; inset: 0; z-index: -2; }
.page-hero .media img { width: 100%; height: 100%; object-fit: cover; animation: heroZoom 14s var(--ease) forwards; }
.page-hero::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(10, 9, 6, 0.72), rgba(10, 9, 6, 0.22) 60%);
}
.page-hero .hero-inner {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(9rem, 18vh, 12rem) var(--pad) clamp(3rem, 6vh, 4.5rem);
}
.page-hero .eyebrow { color: #d8bd8e; }
.page-hero .lede { color: rgba(255, 255, 255, 0.85); margin-top: 1.4rem; }

/* ---------- Stats strip ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}
.stats .stat {
  padding: clamp(2rem, 4vw, 3.4rem) var(--pad);
  border-right: 1px solid var(--line);
}
.stats .stat:last-child { border-right: 0; }
.stat .num {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 4.5vw, 4rem);
  font-weight: 500;
  line-height: 1;
}
.stat .num sup { font-size: 0.45em; color: var(--bronze); margin-left: 0.1em; }
.stat .label {
  margin-top: 0.8rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey);
}
@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats .stat:nth-child(2n) { border-right: 0; }
  .stats .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

/* ---------- Cards / grids ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr));
  gap: clamp(1.4rem, 2.5vw, 2.5rem);
}

.card { position: relative; cursor: pointer; }
.card .frame {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 4 / 5;
  background: var(--ivory-deep);
}
.card .frame.wide { aspect-ratio: 3 / 2; }
.card .frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease);
}
.card:hover .frame img { transform: scale(1.06); }
.card .frame .veil {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10, 9, 6, 0.55), transparent 55%);
}
.card .on-image {
  position: absolute;
  left: 1.6rem; right: 1.6rem; bottom: 1.5rem;
  color: var(--white);
}
.card .on-image h3 { font-size: clamp(1.5rem, 2vw, 1.9rem); }
.card .on-image .meta {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 0.5rem;
}
.card .below { padding-top: 1.2rem; }
.card .below h3 { font-size: 1.45rem; }
.card .below p { color: var(--grey); font-size: 0.95rem; margin-top: 0.4rem; }

/* ---------- Split feature ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}
.split .media {
  overflow: hidden;
  border-radius: 4px;
}
.split .media img {
  width: 100%; height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 5;
  transition: transform 1.2s var(--ease);
}
.split .media:hover img { transform: scale(1.04); }
.split.flip .media { order: 2; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .split.flip .media { order: 0; }
}
.split .body .lede { margin-top: 1.4rem; }
.split .body .actions { margin-top: 2.4rem; }

/* checklist inside splits */
.checklist { margin-top: 2rem; display: grid; gap: 1rem; }
.checklist li {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  color: var(--ink-soft);
}
.checklist li::before {
  content: "—";
  color: var(--bronze);
  flex: 0 0 auto;
}

/* ---------- Full-bleed band ---------- */

.band {
  position: relative;
  min-height: 72svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  isolation: isolate;
  overflow: hidden;
}
.band .media { position: absolute; inset: 0; z-index: -2; }
.band .media img { width: 100%; height: 100%; object-fit: cover; }
.band::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: rgba(10, 9, 6, 0.55);
}
.band .band-inner { padding: var(--section) var(--pad); max-width: 900px; }
.band .eyebrow { color: #d8bd8e; }
.band .lede { color: rgba(255, 255, 255, 0.85); margin: 1.6rem auto 2.6rem; }

/* parallax-ish fixed feel on capable devices */
@media (min-width: 1000px) {
  .band .media img { height: 130%; top: -15%; position: relative; }
}

/* ---------- Process timeline ---------- */

.timeline { position: relative; max-width: 900px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 39px;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--line);
}
.step {
  position: relative;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: clamp(1.5rem, 3vw, 3rem);
  padding: clamp(2rem, 4vw, 3.2rem) 0;
}
.step .no {
  font-family: var(--font-display);
  font-size: 1.5rem;
  width: 80px; height: 80px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--ivory);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  transition: background 0.5s, border-color 0.5s, color 0.5s;
}
.step:hover .no { background: var(--bronze); border-color: var(--bronze); color: var(--white); }
.step h3 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); }
.step .dur {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bronze);
  margin: 0.5rem 0 1rem;
}
.step p { color: var(--ink-soft); max-width: 56ch; }

/* ---------- Marquee ---------- */

.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.6rem 0;
  white-space: nowrap;
}
.marquee .track {
  display: inline-flex;
  gap: 4rem;
  animation: marquee 38s linear infinite;
  will-change: transform;
}
.marquee span {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.4vw, 2rem);
  color: var(--grey);
  display: inline-flex;
  align-items: center;
  gap: 4rem;
}
.marquee span::after { content: "·"; color: var(--bronze); }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Quote / testimonial ---------- */

.quote { max-width: 880px; margin: 0 auto; text-align: center; }
.quote blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.4vw, 2.8rem);
  line-height: 1.35;
  font-weight: 500;
}
.quote blockquote::before { content: "“"; color: var(--bronze); }
.quote blockquote::after { content: "”"; color: var(--bronze); }
.quote cite {
  display: block;
  margin-top: 2rem;
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--grey);
}

/* ---------- Materials horizontal scroller ---------- */

.shelf {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(420px, 78vw);
  gap: clamp(1.4rem, 2.5vw, 2.2rem);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.5rem var(--pad) 2rem;
  scrollbar-width: none;
}
.shelf::-webkit-scrollbar { display: none; }
.shelf > * { scroll-snap-align: start; }

/* ---------- Detail list (materials page) ---------- */

.spec-rows { border-top: 1px solid var(--line); }
.spec-row {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 2fr;
  gap: 2rem;
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--line);
}
.spec-row dt {
  font-family: var(--font-display);
  font-size: 1.35rem;
}
.spec-row dd { color: var(--ink-soft); }
@media (max-width: 700px) { .spec-row { grid-template-columns: 1fr; gap: 0.5rem; } }

/* ---------- Values grid ---------- */

.values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.value {
  padding: clamp(2rem, 3.5vw, 3rem);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--white);
  transition: background 0.5s;
}
.value:hover { background: var(--ivory-deep); }
.value .glyph {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--bronze);
  line-height: 1;
  margin-bottom: 1.4rem;
}
.value h3 { font-size: 1.5rem; margin-bottom: 0.8rem; }
.value p { color: var(--ink-soft); font-size: 0.98rem; }

/* ---------- CTA panel ---------- */

.cta-panel {
  background: var(--ink);
  color: var(--white);
  border-radius: 6px;
  padding: clamp(3rem, 7vw, 6rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-panel .eyebrow { color: #d8bd8e; }
.cta-panel .lede { color: rgba(255, 255, 255, 0.78); margin: 1.4rem auto 2.6rem; }

/* ---------- Forms ---------- */

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }

.field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 0.6rem;
}
.field input, .field select, .field textarea {
  width: 100%;
  font-family: var(--font-text);
  font-size: 1rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1rem 1.1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--bronze);
  box-shadow: 0 0 0 3px rgba(156, 124, 76, 0.15);
}
.field textarea { min-height: 150px; resize: vertical; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.82);
  margin-top: var(--section);
}
.site-footer .top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  padding: clamp(3.5rem, 7vw, 6rem) var(--pad);
  max-width: 1440px;
  margin: 0 auto;
}
.site-footer .brand .name { color: var(--white); }
.site-footer .brand .tag { color: #d8bd8e; }
.site-footer .blurb { margin-top: 1.4rem; font-size: 0.95rem; color: rgba(255, 255, 255, 0.6); max-width: 34ch; }
.site-footer h4 {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 1.4rem;
}
.site-footer .top ul { display: grid; gap: 0.8rem; }
.site-footer .top a { font-size: 0.95rem; transition: color 0.3s; }
.site-footer .top a:hover { color: #d8bd8e; }
.site-footer .bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.site-footer .bottom .inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  padding: 1.6rem var(--pad);
  max-width: 1440px;
  margin: 0 auto;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
}
@media (max-width: 900px) { .site-footer .top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .site-footer .top { grid-template-columns: 1fr; } }

/* ---------- Reveal animations ---------- */

.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.in { opacity: 1; transform: none; }

.reveal-img {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.2s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal-img.in { clip-path: inset(0 0 0 0); }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-img { opacity: 1; transform: none; clip-path: none; transition: none; }
  .hero .media img, .page-hero .media img { animation: none; }
  .marquee .track { animation: none; }
  html { scroll-behavior: auto; }
}
