/* ============================================================
   RESTLESS HABITATION — Interior Pages (additive)
   Loaded AFTER styles.css. Reuses tokens: --paper / --mauve /
   --plum / --sage / --ink / --gold / --line / --serif / --body /
   --script / --ease. Breakpoints mirror styles.css (900px, 540px).
   ============================================================ */

/* ---------- helper ---------- */
.is-hidden { display: none !important; }

/* ============================================================
   A) PAGE HEADER / SUB-HERO
   (about / services / portfolio / contact)
   ============================================================ */
.pagehead {
  position: relative;
  min-height: clamp(380px, 52vh, 560px);
  display: flex;
  overflow: hidden;
}
.pagehead__bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
}
.pagehead__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(40,40,35,.45) 0%,
    rgba(40,40,35,.52) 55%,
    rgba(40,40,35,.62) 100%
  );
}
.pagehead__inner {
  position: relative; z-index: 2;
  align-self: flex-end;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
  padding-block: clamp(90px, 12vh, 140px) clamp(40px, 7vh, 70px);
  color: #fff;
}

/* breadcrumb */
.crumb {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.55em;
  font-family: var(--body);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.68rem;
  font-weight: bold;
  color: rgba(255,255,255,.8);
  margin: 0 0 6px;
}
.crumb a { color: rgba(255,255,255,.8); transition: color .3s var(--ease); }
.crumb a:hover { text-decoration: underline; color: #fff; }
.crumb .sep { opacity: .55; }
.crumb [aria-current="page"],
.crumb .current { color: #fff; }

/* eyebrow override for over-photo use */
.eyebrow--light { color: rgba(255,255,255,.85); }

.pagehead__title {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.04;
  color: #fff;
  font-size: clamp(2.6rem, 6vw, 5rem);
  margin: 0.35em 0 0.25em;
}
.pagehead__sub {
  color: rgba(255,255,255,.92);
  max-width: 60ch;
  font-size: 1.06rem;
  line-height: 1.6;
  margin: 0;
}

/* ============================================================
   B) SERVICES PAGE BLOCKS
   ============================================================ */
.svc {
  padding-block: clamp(48px, 7vh, 96px);
  border-top: 1px solid var(--line);
}
.svc:first-of-type { border-top: 0; }

/* the two-column grid lives on the inner wrapper (the section's only child) */
.svc__inner {
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  gap: clamp(36px, 6vw, 90px);
  align-items: center;
}
/* alternating: flip the visual order on even rows */
.svc:nth-child(even) .svc__inner { direction: rtl; }
.svc:nth-child(even) .svc__inner > * { direction: ltr; }

.svc__media { position: relative; }
.svc__media img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  box-shadow: 0 50px 80px -46px rgba(57,58,51,.85);
}
.svc__media .mcap {
  font-family: var(--body); font-style: italic; color: var(--sage);
  font-size: 0.86rem; margin-top: 12px; text-align: center;
}

.svc__num {
  display: block;
  font-family: var(--script);
  color: var(--mauve);
  font-size: clamp(2.6rem, 5vw, 4rem);
  line-height: 0.9;
  margin-bottom: 8px;
}
.svc__body .eyebrow { margin-bottom: 14px; }
.svc__body h2 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.05;
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 3rem);
}
.svc__lede {
  font-family: var(--serif);
  font-style: italic;
  color: var(--sage);
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  line-height: 1.4;
  margin: 0 0 20px;
}
.svc__body p { margin: 0 0 1.1em; color: var(--ink-soft); }

/* process steps wrapper — reuses .step / .step .n / .step b / .step span */
.svc__steps { margin-top: 34px; }
.svc__steps h4 {
  font-family: var(--body);
  text-transform: uppercase;
  letter-spacing: 0.26em;
  font-size: 0.7rem;
  font-weight: bold;
  color: var(--mauve-d);
  margin: 0 0 18px;
}

/* ============================================================
   C) CONTACT / INQUIRY FORM
   ============================================================ */
.formwrap { max-width: 720px; margin: 0 auto; }

/* consultation card (plum) */
.concard {
  background: var(--plum);
  color: #fff;
  padding: clamp(28px, 4vw, 44px);
  border-radius: 4px;
  margin-bottom: clamp(40px, 6vh, 64px);
  box-shadow: 0 40px 70px -48px rgba(57,58,51,.8);
}
.concard .eyebrow { color: rgba(255,255,255,.72); margin-bottom: 12px; }
.concard h3 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  line-height: 1.1; margin: 0 0 6px; color: #fff;
}
.concard .fee {
  font-family: var(--script); color: var(--gold);
  font-size: clamp(2rem, 4vw, 3rem); line-height: 1; display: block; margin-bottom: 16px;
}
.concard p { color: rgba(255,255,255,.9); margin: 0 0 18px; }
.concard ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 12px;
}
.concard li {
  position: relative; padding-left: 32px;
  font-size: 0.98rem; line-height: 1.5; color: rgba(255,255,255,.92);
}
.concard li::before {
  content: ""; position: absolute; left: 0; top: 0.18em;
  width: 17px; height: 9px;
  border-left: 1.5px solid var(--gold);
  border-bottom: 1.5px solid var(--gold);
  transform: rotate(-45deg);
}
.concard .credit {
  display: block; margin-top: 22px; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.25);
  font-family: var(--serif); font-style: italic;
  font-size: 1.12rem; color: #fff;
}
.concard .credit b { color: var(--gold); font-style: normal; font-weight: 600; }

/* BEM aliases used by contact.html (descendant form to beat .concard p) */
.concard .concard__title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  line-height: 1.1; margin: 0 0 6px; color: #fff;
}
.concard .concard__highlight {
  display: block; margin-top: 22px; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.25);
  font-family: var(--serif); font-style: italic;
  font-size: 1.12rem; color: var(--gold);
}
.concard .concard__note {
  font-size: 0.9rem; color: rgba(255,255,255,.72); font-style: italic; margin: 14px 0 0;
}

/* intro + card two-column layout (contact page) */
.contact__lead {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
.contact__lead .concard { margin-bottom: 0; }

/* the form */
.form { display: block; }

.field { display: flex; flex-direction: column; margin-block: clamp(20px, 3vh, 30px); }
/* fieldset variant (project type / timeline / budget groups) */
fieldset.field { border: 0; padding: 0; min-width: 0; }
.field > label,
.field > legend {
  font-family: var(--body);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.68rem;
  font-weight: bold;
  color: var(--mauve-d);
  margin-bottom: 12px;
  padding: 0;
}
.field > label .help {
  display: block;
  text-transform: none;
  letter-spacing: 0.01em;
  font-weight: normal;
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-top: 6px;
  font-style: italic;
}
.field--req > label::after {
  content: " *";
  color: var(--mauve);
}

/* inputs / textarea / select */
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field textarea,
.field select {
  width: 100%;
  font-family: var(--body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0.9em 1em;
  transition: border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.field textarea { min-height: 140px; resize: vertical; line-height: 1.6; }
.field select { cursor: pointer; }
.field input::placeholder,
.field textarea::placeholder { color: var(--mauve-d); opacity: .8; }
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--plum);
  box-shadow: 0 0 0 1px var(--plum);
}
.field .invalid,
.field input.invalid,
.field select.invalid,
.field textarea.invalid {
  border-color: #a85454;
  box-shadow: 0 0 0 1px #a85454;
}

/* checkbox / radio option grids */
.checks,
.radios {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.check,
.radio {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 0.85em 1em;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--cream);
  cursor: pointer;
  font-size: 0.98rem;
  color: var(--ink);
  transition: border-color .3s var(--ease), background .3s var(--ease), color .3s var(--ease);
}
.check input,
.radio input {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}
/* faux control */
.check .box,
.radio .box {
  flex: none;
  width: 18px; height: 18px;
  border: 1px solid var(--mauve-d);
  background: #fff;
  position: relative;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.radio .box { border-radius: 50%; }
.check .box::after {
  content: ""; position: absolute;
  left: 4px; top: 0px;
  width: 7px; height: 12px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg) scale(0);
  transition: transform .25s var(--ease);
}
.radio .box::after {
  content: ""; position: absolute;
  left: 50%; top: 50%;
  width: 8px; height: 8px; border-radius: 50%;
  background: #fff;
  transform: translate(-50%,-50%) scale(0);
  transition: transform .25s var(--ease);
}
.check:hover,
.radio:hover { border-color: var(--mauve); }

/* highlight when checked (:has with sibling fallback) */
.check:has(input:checked),
.radio:has(input:checked) {
  border-color: var(--plum);
  background: var(--plum);
  color: #fff;
}
.check:has(input:checked) .box,
.radio:has(input:checked) .box {
  border-color: var(--gold);
  background: var(--plum);
}
.check:has(input:checked) .box::after,
.radio:has(input:checked) .box::after { transform: rotate(45deg) scale(1); }
.radio:has(input:checked) .box::after { transform: translate(-50%,-50%) scale(1); }

/* fallback for browsers without :has — keep accessible focus ring */
.check input:focus-visible ~ .box,
.radio input:focus-visible ~ .box {
  outline: 2px solid var(--plum);
  outline-offset: 2px;
}

/* range / scale */
.scale { display: flex; align-items: center; gap: 18px; }
.scale__row { display: flex; align-items: center; gap: 18px; width: 100%; }
.scale input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 2px;
  background: var(--line);
  border-radius: 2px;
  cursor: pointer;
}
.scale input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--plum);
  border: 3px solid var(--cream);
  box-shadow: 0 4px 12px -4px rgba(57,58,51,.6);
  cursor: pointer;
}
.scale input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--plum);
  border: 3px solid var(--cream);
  cursor: pointer;
}
.scale__val {
  flex: none;
  min-width: 2.4ch;
  text-align: center;
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--plum);
  line-height: 1;
}

/* small print */
.agree {
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--sage);
  margin: 24px 0 0;
  font-style: italic;
}

/* submit (styled like .btn--filled) */
.form__submit {
  display: inline-flex; align-items: center; gap: 0.7em;
  font-family: var(--body);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  font-weight: bold;
  padding: 1.15em 2.1em;
  border: 1px solid var(--plum);
  background: var(--plum);
  color: #fff;
  cursor: pointer;
  margin-top: 28px;
  transition: background .5s var(--ease), border-color .5s var(--ease), opacity .3s var(--ease);
}
.form__submit:hover { background: var(--ink); border-color: var(--ink); }
.form__submit:disabled { opacity: .6; cursor: default; background: var(--plum); border-color: var(--plum); }

/* error message */
.form__error {
  margin-top: 20px;
  padding: 14px 18px;
  border: 1px solid #a85454;
  border-left: 3px solid #a85454;
  border-radius: 2px;
  background: rgba(168,84,84,.07);
  color: #8f4444;
  font-size: 0.96rem;
  line-height: 1.5;
}

/* thank-you panel */
.thanks {
  text-align: center;
  max-width: 620px;
  margin: 0 auto;
  padding-block: clamp(40px, 6vh, 70px);
}
.thanks .eyebrow { color: var(--mauve-d); margin-bottom: 18px; }
.thanks h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  line-height: 1.06; margin: 0 0 18px;
}
.thanks p { color: var(--ink-soft); font-size: 1.06rem; margin: 0 auto 8px; max-width: 52ch; }

/* booking placeholder (echoes home .cta__booking dashed box) */
.booking {
  margin-top: 40px;
  border: 1px dashed var(--mauve);
  border-radius: 4px;
  padding: 28px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: rgba(183,166,171,.06);
}
.booking .lbl,
.booking__label {
  font-family: monospace; font-size: 0.72rem; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--mauve-d);
}
.booking .txt,
.booking__big { font-family: var(--serif); font-size: 1.4rem; color: var(--plum); margin: 0; }
.booking small { color: var(--sage); font-family: var(--body); }

/* ============================================================
   D) PORTFOLIO EXTRAS  (reuses .gallery__grid / .gtile)
   ============================================================ */
.pf-note {
  font-family: var(--body);
  font-style: italic;
  color: var(--sage);
  font-size: 0.88rem;
  margin-top: 12px;
  line-height: 1.5;
}
/* full-width gallery tiles (resets to 1 col at 900px below) */
.g-wide { grid-column: span 6; aspect-ratio: 4/3; }

/* ============================================================
   E) 404
   ============================================================ */
.nf {
  background: var(--paper);
  min-height: 78vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: clamp(80px, 14vh, 160px) var(--gutter);
}
.nf .eyebrow { margin-bottom: 22px; }
.nf h1 {
  font-family: var(--serif); font-weight: 400; line-height: 1;
  font-size: clamp(4rem, 14vw, 9rem);
  color: var(--ink);
  margin: 0 0 8px;
}
.nf h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  margin: 0 0 18px;
}
.nf p { color: var(--ink-soft); max-width: 48ch; margin: 0 auto 32px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  /* services -> one column, image first */
  .svc__inner { grid-template-columns: 1fr; gap: 36px; }
  .svc:nth-child(even) .svc__inner { direction: ltr; }
  .svc__media { order: -1; max-width: 460px; margin-inline: auto; }

  .checks,
  .radios { grid-template-columns: 1fr; }

  /* contact intro/card stack */
  .contact__lead { grid-template-columns: 1fr; }

  /* wide gallery tiles -> single column of the 2-col mobile grid */
  .g-wide { grid-column: span 1; aspect-ratio: 4/3; }
}

@media (max-width: 540px) {
  .pagehead__sub { font-size: 1rem; }
  .concard { padding: 24px; }
  .field input[type="text"],
  .field input[type="email"],
  .field input[type="tel"],
  .field textarea,
  .field select { font-size: 16px; } /* prevent iOS zoom */
  .form__submit { width: 100%; justify-content: center; }
  .booking { padding: 22px; }
  .scale__val { font-size: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  .pagehead__bg { transform: none; }
}

/* ============================================================
   FREEBIE / LEAD-MAGNET POPUP
   ============================================================ */
.freebie-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(40,40,35,0);
  opacity: 0; pointer-events: none;
  transition: opacity .4s var(--ease), background .4s var(--ease);
}
.freebie-overlay.in { opacity: 1; pointer-events: auto; background: rgba(40,40,35,.55); }
.freebie-modal {
  position: relative; width: 100%; max-width: 480px;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 50px 90px -40px rgba(40,40,35,.7);
  padding: clamp(30px, 5vw, 52px);
  max-height: calc(100vh - 48px); overflow: auto;
  transform: translateY(20px) scale(.98);
  transition: transform .5s var(--ease);
}
.freebie-overlay.in .freebie-modal { transform: none; }
.freebie-close {
  position: absolute; top: 10px; right: 12px;
  background: none; border: 0; cursor: pointer;
  width: 40px; height: 40px; padding: 0;
  font-size: 1.9rem; line-height: 1; color: var(--mauve-d);
  transition: color .3s var(--ease);
}
.freebie-close:hover { color: var(--ink); }
.freebie-eyebrow { color: var(--mauve-d); margin-bottom: 14px; }
.freebie-title { font-size: clamp(1.9rem, 4vw, 2.7rem); margin: 0 0 14px; }
.freebie-sub { color: var(--ink-soft); font-size: 1.02rem; line-height: 1.6; margin: 0 0 24px; }
.freebie-form { display: flex; flex-direction: column; gap: 12px; }
.freebie-input {
  width: 100%; font-family: var(--body); font-size: 1rem; color: var(--ink);
  background: var(--cream); border: 1px solid var(--line); border-radius: 2px;
  padding: .95em 1em;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.freebie-input:focus { outline: none; border-color: var(--plum); box-shadow: 0 0 0 1px var(--plum); }
.freebie-submit, .freebie-download { width: 100%; justify-content: center; }
.freebie-error { color: #8f4444; font-size: .9rem; margin: 2px 0 0; }
.freebie-foot { color: var(--sage); font-size: .78rem; font-style: italic; margin: 16px 0 0; }
.freebie-success { text-align: center; }
.freebie-success .eyebrow { color: var(--mauve-d); margin-bottom: 12px; }
.freebie-success h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.7rem, 3.5vw, 2.4rem); margin: 0 0 12px; }
.freebie-success p { color: var(--ink-soft); margin: 0; }
@media (max-width: 540px) {
  .freebie-modal { padding: 32px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .freebie-overlay, .freebie-modal { transition: opacity .2s; }
  .freebie-overlay.in .freebie-modal { transform: none; }
}
