/* =============================================================================
   Véla Living & Design — shared design system
   Extracted from the handoff prototypes (Design With Us + Options 1–3).
   One stylesheet, no framework. Mobile-first with cinematic desktop treatments.
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  /* palette */
  --ink: #2b231d; /* warm espresso ground */
  --ink-90: rgba(35, 27, 21, 0.9);
  --ink-85: rgba(35, 27, 21, 0.85);
  --ink-50: rgba(35, 27, 21, 0.5);
  --ink-38: rgba(35, 27, 21, 0.38);
  --paper: #efe7d8; /* warm plaster text */
  --paper-bright: #fff6df; /* hero lockup */
  --paper-25: rgba(239, 231, 216, 0.25);
  --paper-22: rgba(239, 231, 216, 0.22);
  --plaster: #e9e1d4; /* light ground for text pages */
  --gold: #d8a26c; /* aged-brass accent */
  --gold-deep: #a9793f;
  --gold-hover: #c97c4e;
  --olive: #6e6f52;
  --olive-hover: #b9ba8d;
  --greige: #6e6357;

  /* type */
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: Karla, system-ui, -apple-system, sans-serif;
  --logo: Poppins, system-ui, sans-serif;
  --tagline: 'IM Fell English', serif;
  --amp: 'Libre Baskerville', serif;

  /* motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --fade: 1.6s ease; /* slideshow crossfade */
  --panel: 0.75s var(--ease); /* panel expand */

  /* layout */
  --wrap: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
}

/* ---------- reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: var(--paper);
  text-decoration: none;
}
a:hover {
  color: var(--gold-hover);
}
h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.1;
  margin: 0;
}
p {
  margin: 0 0 1em;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--paper);
  color: var(--ink);
  padding: 10px 16px;
  font-size: 12px;
  letter-spacing: 0.14em;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- brand lockup ---------- */
.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  line-height: 1;
}
.brand__name {
  font-family: var(--logo);
  font-weight: 600;
  color: var(--paper);
  letter-spacing: 0.12em;
  margin-right: -0.12em;
}
.brand__tag {
  font-family: var(--tagline);
  font-style: italic;
  opacity: 0.9;
  letter-spacing: 0.3em;
  margin-right: -0.3em;
  margin-top: 5px;
  display: inline-flex;
  align-items: baseline;
  gap: 0.3em;
}
.brand__amp {
  font-family: var(--amp);
  font-style: normal;
  letter-spacing: 0;
}
/* header scale */
.masthead .brand__name {
  font-size: 26px;
}
.masthead .brand__tag {
  font-size: 11px;
}
/* hero scale */
.brand--hero .brand__name {
  font-size: clamp(3.4rem, 9.5vw, 10.5rem);
  color: var(--paper-bright);
  letter-spacing: clamp(0.08em, 0.75vw, 0.15em);
  line-height: 0.9;
  text-shadow: 0 0 0.8px rgba(255, 246, 223, 0.9);
}
.brand--hero .brand__tag {
  font-size: clamp(18px, 2.2vw, 30px);
  color: var(--paper-bright);
  letter-spacing: 0.28em;
  margin-right: -0.28em;
}

/* ---------- header / nav ---------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 18px var(--gutter);
  background: color-mix(in srgb, var(--ink) 86%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.masthead--transparent {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.masthead__nav {
  display: flex;
  gap: clamp(14px, 2vw, 34px);
  justify-self: center;
  grid-column: 2;
}
.masthead__link {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.85;
  white-space: nowrap;
}
.masthead__link[aria-current='page'] {
  opacity: 1;
  color: var(--gold);
}
.masthead__brand {
  grid-column: 2;
  justify-self: center;
}
.masthead__cta {
  justify-self: end;
  grid-column: 3;
  font-size: 11px;
  letter-spacing: 0.2em;
  opacity: 0.85;
  white-space: nowrap;
}
.masthead__back {
  justify-self: start;
  grid-column: 1;
  font-size: 11px;
  letter-spacing: 0.24em;
  opacity: 0.85;
}
.masthead__cta--mobile {
  display: none;
} /* only surfaces inside the mobile nav drawer */
.nav-toggle {
  display: none;
}

/* when nav sits as the middle column, brand moves left */
.masthead--full {
  grid-template-columns: auto 1fr auto;
}
.masthead--full .masthead__brand {
  grid-column: 1;
  justify-self: start;
}
.masthead--full .masthead__nav {
  grid-column: 2;
  justify-self: center;
}
.masthead--full .masthead__cta {
  grid-column: 3;
}

@media (max-width: 860px) {
  .masthead {
    grid-template-columns: auto 1fr auto;
  }
  .masthead__brand {
    grid-column: 1;
    justify-self: start;
  }
  .nav-toggle {
    display: inline-flex;
    grid-column: 3;
    justify-self: end;
    background: none;
    border: 1px solid var(--paper-25);
    border-radius: 2px;
    padding: 8px 12px;
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
  }
  .masthead__cta {
    display: none;
  }
  .masthead__nav {
    position: fixed;
    inset: 64px 0 auto 0;
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    background: var(--ink-90);
    padding: 28px 0 34px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition:
      opacity 0.3s var(--ease),
      transform 0.3s var(--ease);
  }
  .masthead__nav[data-open] {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .masthead__nav .masthead__link {
    font-size: 13px;
  }
  .masthead__nav .masthead__cta--mobile {
    display: inline;
  }
}

/* ---------- layout primitives ---------- */
.section {
  padding: clamp(56px, 9vw, 128px) var(--gutter);
}
.section--tight {
  padding: clamp(40px, 6vw, 80px) var(--gutter);
}
.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
}
.wrap--narrow {
  max-width: 780px;
  margin-inline: auto;
}
.eyebrow {
  font-size: 10.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
}
.lead {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  line-height: 1.3;
}
.muted {
  opacity: 0.82;
}

/* light (plaster) sections for long-form reading */
.section--light {
  background: var(--plaster);
  color: var(--ink);
}
.section--light a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 3px;
}
.section--light a:hover {
  color: var(--gold-deep);
}
.section--light .eyebrow {
  color: var(--gold-deep);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 14px 26px;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: 1px solid var(--paper);
  background: transparent;
  color: var(--paper);
  transition:
    background 0.35s var(--ease),
    color 0.35s var(--ease),
    border-color 0.35s var(--ease);
}
.btn:hover {
  background: var(--paper);
  color: var(--ink);
}
.btn--gold {
  border-color: var(--gold-hover);
  background: rgba(201, 124, 78, 0.18);
  color: var(--paper);
}
.btn--gold:hover {
  background: var(--gold-hover);
  color: var(--ink);
}
.btn--onlight {
  border-color: var(--ink);
  color: var(--ink);
}
.btn--onlight:hover {
  background: var(--ink);
  color: var(--paper);
}

/* ---------- footer ---------- */
.footer {
  background: var(--ink);
  border-top: 1px solid var(--paper-22);
  padding: clamp(48px, 7vw, 88px) var(--gutter) 40px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  max-width: var(--wrap);
  margin-inline: auto;
}
.footer__col h2 {
  font-size: 20px;
  margin-bottom: 12px;
  font-weight: 500;
}
.footer__links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  letter-spacing: 0.04em;
}
.footer__meta {
  max-width: var(--wrap);
  margin: 40px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--paper-22);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: 0.14em;
  opacity: 0.7;
}
@media (min-width: 720px) {
  .footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

/* ---------- hero slideshow ---------- */
.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
}
.hero__stage {
  position: absolute;
  inset: 0;
}
.hero__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity var(--fade);
}
.hero__slide[data-active] {
  opacity: 1;
}
.hero__scrim {
  position: absolute;
  inset: 0;
  background: var(--ink-38);
}
.hero__center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 24px;
  padding: 0 24px;
  pointer-events: none;
}
.hero__tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(16px, 1.6vw, 22px);
  color: var(--paper-bright);
  opacity: 0.92;
}
.hero__place {
  font-size: 11px;
  letter-spacing: 0.5em;
  margin-right: -0.5em;
  color: var(--paper-bright);
  display: inline-flex;
  align-items: center;
  gap: 1.2em;
  opacity: 0.9;
}
.hero__place span.rule {
  width: 30px;
  height: 1px;
  background: var(--paper-bright);
}
.hero__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  font-size: 24px;
  padding: 14px;
  opacity: 0.78;
  z-index: 20;
  color: var(--paper);
}
.hero__arrow:hover {
  opacity: 1;
}
.hero__arrow--prev {
  left: 18px;
}
.hero__arrow--next {
  right: 18px;
}
.hero__label {
  position: absolute;
  left: 64px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(16px, 1.6vw, 24px);
  z-index: 15;
}
.hero__counter {
  position: absolute;
  right: 70px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 0.1em;
  z-index: 15;
}
.hero__pause {
  position: absolute;
  right: 20px;
  bottom: 22px;
  background: none;
  border: 0;
  color: var(--paper);
  font-size: 12px;
  letter-spacing: 0.1em;
  padding: 8px;
  opacity: 0.75;
  z-index: 20;
}
.hero__pause:hover {
  opacity: 1;
}
.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: 0.4em;
  margin-right: -0.4em;
  opacity: 0.8;
  z-index: 15;
}
@media (max-width: 720px) {
  .hero__label {
    left: 20px;
    font-size: 15px;
  }
  .hero__counter {
    right: 20px;
  }
}

/* ---------- 4-panel hub (Design With Us) ---------- */
.panels {
  display: flex;
  gap: 2px;
  min-height: 0;
}
.panels--fill {
  height: calc(100svh - 220px);
}
.panel {
  position: relative;
  overflow: hidden;
  min-width: 0;
  flex: 1 1 0%;
  transition: flex var(--panel);
}
.panels[data-open] .panel {
  flex: 0.55 1 0%;
}
.panels[data-open] .panel[data-expanded] {
  flex: 3.2 1 0%;
}
.panel__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.panel__scrim {
  position: absolute;
  inset: 0;
  background: var(--ink-50);
}
.panel__label {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  background: transparent;
  border: 0;
  color: var(--paper);
}
.panel[data-expanded] .panel__label {
  display: none;
}
.panel__num {
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--gold);
}
.panel__title {
  font-family: var(--serif);
  font-size: clamp(20px, 2.2vw, 32px);
  white-space: nowrap;
}
.panel__kicker {
  font-size: 10.5px;
  letter-spacing: 0.2em;
  opacity: 0.8;
  white-space: nowrap;
}
.detail {
  position: absolute;
  inset: 0;
  background: var(--ink-85);
  overflow: auto;
  display: none;
  justify-content: center;
}
.panel[data-expanded] .detail {
  display: flex;
}
.detail__inner {
  width: min(620px, 88%);
  padding: 36px 0 44px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.detail__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.detail__eyebrow {
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.detail__h {
  font-family: var(--serif);
  font-size: 32px;
}
.detail__close {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  background: none;
  border: 0;
  color: var(--paper);
  padding: 0;
}
.detail__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
}
.detail__meta {
  font-size: 10px;
  letter-spacing: 0.22em;
  opacity: 0.7;
  white-space: nowrap;
}
.detail__cta {
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: var(--gold);
  width: fit-content;
}

@media (max-width: 760px) {
  .panels,
  .panels--fill {
    flex-direction: column;
    height: auto;
  }
  .panel {
    flex: 0 0 auto;
    min-height: 26svh;
    transition: min-height 0.6s var(--ease);
  }
  .panels[data-open] .panel {
    flex: 0 0 auto;
    min-height: 12svh;
  }
  .panels[data-open] .panel[data-expanded] {
    flex: 0 0 auto;
    min-height: auto;
  }
  .detail {
    position: relative;
  }
  .panel[data-expanded] .detail {
    min-height: 60svh;
  }
  .detail__row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .detail__meta,
  .panel__kicker {
    white-space: normal;
  }
}

/* ---------- editorial / galleries / quotes ---------- */
.split {
  display: grid;
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
}
@media (min-width: 820px) {
  .split {
    grid-template-columns: 1fr 1fr;
  }
  .split--wide-img {
    grid-template-columns: 1.2fr 1fr;
  }
}
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
@media (min-width: 720px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}
.gallery__item {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--ink-50);
}
.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease);
}
.gallery__item:hover img {
  transform: scale(1.04);
}
.quote {
  border-left: 2px solid var(--gold);
  padding-left: clamp(18px, 3vw, 32px);
}
.quote p {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  font-style: italic;
  line-height: 1.4;
}
.quote cite {
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.7;
}

/* service + FAQ lists */
.rows {
  display: flex;
  flex-direction: column;
}
.row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  padding: 16px 0;
  border-top: 1px solid var(--paper-22);
}
.row:last-child {
  border-bottom: 1px solid var(--paper-22);
}
.row__name {
  font-family: var(--serif);
  font-size: clamp(19px, 2vw, 24px);
}
.row__tag {
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.6;
  white-space: nowrap;
}
.faq {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.faq details {
  border-top: 1px solid var(--paper-22);
  padding: 14px 0;
}
.faq details:last-child {
  border-bottom: 1px solid var(--paper-22);
}
.faq summary {
  font-family: var(--serif);
  font-size: clamp(18px, 2vw, 23px);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq p {
  margin-top: 10px;
  opacity: 0.85;
}

/* ---------- forms ---------- */
.form {
  display: grid;
  gap: 18px;
}
@media (min-width: 620px) {
  .form__two {
    grid-template-columns: 1fr 1fr;
    display: grid;
    gap: 18px;
  }
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.field label {
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.8;
}
.field input,
.field select,
.field textarea {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--paper-25);
  color: var(--paper);
  font: inherit;
  padding: 10px 2px;
}
.section--light .field input,
.section--light .field select,
.section--light .field textarea {
  color: var(--ink);
  border-color: rgba(43, 35, 29, 0.25);
}
.field textarea {
  min-height: 120px;
  resize: vertical;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
}
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form__status {
  font-size: 13px;
  letter-spacing: 0.04em;
  min-height: 1.2em;
}
.form__status[data-state='error'] {
  color: var(--gold-hover);
}

/* ---------- motion / a11y ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .hero__slide {
    transition: none;
  }
}
