/* ==========================================================================
   Elementa — sections stylesheet (2 of 3, handle "elementa-sections").
   The design's own sections 03 hero · 04 statement · 05 work · 06 journey ·
   07 services · 08 quotes · 09 news · 10 enquiry · 11 footer · 12 utilities,
   in the order they held in main.css. Tokens and primitives come from
   main.css, which is linked first.
   ========================================================================== */

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

.e-hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: var(--e-white);
  background: var(--e-ink);
  overflow: hidden;
  isolation: isolate;
}
.e-hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.e-hero__media video, .e-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.e-hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, rgba(0, 0, 0, .74) 0%, rgba(0, 0, 0, .4) 42%, rgba(0, 0, 0, .1) 100%),
    linear-gradient(to bottom, rgba(0, 0, 0, .38), transparent 26%);
}

.e-hero__in {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding: calc(var(--header-h) + 4rem) var(--edge) 0;
}
.e-hero__eyebrow { color: rgba(255, 255, 255, .72); margin-bottom: 1.5rem; }
.e-hero__title {
  font-size: var(--t-display);
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: normal;
  max-width: 16em;
}
.e-hero__title em {
  display: block;
  font-style: normal;
}
.e-hero__sub {
  margin-top: 1.75rem;
  max-width: 32em;
  color: rgba(255, 255, 255, .84);
}
.e-hero__cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.25rem; }

.e-hero__foot {
  margin-top: clamp(2.5rem, 6vw, 5rem);
  border-top: 1px solid rgba(255, 255, 255, .22);
  padding-block: 1.25rem 1.5rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem var(--gutter);
  font-size: var(--t-small);
  color: rgba(255, 255, 255, .85);
}
.e-hero__stat { display: grid; gap: .2rem; }
.e-hero__stat strong { font-weight: 400; font-size: 1rem; }
.e-hero__stat span { font-size: var(--t-small); letter-spacing: 0; text-transform: none; color: rgba(255, 255, 255, .7); }

.e-cue {
  display: none;
  align-items: center;
  gap: .75rem;
  justify-self: end;
  align-self: center;
  font-size: var(--t-small);
  letter-spacing: 0;
  text-transform: none;
  color: rgba(255, 255, 255, .7);
}
.e-cue::after {
  content: "";
  width: 3rem;
  height: 1px;
  background: currentColor;
  transform-origin: left;
  animation: e-nudge 2.4s var(--ease-out) infinite;
}
@keyframes e-nudge { 0% { transform: scaleX(0); opacity: 0; } 30% { opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .e-cue::after { animation: none; } }

@media (min-width: 48rem) {
  .e-hero__foot { grid-template-columns: repeat(2, max-content) 1fr; column-gap: clamp(2rem, 5vw, 5rem); }
  .e-cue { display: inline-flex; }
}

/* 04 Statement ------------------------------------------------------------- */

.e-statement__media { aspect-ratio: 4 / 5; }
.e-statement__text { display: grid; gap: 2rem; align-content: center; justify-items: start; }
.e-statement__head { display: grid; gap: 1.25rem; }
/* the founder's words are a quotation, not a heading: Light, the former h2 size */
.e-statement__quote {
  font-size: clamp(1.5rem, 1.25rem + .9vw, 1.75rem);   /* 24px → 28px */
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: normal;
  text-wrap: balance;
  max-width: 27em; /* the text column's width: four lines, not eight (client note) */
}
.e-statement__who { font-size: var(--t-small); color: var(--fg-muted); line-height: 1.5; }
.e-statement__who strong { display: block; font-weight: 400; color: var(--fg); }
.e-pillars { width: 100%; border-top: 1px solid var(--line); }
.e-pillar {
  display: grid;
  gap: .35rem 1.5rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}
.e-pillar p { color: var(--fg); max-width: 44ch; }

@media (min-width: 48rem) {
  .e-pillar { grid-template-columns: 11rem 1fr; align-items: baseline; }
}
@media (min-width: 62rem) {
  /* the picture takes the text column's full height: the two read as one block */
  .e-statement__media { aspect-ratio: auto; align-self: stretch; min-height: 100%; }
}

/* 05 Selected work --------------------------------------------------------- */

.e-work__grid { display: grid; gap: var(--gutter); }
.e-work__item { display: block; }
.e-work__item .e-media { aspect-ratio: 4 / 5; }
.e-work__cap {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: .75rem;
  border-top: 1px solid var(--line);
}
.e-work__title { font-size: 1.0625rem; font-weight: 700; line-height: 1.3; }   /* Bold 17px, the live card title */
.e-work__meta { font-size: var(--t-small); color: var(--fg); white-space: nowrap; }

@media (max-width: 61.999rem) {
  .e-work__grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    margin-inline: calc(-1 * var(--edge));
    padding-inline: var(--edge);
    scroll-padding-inline: var(--edge);
  }
  .e-work__grid::-webkit-scrollbar { display: none; }
  .e-work__grid .e-work__item { flex: 0 0 min(82vw, 30rem); scroll-snap-align: start; }
}
@media (max-width: 47.999rem) {
  /* narrow rail cards: the meta takes its own line under the title, as on the portfolio cards */
  .e-work__grid .e-work__cap { display: grid; justify-content: normal; align-items: start; gap: .35rem; }
  .e-work__grid .e-work__meta { white-space: normal; }
}
@media (min-width: 62rem) {
  /* the lead picture sets the height; the two right-hand pictures share it exactly */
  .e-work__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); }
  .e-work__grid .e-work__item { display: grid; grid-template-rows: minmax(0, 1fr) auto; min-height: 0; }
  .e-work__item--lead { grid-column: 1 / 8; grid-row: 1 / 3; }
  .e-work__item--lead .e-media { aspect-ratio: 4 / 5; }
  .e-work__item--a { grid-column: 8 / 13; grid-row: 1; }
  .e-work__item--b { grid-column: 8 / 13; grid-row: 2; }
  .e-work__item--a .e-media, .e-work__item--b .e-media { aspect-ratio: auto; height: 100%; min-height: 0; }
}

/* 06 Journey --------------------------------------------------------------- */

.e-journey__text { display: grid; gap: 1.5rem; justify-items: start; align-content: center; }   /* centred on the film */
.e-journey__text .e-h2 { max-width: 12em; }
.e-journey__video { aspect-ratio: 4 / 3; }
.e-journey__cap {
  position: absolute;
  left: 1.25rem;
  bottom: 1.25rem;
  z-index: 1;
  color: rgba(255, 255, 255, .85);
  text-shadow: 0 1px 12px rgba(0, 0, 0, .5);
}

.e-play {
  /* centred by half its own size, not by auto margins: Safari does not
     resolve those on a positioned <button> and leaves it at the top */
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -2.25rem 0 0 -2.25rem;
  z-index: 1;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: var(--e-ink);
  display: grid;
  place-items: center;
  transition: transform var(--dur-fast), background var(--dur-fast), opacity var(--dur-fast);
}
.e-play svg { width: 1rem; height: 1rem; margin-left: .15rem; }
.e-play:hover { transform: scale(1.06); background: var(--e-white); }
[data-video][data-playing="true"] .e-play, [data-video][data-playing="true"] .e-journey__cap { opacity: 0; pointer-events: none; }
.e-media > video { position: absolute; inset: 0; }

@media (min-width: 62rem) {
}

/* 07 Services -------------------------------------------------------------- */

.e-services__head { display: grid; gap: 1rem; }
.e-services__head .e-h2 { max-width: 14em; }
/* heading and list in one column, the column centred on the stage picture */
.e-services__col { display: grid; gap: 2rem; align-content: center; align-self: center; }
.e-services__list { border-top: 1px solid var(--line); }
.e-service { border-bottom: 1px solid var(--line); transition: opacity var(--dur-fast); }
.e-service__head {
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1.5rem 0;
  text-align: left;
  color: inherit;
}
.e-service__num { font-size: var(--t-label); font-weight: 300; letter-spacing: 0; color: var(--fg); }
.e-service__title { font-size: 1.375rem; font-weight: 700; line-height: 1.3; letter-spacing: normal; }   /* Bold 22px, live */
.e-service__icon {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  transition: transform var(--dur) var(--ease-out), background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
}
.e-service__icon svg { width: .9rem; height: .9rem; transition: transform var(--dur) var(--ease-out); }
.e-service__icon .is-arrow { display: none; }
.e-service__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--dur) var(--ease-out); }
.e-service__body > div { overflow: hidden; }
.e-service[data-open="true"] .e-service__body { grid-template-rows: 1fr; }
/* the glyph turns, not the circle: a turned 2.5rem box would reach 8px past the row */
.e-service[data-open="true"] .e-service__icon svg { transform: rotate(45deg); }
.e-service__desc {
  display: grid;
  gap: 1.25rem;
  justify-items: start;
  padding: .25rem 0 1.75rem 4rem;
  max-width: 52ch;
  color: var(--fg);
}
.e-service__desc .e-link { color: var(--fg); }
.e-services__stage { display: none; }

@media (min-width: 62rem) {
  .e-service__head { grid-template-columns: 4rem 1fr auto; padding: 1.75rem 0; cursor: pointer; }
  .e-service__icon .is-plus { display: none; }
  .e-service__icon .is-arrow { display: block; }
  .e-service[data-open="true"] .e-service__icon {
    background: var(--fg);
    color: var(--bg);
    border-color: var(--fg);
  }
  .e-service[data-open="true"] .e-service__icon svg { transform: rotate(-45deg); }
  .e-service:not([data-open="true"]) { opacity: .5; }
  .e-service:not([data-open="true"]):hover { opacity: .8; }
  .e-service__desc { padding-left: 5rem; }
  .e-services__stage {
    display: block;
    position: sticky;
    top: calc(var(--header-h) + 2.5rem);
    align-self: start;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--e-stone);   /* light until the picture paints: no dark box */
  }
  /* one picture for all four services: the sofa and the palm view in frame */
  .e-services__stage img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 57% 50%;
  }
}

/* 08 Quotes ---------------------------------------------------------------- */

.e-quotes__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: var(--space-block);
}
.e-quotes__head .e-label { margin-bottom: 1rem; }
.e-google { display: inline-flex; align-items: center; gap: .75rem; font-size: var(--t-small); font-weight: 400; }
.e-google svg { width: 1.25rem; height: 1.25rem; }
.e-google__stars { color: var(--e-google); letter-spacing: .1em; font-size: .8rem; }
.e-google__stars::before { content: "★★★★★"; }

.e-quotes__rail {
  display: flex;
  gap: var(--gutter);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  outline-offset: 8px;
}
.e-quotes__rail::-webkit-scrollbar { display: none; }
.e-quote { flex: 0 0 100%; scroll-snap-align: start; }
.e-quote__text {
  font-size: var(--t-quote);
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: normal;
  max-width: 26em;
  text-wrap: pretty;
}
.e-quote__who { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .25rem .75rem; align-items: baseline; font-size: var(--t-small); }
.e-quote__who strong { font-size: 1.1875rem; font-weight: 700; line-height: 1.3; }   /* Bold 19px, the live author */
.e-quote__who span { color: var(--fg); }

.e-quotes__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: var(--space-block);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.e-quotes__ctrl { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.e-quotes__nav { display: flex; gap: .5rem; }
.e-quotes__count { font-size: var(--t-small); color: var(--fg-muted); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.e-segments { display: flex; gap: .375rem; }
.e-segments button { position: relative; width: 2.25rem; height: 1.5rem; }
.e-segments button::before {
  content: "";
  position: absolute;
  inset: auto 0 .7rem;
  height: 1px;
  background: var(--line-strong);
  transition: background var(--dur-fast), height var(--dur-fast);
}
.e-segments button[aria-selected="true"]::before { background: var(--fg); height: 2px; }

/* 09 News ------------------------------------------------------------------ */

.e-news__grid { display: grid; gap: var(--space-block) var(--gutter); }
.e-card { display: grid; gap: 1rem; align-content: start; }
.e-card .e-media { aspect-ratio: 3 / 2; }
.e-card__body { display: grid; gap: .6rem; justify-items: start; }
.e-card__title { font-size: var(--t-h4); font-weight: 400; line-height: 1.3; }
@media (min-width: 48rem) {
  .e-news__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* 10 Enquiry --------------------------------------------------------------- */

.e-enquiry__intro { display: grid; gap: 1.5rem; justify-items: start; align-content: center; }   /* centred on the form */
.e-enquiry__intro .e-h2 { max-width: 10em; }
.e-form { display: grid; gap: 2.5rem; }
.e-form__group { display: grid; gap: 1.25rem; }
.e-form__legend { font-size: var(--t-h3); font-weight: 300; letter-spacing: normal; line-height: 1.3; margin-bottom: 1.25rem; }
.e-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.e-chip { position: relative; }
.e-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.e-chip span {
  display: inline-flex;
  align-items: center;
  padding: .8em 1.25em;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  font-size: .9375rem;   /* 15px Light, as the live buttons */
  font-weight: 300;
  letter-spacing: 0;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
}
.e-chip span:hover { border-color: var(--fg); }
.e-chip input:checked + span { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.e-chip input:focus-visible + span { outline: 2px solid currentColor; outline-offset: 3px; }

.e-fields { display: grid; gap: 1.75rem 1.5rem; }
.e-field { display: grid; gap: .35rem; align-content: start; }
.e-field > label {
  font-size: var(--t-small);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg);
}
.e-field input, .e-field textarea {
  width: 100%;
  padding: .75em 0;
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.e-field input::placeholder, .e-field textarea::placeholder { color: var(--fg-muted); opacity: .7; }
.e-field input:focus-visible, .e-field textarea:focus-visible {
  outline: none;
  border-bottom-color: var(--fg);
  box-shadow: 0 1px 0 var(--fg);
}
.e-field textarea { min-height: 5.5rem; }
.e-field--full { grid-column: 1 / -1; }
.e-phone { display: grid; grid-template-columns: auto 1fr; gap: .75rem; align-items: end; }
.e-phone__prefix {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75em 0;
  border-bottom: 1px solid var(--line-strong);
  color: var(--fg-muted);
  white-space: nowrap;
}
.e-phone__prefix svg { width: 1.25rem; height: auto; }
@media (min-width: 48rem) {
  .e-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.e-form__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.e-form__foot p { font-size: var(--t-lede); }
.e-form__ok { padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: var(--t-lede); }
.e-form[data-sent="true"] .e-form__foot { display: none; }
.e-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (min-width: 62rem) {
}

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

/* the one coloured band on the site: the live footer's greige, ink text */
.e-footer { position: relative; overflow: hidden; --bg: var(--e-greige); background: var(--bg); color: var(--fg); }
.e-footer__top { border-top: 1px solid var(--line); padding-top: var(--space-section); }
.e-footer__grid { display: grid; gap: var(--space-block) var(--gutter); }
.e-footer__col { display: grid; gap: 1rem; align-content: start; }
/* column and social headings: Bold 15px, title case, ink (live) */
.e-footer__title { font-size: .9375rem; font-weight: 700; line-height: 1.3; color: var(--fg); }
/* links 14px Light on a 23px pitch, contact lines 26px, as on live */
.e-footer__col ul { display: grid; gap: 0; font-size: var(--t-small); line-height: 1.643; }
.e-footer__col address { font-style: normal; font-size: var(--t-small); line-height: 1.857; }
.e-footer__col a:hover { text-decoration: underline; text-underline-offset: .2em; }

.e-subscribe {
  display: flex;
  align-items: center;
  gap: .5rem;
  max-width: 22rem;
  border-bottom: 1px solid var(--line-strong);
  transition: border-color var(--dur-fast);
}
.e-subscribe:focus-within { border-bottom-color: var(--fg); }
.e-subscribe input { flex: 1 1 auto; min-width: 0; padding: .75em 0; background: transparent; font-size: var(--t-small); }
.e-subscribe input::placeholder { color: var(--e-muted); }   /* #b2b2b2, the live placeholder */
.e-subscribe input:focus-visible { outline: none; }
.e-subscribe .e-icon-btn { width: 2.25rem; height: 2.25rem; flex: 0 0 auto; }
.e-subscribe .e-icon-btn svg { width: .85rem; height: .85rem; }
.e-footer__note { font-size: .75rem; line-height: 1.667; color: var(--fg); max-width: 22rem; }

.e-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  margin-top: var(--space-block);
  padding-block: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: var(--t-small);
  line-height: 1.857;
  color: var(--fg);
}
/* "Follow us" and four solid black glyphs, no visible labels (live). The
   24-unit icon box draws each glyph about 18px across. */
.e-footer__follow { display: grid; gap: .75rem; }
.e-social { display: flex; flex-wrap: wrap; align-items: center; gap: .9375rem; }
.e-social a { display: inline-flex; align-items: center; color: var(--e-ink); transition: opacity var(--dur-fast); }
.e-social svg { width: 1.5rem; height: 1.5rem; }
.e-social a:hover { opacity: .6; }

@media (min-width: 48rem) { .e-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 62rem) { .e-footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1.3fr; } }

/* 12 Utilities ------------------------------------------------------------- */

.e-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.e-skip {
  position: fixed;
  top: .5rem; left: .5rem;
  z-index: 100;
  padding: .75rem 1rem;
  background: var(--e-ink);
  color: var(--e-greige);
  transform: translateY(-200%);
  transition: transform var(--dur-fast);
}
.e-skip:focus { transform: none; }

.e-to-top {
  position: fixed;
  right: var(--edge);
  bottom: 1.5rem;
  z-index: 30;
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--e-stone);
  border-radius: 50%;
  background: var(--e-greige);
  color: var(--e-ink);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--dur-fast), transform var(--dur-fast), visibility var(--dur-fast);
}
.e-to-top[data-visible="true"] { opacity: 1; visibility: visible; transform: none; }
.e-to-top svg { width: .9rem; height: .9rem; }
