/* =========================================================
   ELLIE SPENCER — Property Media · Wedding Films
   base.css — reset, brand tokens, shared components
   ---------------------------------------------------------
   Brand palette (from brand board):
     Ivory      #F7F5F2
     Warm Stone #E7E2DA
     Taupe      #BDA695
     Charcoal   #2B2B2B
     Black      #111111
   Type: Playfair Display (headings) / Montserrat (body)
   ========================================================= */

/* ---------- 1. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }

/* ---------- 2. Brand tokens ---------- */
:root {
  --ivory:    #F7F5F2;
  --stone:    #E7E2DA;
  --taupe:    #BDA695;
  --charcoal: #2B2B2B;
  --black:    #111111;

  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  /* Fluid type scale */
  --fs-eyebrow: 0.6875rem;
  --fs-body:    clamp(0.9375rem, 0.9rem + 0.2vw, 1.0625rem);
  --fs-lead:    clamp(1.0625rem, 1rem + 0.45vw, 1.3125rem);
  --fs-h3:      clamp(1.25rem, 1.1rem + 0.7vw, 1.75rem);
  --fs-h2:      clamp(1.875rem, 1.4rem + 2.1vw, 3.25rem);
  --fs-h1:      clamp(2.5rem, 1.5rem + 4.4vw, 5.5rem);

  /* Rhythm */
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --section-y: clamp(4.5rem, 10vw, 9rem);
  --maxw: 1280px;
  --maxw-narrow: 720px;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- 3. Side themes ----------
   Every themed block sets its own colour context, so a
   wedding section and a property section can sit on the
   same page and still feel like different companies. */

[data-side="weddings"] {
  --bg:        var(--ivory);
  --bg-alt:    var(--stone);
  --bg-deep:   var(--charcoal);
  --fg:        var(--charcoal);
  --fg-muted:  rgba(43, 43, 43, .64);
  --fg-faint:  rgba(43, 43, 43, .40);
  --accent:    #A88B76;
  --accent-soft: var(--taupe);
  --line:      rgba(43, 43, 43, .16);
  --line-soft: rgba(43, 43, 43, .08);
  --btn-fg:    var(--ivory);
  --btn-bg:    var(--charcoal);
}

[data-side="property"] {
  --bg:        var(--black);
  --bg-alt:    #191919;
  --bg-deep:   #000000;
  --fg:        var(--ivory);
  --fg-muted:  rgba(247, 245, 242, .62);
  --fg-faint:  rgba(247, 245, 242, .38);
  --accent:    var(--taupe);
  --accent-soft: var(--taupe);
  --line:      rgba(247, 245, 242, .18);
  --line-soft: rgba(247, 245, 242, .09);
  --btn-fg:    var(--black);
  --btn-bg:    var(--ivory);
}

/* Master brand context — used on the splitter and page chrome
   that belongs to neither side. */
[data-side="brand"] {
  --bg:        var(--ivory);
  --bg-alt:    var(--stone);
  --bg-deep:   var(--black);
  --fg:        var(--charcoal);
  --fg-muted:  rgba(43, 43, 43, .64);
  --fg-faint:  rgba(43, 43, 43, .40);
  --accent:    #A88B76;
  --accent-soft: var(--taupe);
  --line:      rgba(43, 43, 43, .16);
  --line-soft: rgba(43, 43, 43, .08);
  --btn-fg:    var(--ivory);
  --btn-bg:    var(--charcoal);
}

/* ---------- 4. Base typography ---------- */
body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.7;
  font-weight: 400;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.2; }

p { text-wrap: pretty; }
strong { font-weight: 600; }

.lead {
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--fg-muted);
  font-weight: 300;
}

/* The small uppercase label that sits above headings.
   Used everywhere — it is a big part of the brand's voice. */
.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}
.eyebrow--rule {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.eyebrow--rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.serif-accent {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--accent);
}

/* ---------- 5. Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: var(--maxw-narrow); }
.wrap--wide { max-width: 1560px; }

.section {
  padding-block: var(--section-y);
  background: var(--bg);
  color: var(--fg);
}
.section--alt { background: var(--bg-alt); }
.section--deep {
  background: var(--bg-deep);
  color: var(--ivory);
}
.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }

.stack > * + * { margin-top: 1.25rem; }
.center { text-align: center; }
.center .eyebrow--rule { justify-content: center; }

/* ---------- 6. Logo ----------
   The ES monogram is built from live text rather than an image
   so it stays crisp at any size and remains readable to search
   engines and screen readers. */
.logo { display: inline-flex; align-items: center; gap: .875rem; }

.logo__mark {
  position: relative;
  font-family: var(--font-display);
  line-height: 1;
  font-size: var(--mark-size, 2rem);
  letter-spacing: -0.08em;
  white-space: nowrap;
}
.logo__mark .e { color: var(--fg); }
.logo__mark .s { color: var(--accent-soft); margin-left: -0.22em; }

.logo__word {
  display: flex;
  flex-direction: column;
  gap: .3em;
}
.logo__name {
  font-family: var(--font-display);
  font-size: var(--word-size, 1.0625rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--fg);
}
.logo__strap {
  font-family: var(--font-body);
  font-size: 0.5625rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--fg-faint);
}

/* Stacked lockup — used large, on the splitter */
.logo--stacked { flex-direction: column; gap: 1.1rem; text-align: center; }
.logo--stacked .logo__word { align-items: center; }

/* ---------- 7. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  padding: 1.0625rem 2.25rem;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: 1px solid transparent;
  background: var(--btn-bg);
  color: var(--btn-fg);
  transition: background .4s var(--ease), color .4s var(--ease),
              border-color .4s var(--ease), transform .4s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

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

.btn--accent { background: var(--accent); color: var(--ivory); border-color: var(--accent); }
[data-side="property"] .btn--accent { color: var(--black); }

/* Text link with a rule that draws in on hover */
.link-under {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg);
  padding-bottom: .4rem;
  border-bottom: 1px solid var(--line);
  transition: border-color .4s var(--ease), gap .4s var(--ease);
}
.link-under:hover { border-color: var(--accent); gap: .85rem; }
.link-under::after { content: "\2192"; font-size: .8rem; letter-spacing: 0; }

/* ---------- 8. Site header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
  transition: background .4s var(--ease), border-color .4s var(--ease);
}
@supports not (backdrop-filter: blur(1px)) {
  .site-header { background: var(--bg); }
}
.site-header.is-stuck { border-bottom-color: var(--line); }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-height: 84px;
  padding-block: 1rem;
}
.site-header .logo { --mark-size: 1.6rem; --word-size: .8125rem; }

.nav { display: flex; align-items: center; gap: clamp(1.25rem, 2.6vw, 2.5rem); }
.nav__link {
  position: relative;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-muted);
  padding-block: .35rem;
  transition: color .3s var(--ease);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .45s var(--ease);
}
.nav__link:hover { color: var(--fg); }
.nav__link:hover::after,
.nav__link[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.nav__link[aria-current="page"] { color: var(--fg); }

/* A quiet way back to the front door. Set apart from the side's own
   navigation by a rule, and deliberately understated — it is an exit, not
   a destination, and it must not compete with Enquire. */
.nav__home {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-faint);
  padding-left: clamp(1rem, 2.4vw, 2rem);
  border-left: 1px solid var(--line);
  transition: color .3s var(--ease);
}
.nav__home::before { content: "\2190"; letter-spacing: 0; font-size: .8rem; }
.nav__home:hover { color: var(--accent); }
.nav__home:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Mobile nav */
.nav-toggle { display: none; width: 30px; height: 30px; position: relative; z-index: 101; }
.nav-toggle span {
  position: absolute;
  left: 3px;
  width: 24px; height: 1px;
  background: var(--fg);
  transition: transform .45s var(--ease), opacity .3s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 11px; }
.nav-toggle span:nth-child(2) { top: 18px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

@media (max-width: 860px) {
  /* backdrop-filter makes the header a containing block for any
     fixed-position descendant, which traps the full-screen menu inside
     the header strip. The blur is decoration; the working menu is not. */
  .site-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--bg);
  }
  .nav-toggle { display: block; }
  .nav {
    position: fixed;
    inset: 0;
    z-index: 100;
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    background: var(--bg);
    opacity: 0;
    visibility: hidden;
    transition: opacity .45s var(--ease), visibility .45s var(--ease);
  }
  .nav[data-open="true"] { opacity: 1; visibility: visible; }
  .nav__link { font-size: 0.8125rem; }
  .nav__home {
    border-left: 0;
    padding-left: 0;
    padding-top: 1.75rem;
    border-top: 1px solid var(--line);
    font-size: 0.6875rem;
  }
}

/* ---------- 9. Footer ---------- */
.site-footer {
  background: var(--bg-deep);
  color: var(--ivory);
  padding-block: clamp(3.5rem, 7vw, 6rem) 2.5rem;
}
.site-footer .logo { --mark-size: 2.4rem; --word-size: .9375rem; }
.site-footer .logo__name { color: var(--ivory); }
.site-footer .logo__mark .e { color: var(--ivory); }
.site-footer .logo__strap { color: rgba(247, 245, 242, .45); }

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  padding-bottom: 3.5rem;
  border-bottom: 1px solid rgba(247, 245, 242, .14);
}
@media (max-width: 780px) { .footer__grid { grid-template-columns: 1fr; } }

.footer__heading {
  font-family: var(--font-body);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--taupe);
  margin-bottom: 1.5rem;
}
.footer__list li + li { margin-top: .875rem; }
.footer__list a, .footer__list span {
  font-size: 0.875rem;
  color: rgba(247, 245, 242, .68);
  transition: color .3s var(--ease);
}
.footer__list a:hover { color: var(--ivory); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  font-size: 0.75rem;
  color: rgba(247, 245, 242, .42);
}

/* ---------- 10. Forms ---------- */
.form { display: grid; gap: 1.5rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 640px) { .form__row { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: .6rem; }
.field label {
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: .95rem 0;
  font-size: 1rem;
  color: var(--fg);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  transition: border-color .35s var(--ease);
}
.field select { padding-right: 1.5rem; appearance: none; cursor: pointer; }
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus,
.field select:focus,
.field textarea:focus { outline: none; border-bottom-color: var(--accent); }
.field input::placeholder, .field textarea::placeholder { color: var(--fg-faint); }
/* Native dropdown lists render in the OS palette, so force
   readable option text on the dark property theme. */
.field select option { color: #111; background: #fff; }

/* Honeypot — hidden from people, catches naive spam bots */
.field--trap { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }

.form__note { font-size: 0.75rem; color: var(--fg-faint); line-height: 1.6; }

/* ---------- 11. Utilities ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -60px; left: var(--gutter);
  z-index: 200;
  padding: .875rem 1.5rem;
  background: var(--charcoal);
  color: var(--ivory);
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: top .3s var(--ease);
}
.skip-link:focus { top: 1rem; }

/* Scroll reveal — JS adds .is-in when the element enters view.
   Without JS everything stays visible, which is the safe default. */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .1s; }
.reveal[data-delay="2"] { transition-delay: .2s; }
.reveal[data-delay="3"] { transition-delay: .3s; }
.reveal[data-delay="4"] { transition-delay: .4s; }
html.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* Media frames */
.frame { position: relative; overflow: hidden; background: var(--bg-alt); }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame--portrait { aspect-ratio: 2 / 3; }
.frame--landscape { aspect-ratio: 3 / 2; }
.frame--wide { aspect-ratio: 16 / 9; }
.frame--square { aspect-ratio: 1 / 1; }

/* A slow zoom on hover — used on gallery and index imagery */
.frame--zoom img { transition: transform 1.4s var(--ease); }
.frame--zoom:hover img { transform: scale(1.05); }
