/* Closets / Wardrobes by Margaret */

/* Licensed web fonts from Fontspring (order 134333150, Web Font EULA 2.0).
   Le Mores (Great Studio), Museo Sans Display (exljbris), Dragtime (feydesign).
   The license allows only the provided WOFF/WOFF2 files on the web (never the
   desktop .otf files) and up to 10,000 page views a month. Don't copy these
   files elsewhere: they're licensed to this site. */
@font-face {
  font-family: 'Le Mores Script';
  src: url('fonts/le-mores-script.woff2') format('woff2'), url('fonts/le-mores-script.woff') format('woff');
  font-display: block;
}
@font-face {
  font-family: 'Le Mores Serif';
  src: url('fonts/le-mores-serif.woff2') format('woff2'), url('fonts/le-mores-serif.woff') format('woff');
  font-display: block;
}
@font-face {
  font-family: 'Museo Sans Display';
  font-weight: 100;
  src: url('fonts/museo-sans-display-hairline.woff2') format('woff2'), url('fonts/museo-sans-display-hairline.woff') format('woff');
  font-display: swap;
}
@font-face {
  font-family: 'Museo Sans Display';
  font-weight: 200;
  src: url('fonts/museo-sans-display-extralight.woff2') format('woff2'), url('fonts/museo-sans-display-extralight.woff') format('woff');
  font-display: swap;
}
@font-face {
  font-family: 'Museo Sans Display';
  font-weight: 300;
  src: url('fonts/museo-sans-display-light.woff2') format('woff2'), url('fonts/museo-sans-display-light.woff') format('woff');
  font-display: swap;
}
@font-face {
  font-family: 'Dragtime';
  src: url('fonts/dragtime.woff2') format('woff2'), url('fonts/dragtime.woff') format('woff');
  font-display: block;
}

:root {
  --linen: #f3eee5;
  --paper: #fbf8f2;
  --sand: #e6dfd2;
  --line: #d9d0c0;
  --line-strong: #b8ac97;
  --ink: #2b2925;
  --ink-soft: #5f5a52;
  --green: #2f4a40;
  --green-dark: #22362f;
  --cognac: #8a5a30;      /* call-to-action buttons */
  --cognac-dark: #6f4724;
  --on-photo: #fbf8f2;
  --shade: #3b3731;

  /* Logo: small serif capitals over a script "Margaret" */
  --font-script: 'Le Mores Script', 'Italianno', cursive;
  --font-caps: 'Le Mores Serif', Georgia, serif;
  /* "Feel better.": Dragtime, a brush hand. Mr Dafoe (free) as fallback */
  --font-hand: 'Dragtime', 'Mr Dafoe', cursive;
  /* Headlines */
  --font-display: 'Museo Sans Display', 'Jost', 'Helvetica Neue', Arial, sans-serif;
  /* Body, labels, buttons */
  --font-sans: 'Jost', 'Helvetica Neue', Arial, sans-serif;

  --texture: .15; /* strength of the fabric texture over the linen (0–1) */

  /* Soft corners */
  --radius: 12px;    /* buttons, photo box, panels */
  --radius-sm: 8px;  /* form fields, thumbnails */

  --bar: 90px;   /* height of the logo strip (room for the script's descenders) */
  --frame: 10px; /* linen border around photos */

  --fade: 4800ms;
  --drift: 16100ms;
  color-scheme: light;
}
@media (min-width: 900px) {
  :root { --bar: 104px; --frame: 18px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--linen);
  -webkit-font-smoothing: antialiased;
}
/* Fabric texture over the linen background. Fixed so the weave stays put while
   the page scrolls; sits behind everything. Multiply lets the grey weave shade
   the linen without cooling its color. The beige alternative is
   images/linen-texture.webp (use it without the blend mode). */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: url('../images/linen-texture-grey.webp') center / cover;
  mix-blend-mode: multiply;
  opacity: var(--texture);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* ---------- Logo strip ---------- */

.site-bar {
  height: calc(var(--bar) + env(safe-area-inset-top));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: env(safe-area-inset-top) calc(var(--frame) + .6rem) 0;
}

.wordmark {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  text-decoration: none;
  color: var(--ink);
}
.wordmark-caps {
  font-family: var(--font-caps);
  font-size: .58rem;
  line-height: 1;
  letter-spacing: .32em; /* sets the logo width; "Margaret" is sized to match it */
  text-transform: uppercase;
}
.wordmark-script {
  font-family: var(--font-script);
  font-size: 2.35rem;
  line-height: 1;
  margin-top: .14em; /* clear space under the capitals line */
  /* a slight lift off the linen */
  text-shadow: 0 1px 1px rgb(43 41 37 / .16), 0 3px 10px rgb(43 41 37 / .14);
}

@media (min-width: 900px) {
  .wordmark-caps { font-size: .7rem; }
  .wordmark-script { font-size: 3rem; }
}

.bar-link {
  font: 500 .66rem/1 var(--font-sans);
  letter-spacing: .22em;
  text-transform: uppercase;
  text-decoration: none;
  padding: .6rem 0;
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease;
}
.bar-link:hover { border-color: currentColor; }
.home .bar-link { font-weight: 600; }
@media (min-width: 900px) { .bar-link { font-size: .72rem; } }

/* ---------- Photo layers ---------- */

.slideshow {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--shade);
}
.slideshow::before,
.slideshow::after,
.consult-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
/* Black layer under the headline so white type reads on any photo.
   --scrim sets the overall darkness; the center gets a bit extra behind the text. */
.slideshow { --scrim: .34; }
.slideshow::before {
  background:
    radial-gradient(ellipse 70% 55% at 50% 50%, rgb(0 0 0 / .22), transparent 75%),
    rgb(0 0 0 / var(--scrim));
}
/* A little film grain keeps big photos from looking digital-flat */
.slideshow::after,
.consult-photo::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .16;
  mix-blend-mode: overlay;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--fade) ease-in-out;
}
.slide.is-active { opacity: 1; }
.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
}
.slide.is-moving img {
  animation: drift var(--drift) linear both;
  will-change: transform;
}
/* A slow, gentle zoom-out while each photo is on screen */
@keyframes drift {
  from { transform: scale(1.05); }
  to   { transform: scale(1); }
}

/* ---------- Home ---------- */

.hero {
  position: relative;
  height: calc(100vh - var(--bar) - var(--frame));
  height: calc(100svh - var(--bar) - env(safe-area-inset-top) - var(--frame));
  min-height: 320px;
  margin: 0 var(--frame) var(--frame);
  overflow: hidden;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--on-photo);
}
.hero-copy {
  position: relative;
  z-index: 2;
  padding: 1.5rem 1rem;
}
@media (orientation: landscape) and (max-height: 500px) {
  .hero-copy { padding-block: .75rem; }
  .hero-copy .btn { margin-top: 1.25rem; }
}

.headline {
  margin: 0;
  font-family: var(--font-display);
  /* sized by width, but never too big for a short screen (phone turned sideways) */
  font-size: clamp(1.75rem, min(7.6vw, 9vh), 4.4rem);
  line-height: 1.04;
  letter-spacing: -.015em;
  text-shadow: 0 2px 24px rgb(0 0 0 / .3);
}
/* Lines stack centered and size to their text, so site.js can match the first
   two widths. Flex centering also keeps an extra-wide line centered. */
.headline { display: flex; flex-direction: column; align-items: center; }
.headline span { white-space: nowrap; }
.headline .lt { font-weight: 100; }
.headline .bk {
  font-family: var(--font-hand);
  font-weight: 400;
  font-size: 1.3em;
  line-height: 1;
  letter-spacing: 0;
  /* The F's flourish rises well above the letters. Padding keeps it inside the
     write-on mask; the negative margins cancel the padding in the layout. */
  padding: .42em .6em .22em;
  margin: -.3em -.6em -.22em; /* top: tucks up so the F overlaps the line above a little */
  text-shadow: 0 2px 26px rgb(0 0 0 / .35);
}

/* Write-on: a soft-edged mask sweeps left to right once the font is ready.
   Only when JS runs (html.js), so the words never stay hidden. */
.js [data-write-on] {
  -webkit-mask-image: linear-gradient(90deg, #000 42%, transparent 58%);
          mask-image: linear-gradient(90deg, #000 42%, transparent 58%);
  -webkit-mask-size: 260% 100%;
          mask-size: 260% 100%;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: 100% 0;
          mask-position: 100% 0;
}
.js [data-write-on].is-written { animation: write-on 1.9s cubic-bezier(.55, .1, .35, 1) forwards; }
@keyframes write-on {
  to { -webkit-mask-position: 0 0; mask-position: 0 0; }
}
@media (max-width: 600px) {
  /* Hairline gets too thin to read over a photo at phone sizes */
  .headline .lt { font-weight: 200; }
  /* "Feel better." fills the line: screen width minus the photo frame and
     side padding (52px), divided by the script's width per em (~3.66, plus a
     little room for the F's flourish) */
  .headline .bk {
    font-size: calc((100vw - 52px) / 3.85);
    margin-top: -.08em; /* no overlap on phones: the F clears the line above */
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 2.25rem;
  /* extra left padding balances the trailing letter-spacing */
  padding: 1.05rem 2.1rem 1.05rem calc(2.1rem + .24em);
  font: 500 .74rem/1 var(--font-sans);
  letter-spacing: .24em;
  text-transform: uppercase;
  text-decoration: none;
  color: inherit;
  background: transparent;
  border: 1px solid currentColor;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color .35s ease, color .35s ease, border-color .35s ease;
}
.btn--accent {
  font-weight: 600;
  background: var(--cognac);
  border-color: var(--cognac);
  color: var(--paper);
  box-shadow: 0 1px 2px rgb(24 21 18 / .2), 0 4px 12px rgb(24 21 18 / .18);
}
.btn--accent:hover { background: var(--cognac-dark); border-color: var(--cognac-dark); }
.btn--solid {
  width: 100%;
  margin-top: 1.75rem;
  padding-block: 1.2rem;
  background: var(--cognac);
  border-color: var(--cognac);
  color: var(--paper);
  box-shadow: 0 1px 2px rgb(24 21 18 / .14), 0 4px 12px rgb(24 21 18 / .1);
}
.btn--solid:hover { background: var(--cognac-dark); border-color: var(--cognac-dark); }
.btn[disabled] { opacity: .6; cursor: progress; }

/* Short text section below the home photo */
.home-info {
  max-width: 40rem;
  margin: 0 auto;
  padding: 3.5rem 1.25rem calc(4rem + env(safe-area-inset-bottom));
  text-align: center;
}
.home-info h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: -.015em;
}
.home-info p { margin: .9rem 0 0; color: var(--ink-soft); font-size: 1.05rem; }
.home-info .home-areas,
.footer-areas {
  font: 500 .7rem/2 var(--font-sans);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--green);
}
.home-info .home-areas { margin-top: 1.4rem; }
.home-info-link {
  display: inline-block;
  margin-top: 1.4rem;
  font: 500 .74rem/1 var(--font-sans);
  letter-spacing: .22em;
  text-transform: uppercase;
  text-decoration: none;
  padding-bottom: .35rem;
  border-bottom: 1px solid currentColor;
}
.footer-areas { margin: 4.5rem 0 0; text-align: center; line-height: 1.8; }
.footer-areas + .site-footer { margin-top: 1.5rem; }

/* ---------- Consultation page ---------- */

.consult .site-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  transition: background-color .3s ease, box-shadow .3s ease;
}
/* Clear at the top so the texture runs through it; frosted once content
   scrolls underneath (site.js adds .is-stuck) */
.consult .site-bar.is-stuck {
  background: rgb(243 238 229 / .9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line);
}

.consult-photo {
  position: relative;
  height: 58vh;
  height: 58svh;
  margin: 0 var(--frame);
  overflow: hidden;
  background: var(--shade);
}
.consult-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 30% 40%;
}

.consult-main { padding: 2.75rem 1.25rem calc(2rem + env(safe-area-inset-bottom)); }

/* Phone turned sideways: a short, wide strip would only show shelves, so
   give the photo more height and bring her face into frame */
@media (orientation: landscape) and (max-height: 500px) {
  .consult-photo { height: 85vh; height: 85svh; }
  .consult-photo img { object-position: 30% 68%; }
}
.consult-main > * { max-width: 36rem; margin-inline: auto; }

@media (min-width: 900px) {
  .consult-layout {
    display: grid;
    grid-template-columns: 44% 1fr;
    align-items: start;
  }
  .consult-photo {
    position: sticky;
    top: var(--bar);
    height: calc(100vh - var(--bar) - var(--frame));
    margin: 0 0 var(--frame) var(--frame);
  }
  .consult-main { padding: 3.5rem clamp(2rem, 5vw, 5.5rem) 2.5rem; }
}

.eyebrow {
  margin: 0 0 .9rem;
  font: 500 .7rem/1.2 var(--font-sans);
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--green);
}
.consult h1,
.consult h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 200;
  line-height: 1.08;
  letter-spacing: -.015em;
  color: var(--ink);
}
.consult h1 { font-size: clamp(2.4rem, 4.4vw, 3.4rem); }
.consult h2 { font-size: clamp(1.7rem, 2.8vw, 2.1rem); }
.lede { margin: 1.1rem 0 0; font-size: 1.08rem; color: var(--ink-soft); }
/* the intro can run to a couple of paragraphs (blank line between them) */
.intro .lede { white-space: pre-line; }
.hint { margin: .6rem 0 0; color: var(--ink-soft); }

.quote {
  margin-top: 3rem;
  margin-bottom: 0;
  padding: 2rem 0;
  border-block: 1px solid var(--line);
}
.quote blockquote { margin: 0; }
.quote blockquote p {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  line-height: 1.35;
  letter-spacing: -.005em;
}
.quote figcaption {
  margin-top: 1rem;
  font: 500 .72rem/1.3 var(--font-sans);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.quote figcaption { display: flex; align-items: center; gap: .9rem; }
/* The dash only appears when there's no photo beside the name */
.quote figcaption span:only-child::before { content: "— "; }
.quote-photo {
  width: 64px;
  height: 64px;
  flex: none;
  object-fit: cover;
  border: 3px solid var(--paper);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgb(0 0 0 / .06), 0 4px 12px rgb(60 50 40 / .12);
  /* Grade layer only (the photo file is untouched): softer contrast, muted
     color and a little warmth, to sit with the site's film-like photos */
  filter: contrast(.9) saturate(.78) sepia(.1) brightness(1.03);
}
.quote blockquote p::before { content: "“"; }
.quote blockquote p::after { content: "”"; }
/* Keeps Margaret's line breaks from /admin (a blank line = new paragraph) */
.about-body { white-space: pre-line; }

.request { margin-top: 3rem; }

/* ---------- Form ---------- */

.dropzone { position: relative; margin-top: 1.5rem; }
.dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.dropzone label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  padding: 2.25rem 1.25rem;
  text-align: center;
  background: var(--paper);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease;
}
.dropzone label:hover,
.dropzone.is-over label { border-color: var(--green); background: #f0eee4; }
.dropzone input:focus-visible + label { outline: 2px solid var(--green); outline-offset: 3px; }
.dropzone svg { width: 30px; height: 30px; stroke: var(--green); margin-bottom: .35rem; }
.dropzone-title { font-family: var(--font-display); font-size: 1.25rem; font-weight: 300; line-height: 1.2; }
.dropzone-sub { font-size: .9rem; color: var(--ink-soft); }

.thumbs {
  list-style: none;
  margin: .75rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: .5rem;
}
.thumbs:empty { display: none; }
.thumb { position: relative; aspect-ratio: 1; background: var(--sand); overflow: hidden; border-radius: var(--radius-sm); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-name {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: .4rem;
  font-size: .7rem;
  text-align: center;
  word-break: break-all;
  color: var(--ink-soft);
}
.thumb-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 1.1rem;
  line-height: 1;
  color: #fff;
  background: rgb(43 41 37 / .72);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.fields { display: grid; gap: 1.1rem; margin-top: 1.5rem; }
.fields .fields { margin-top: 0; }
@media (min-width: 560px) {
  .fields--2 { grid-template-columns: 1fr 1fr; }
  .fields--2 .field--wide { grid-column: 1 / -1; }
}
.field { display: grid; gap: .4rem; }
.field label {
  font: 500 .7rem/1.3 var(--font-sans);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.optional { font-weight: 300; letter-spacing: .04em; text-transform: none; }

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  width: 100%;
  padding: .8rem .9rem;
  font: 400 1rem/1.4 var(--font-sans); /* 16px keeps iOS from zooming in */
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color .2s ease, box-shadow .2s ease;
}
input:focus,
textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgb(47 74 64 / .15);
}
textarea { min-height: 7.5rem; resize: vertical; }
::placeholder { color: #9a9387; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status { min-height: 1.4em; margin: .75rem 0 0; font-size: .92rem; color: #8a3b2e; }
.form-status:empty { display: none; }
.form-note { margin: .75rem 0 0; font-size: .85rem; color: var(--ink-soft); text-align: center; }

.thanks {
  margin-top: 1.5rem;
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.thanks:focus { outline: none; }
.thanks p { margin: 0; }
.thanks .thanks-title {
  margin-bottom: .5rem;
  font-family: var(--font-script);
  font-size: 3.4rem;
  line-height: 1.1;
  color: var(--green);
}
.thanks .preview-note { margin-top: 1rem; font-size: .8rem; color: var(--ink-soft); }

/* ---------- About ---------- */

.about {
  margin-top: 4.5rem;
  padding-top: 3rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 1.75rem;
}
@media (min-width: 560px) {
  .about { grid-template-columns: 10.5rem 1fr; align-items: start; }
}
.portrait {
  width: 100%;
  max-width: 10.5rem;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 7px solid var(--paper);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgb(0 0 0 / .06), 0 8px 24px rgb(60 50 40 / .1);
}
.about p { margin: 1rem 0 0; }
.about .signature {
  margin-top: .5rem;
  font-family: var(--font-script);
  font-size: 2.8rem;
  line-height: 1.1;
  color: var(--green);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 4.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: .8rem;
  color: var(--ink-soft);
}
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  .slide img { transform: none; }
  .slide.is-moving img { animation: none; }
  .js [data-write-on] { -webkit-mask-image: none; mask-image: none; }
}
