/* Miri Wigs — site styles
   Colors are taken from the Miri logo (taupe #A08F83). Edit the tokens below to adjust the palette. */

:root {
  --taupe: #a08f83;
  --taupe-deep: #7d6c60;
  --espresso: #3a312c;
  --ink: #2b2522;
  --muted: #6f645d;
  --cream: #fbfaf7;
  --linen: #f3eee8;
  --blush: #eae0d7;
  --line: #e2d9d0;
  --white: #ffffff;

  --serif: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 2px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: 0.005em;
  color: var(--espresso);
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
h3 { font-size: clamp(1.45rem, 2.4vw, 1.8rem); }
p { margin: 0 0 1.1em; }

.eyebrow {
  display: block;
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--taupe-deep);
  margin-bottom: 1.2rem;
}

.lede { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--muted); max-width: 34em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.section { padding: clamp(64px, 10vw, 128px) 0; }
.section--linen { background: var(--linen); }
.section--blush { background: var(--blush); }
.section--dark { background: var(--espresso); color: #e9e1da; }
.section--dark h2, .section--dark h3 { color: var(--white); }
.section--dark .eyebrow { color: #c9b8ab; }

.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }

.skip-link {
  position: absolute; left: -999px; top: 8px;
  background: var(--espresso); color: var(--white); padding: 8px 14px; z-index: 100;
}
.skip-link:focus { left: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  min-height: 50px;
  padding: 0.85em 2em;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--espresso);
  border-radius: var(--radius);
  background: var(--espresso);
  color: var(--white);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.btn:hover, .btn:focus-visible { background: var(--taupe-deep); border-color: var(--taupe-deep); }
.btn--ghost { background: transparent; color: var(--espresso); }
.btn--ghost:hover, .btn--ghost:focus-visible { background: var(--espresso); color: var(--white); border-color: var(--espresso); }
.btn--light { background: var(--white); color: var(--espresso); border-color: var(--white); }
.btn--light:hover, .btn--light:focus-visible { background: transparent; color: var(--white); border-color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 2rem; }
.center .btn-row { justify-content: center; }

.text-link {
  font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase;
  text-decoration: none; color: var(--espresso);
  border-bottom: 1px solid var(--taupe); padding-bottom: 4px;
}
.text-link:hover { color: var(--taupe-deep); }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 250, 247, 0.94);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand img { height: 34px; width: auto; }

.nav-list { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 34px); list-style: none; margin: 0; padding: 0; }
.nav-list a {
  text-decoration: none; font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink);
  padding: 6px 0; border-bottom: 1px solid transparent;
}
.nav-list a:hover, .nav-list a[aria-current="page"] { border-bottom-color: var(--taupe); }
.nav-list .nav-call a { border: 1px solid var(--espresso); padding: 10px 18px; }
.nav-list .nav-call a:hover { background: var(--espresso); color: var(--white); }

.nav-toggle {
  display: none; background: none; border: 0; padding: 10px; margin-right: -10px; cursor: pointer; color: var(--espresso);
}
.nav-toggle span { display: block; width: 24px; height: 1px; background: currentColor; margin: 6px 0; transition: transform 0.25s ease, opacity 0.25s ease; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  /* Keep the open menu out of the short header box. backdrop-filter /
     sticky on .site-header traps position:fixed, so we expand the header
     itself when the menu is open and let the nav fill the viewport. */
  .site-header { overflow: visible; }
  .site-header.is-nav-open {
    position: fixed; inset: 0; height: 100%; height: 100dvh;
    background: var(--cream); backdrop-filter: none; -webkit-backdrop-filter: none;
    border-bottom: 0; z-index: 100;
  }
  .site-header.is-nav-open .wrap {
    height: auto; min-height: 76px; align-items: flex-start; padding-top: 21px;
    flex-wrap: wrap;
  }
  .site-nav {
    display: none;
    flex: 1 1 100%; width: 100%;
    padding: 12px 0 40px; overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--cream);
  }
  .site-nav.is-open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list li { border-bottom: 1px solid var(--line); }
  .nav-list a { display: block; padding: 18px 0; font-size: 0.85rem; border-bottom: 0; }
  .nav-list .nav-call { border-bottom: 0; margin-top: 24px; }
  .nav-list .nav-call a { text-align: center; padding: 16px; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .brand img { height: 28px; }
}

/* ---------- Photo frames ----------
   Each .photo shows a labelled placeholder until the matching image file exists.
   To add a photo, save it at the path in the <img src> and it will cover the placeholder. */
.photo {
  position: relative; overflow: hidden; margin: 0;
  background:
    linear-gradient(135deg, rgba(160,143,131,0.10), rgba(160,143,131,0.22)),
    var(--blush);
  aspect-ratio: 4 / 5;
}
.photo::before {
  content: "Photo needed";
  position: absolute; top: 14px; left: 14px;
  font-size: 0.62rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--taupe-deep); background: rgba(251,250,247,0.85); padding: 5px 9px;
}
.photo::after {
  content: attr(data-placeholder);
  position: absolute; inset: auto 18px 18px 18px;
  font-family: var(--serif); font-style: italic; font-size: 1.05rem; line-height: 1.35;
  color: var(--taupe-deep);
}
.photo img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1;
  background: var(--blush);
}
.photo--wide { aspect-ratio: 3 / 2; }
.photo--square { aspect-ratio: 1 / 1; }
.photo--tall { aspect-ratio: 3 / 4; }

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 7vw, 96px) 0 clamp(64px, 9vw, 120px); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.hero-logo { width: min(420px, 82%); height: auto; margin-bottom: 2.2rem; }
.hero h1 { font-size: clamp(2.3rem, 4.6vw, 3.6rem); }
.hero-media { position: relative; }
.hero-media .photo { aspect-ratio: 4 / 5; }
.hero-media .photo--accent {
  position: absolute; width: 42%; aspect-ratio: 3 / 4; left: -14%; bottom: -10%;
  border: 8px solid var(--cream); z-index: 2;
}
.hero-media > .photo:first-child::after { left: 34%; }
.hero-media .photo--accent::after { font-size: 0.9rem; inset: auto 12px 12px 12px; }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-media { margin: 8px 0 0; }
  .hero-media .photo--accent { display: none; }
  .hero-media > .photo:first-child::after { left: 18px; }
  .hero-logo { width: min(320px, 78%); margin-bottom: 1.6rem; }
}

/* ---------- Pillars (Style • Quality • Comfort) ---------- */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pillar { padding: clamp(28px, 4vw, 48px) clamp(16px, 3vw, 40px); text-align: center; }
.pillar + .pillar { border-left: 1px solid var(--line); }
.pillar h3 { margin: 0; font-style: italic; }
.pillar p { margin: 0.6em 0 0; color: var(--muted); font-size: 0.95rem; }
@media (max-width: 700px) {
  .pillars { grid-template-columns: 1fr; }
  .pillar + .pillar { border-left: 0; border-top: 1px solid var(--line); }
}

/* ---------- Split layouts ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.split--reverse .split-media { order: 2; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split--reverse .split-media { order: 0; }
}

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(10px, 1.6vw, 20px); }
.gallery .photo:nth-child(6n+1) { grid-row: span 2; aspect-ratio: auto; min-height: 100%; }
.gallery figcaption {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 40px 16px 14px;
  color: var(--white); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
  background: linear-gradient(transparent, rgba(43,37,34,0.55));
  opacity: 0; transition: opacity 0.3s ease;
}
.gallery .photo:hover figcaption, .gallery .photo:focus-within figcaption { opacity: 1; }
.gallery .photo:not(:has(img)) figcaption { display: none; }
@media (max-width: 760px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery .photo:nth-child(6n+1) { grid-row: auto; aspect-ratio: 4 / 5; min-height: 0; }
  .gallery figcaption { opacity: 1; }
}

.teaser-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(10px, 1.6vw, 20px); margin: 3rem 0 2.6rem; }
@media (max-width: 760px) {
  .teaser-grid { grid-template-columns: repeat(2, 1fr); }
  .teaser-grid .photo:nth-child(3) { display: none; }
}

/* ---------- Services list ---------- */
.services { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 0; }
.services li { display: flex; align-items: baseline; gap: 20px; padding: 20px 0; border-top: 1px solid var(--line); }
.services li:last-child { border-bottom: 1px solid var(--line); }
.services .num { font-family: var(--serif); font-style: italic; color: var(--taupe); font-size: 1.2rem; min-width: 2ch; }
.services h3 { margin: 0; font-size: 1.6rem; }
.section--dark .services li { border-color: rgba(255,255,255,0.14); }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 56px); counter-reset: step; margin-top: 3rem; }
.step { border-top: 1px solid var(--taupe); padding-top: 22px; }
.step::before {
  counter-increment: step; content: "0" counter(step);
  display: block; font-family: var(--serif); font-style: italic; font-size: 1.3rem; color: var(--taupe); margin-bottom: 10px;
}
.step p { color: var(--muted); font-size: 0.98rem; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Contact details ---------- */
.details { display: grid; gap: 0; margin: 0; }
.details div { padding: 20px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 9rem 1fr; gap: 16px; }
.details div:last-child { border-bottom: 1px solid var(--line); }
.details dt { font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--taupe-deep); padding-top: 4px; }
.details dd { margin: 0; font-family: var(--serif); font-size: 1.4rem; line-height: 1.35; color: var(--espresso); }
.details dd a { text-decoration: none; border-bottom: 1px solid var(--line); }
.details dd a:hover { border-bottom-color: var(--taupe); }
.details dd small { display: block; font-family: var(--sans); font-size: 0.85rem; color: var(--muted); margin-top: 4px; }
@media (max-width: 520px) { .details div { grid-template-columns: 1fr; gap: 4px; } }

.map {
  width: 100%; aspect-ratio: 4 / 3; border: 0; display: block; background: var(--blush);
  filter: grayscale(0.55) sepia(0.12) contrast(0.95);
}

.note {
  border-left: 2px solid var(--taupe); padding: 4px 0 4px 18px; color: var(--muted); font-size: 0.95rem; margin: 1.6rem 0;
}

/* ---------- Form ---------- */
.form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.field label { display: block; font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--taupe-deep); margin-bottom: 8px; }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; transition: border-color 0.2s ease;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--taupe-deep); }
.field textarea { min-height: 150px; resize: vertical; }
.field .hint { font-size: 0.82rem; color: var(--muted); margin-top: 6px; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-status { font-size: 0.95rem; min-height: 1.5em; margin: 0; }
.form-status.is-ok { color: #4f6b4a; }
.form-status.is-error { color: #9a3d32; }

/* ---------- Page header ---------- */
.page-head { padding: clamp(56px, 9vw, 112px) 0 clamp(40px, 6vw, 72px); text-align: center; border-bottom: 1px solid var(--line); }
.page-head .lede { margin: 0 auto; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band .btn-row { justify-content: center; }
.cta-band h2 { max-width: 16em; margin-left: auto; margin-right: auto; }

/* ---------- Footer ---------- */
.site-footer { background: var(--linen); padding: 64px 0 32px; font-size: 0.92rem; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-logo { height: 40px; width: auto; margin-bottom: 18px; }
.site-footer h2 { font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--taupe-deep); font-weight: 400; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--espresso); text-decoration: underline; text-underline-offset: 3px; }
.footer-base { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 0.8rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- Mobile call bar ---------- */
.call-bar { display: none; }
@media (max-width: 700px) {
  .call-bar {
    display: grid; grid-template-columns: 1fr 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: var(--cream); border-top: 1px solid var(--line);
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); gap: 10px;
  }
  .call-bar .btn { min-height: 46px; padding: 0.6em 1em; font-size: 0.7rem; }
  body { padding-bottom: 72px; }
}

/* ---------- Preview-only markers ----------
   Shown only while <html> has class "is-preview". Remove that class before publishing. */
.preview-banner { display: none; }
.is-preview .preview-banner {
  display: block; background: #fff6d6; color: #5a4a12; font-size: 0.85rem; text-align: center; padding: 10px 16px; border-bottom: 1px solid #ecdc9e;
}
.is-preview .confirm {
  text-decoration: underline dotted #c9a227 2px;
  text-underline-offset: 0.22em;
  cursor: help;
}
.is-preview .confirm::after {
  content: "confirm"; font-family: var(--sans); font-style: normal; font-size: 0.55rem; letter-spacing: 0.12em; text-transform: uppercase;
  vertical-align: super; margin-left: 4px; color: #8a6d10;
}
.is-preview .draft-copy { outline: 1px dashed #d8c27a; outline-offset: 8px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
