/* ============================================================
   maerak — stylesheet
   Palette: linen / parchment / chalk / olive / moss / ink
   ============================================================ */

:root {
  --linen:      #EFE9DE;
  --parchment:  #E3DACB;
  --chalk:      #FAF7F1;
  --olive:      #4F5740;
  --moss:       #7C8560;
  --ink:        #26251F;

  --rule:       rgba(79, 87, 64, 0.22);
  --rule-soft:  rgba(79, 87, 64, 0.12);

  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --body:    "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;

  --gut: clamp(1.25rem, 5vw, 5.5rem);
  --stack: clamp(5rem, 12vw, 11rem);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

body {
  margin: 0;
  background: var(--linen);
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(1rem, 0.96rem + 0.22vw, 1.09rem);
  line-height: 1.65;
  font-weight: 350;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; }

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

::selection { background: var(--moss); color: var(--chalk); }

/* ---------- shared type ---------- */

.eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--moss);
  margin: 0 0 1.4rem;
}

.display {
  font-family: var(--display);
  font-weight: 300;
  font-variation-settings: "SOFT" 30, "WONK" 1, "opsz" 100;
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0;
}

.h2 { font-size: clamp(2rem, 1.3rem + 3.2vw, 3.9rem); }

.lede {
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.3rem);
  line-height: 1.6;
  max-width: 46ch;
}

.wrap {
  width: 100%;
  max-width: 1400px;
  margin-inline: auto;
  padding-inline: var(--gut);
}

.section { padding-block: var(--stack); }

/* ---------- top bar ---------- */

.bar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem var(--gut);
  mix-blend-mode: normal;
  transition: background 0.4s var(--ease), color 0.4s var(--ease),
              border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}

.bar.is-lifted {
  background: rgba(239, 233, 222, 0.86);
  backdrop-filter: blur(9px);
  border-bottom-color: var(--rule-soft);
}

.bar__mark {
  font-family: var(--display);
  font-weight: 300;
  font-size: 1.15rem;
  letter-spacing: 0.32em;
  text-transform: lowercase;
  text-decoration: none;
  color: var(--chalk);
  transition: color 0.4s var(--ease);
}

.bar.is-lifted .bar__mark { color: var(--ink); }

.bar__links {
  display: flex;
  gap: clamp(1rem, 2.5vw, 2.2rem);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--chalk);
  transition: color 0.4s var(--ease);
}

.bar.is-lifted .bar__links { color: var(--ink); }

.bar__links a {
  text-decoration: none;
  padding-block: 0.25rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease);
}

.bar__links a:hover { border-bottom-color: currentColor; }

@media (max-width: 620px) {
  .bar__links a:not(.bar__cta) { display: none; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
  background: var(--parchment);
}

.hero__media {
  position: absolute;
  inset: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(38, 37, 31, 0.42) 0%, rgba(38, 37, 31, 0) 34%),
    linear-gradient(0deg, rgba(38, 37, 31, 0.58) 0%, rgba(38, 37, 31, 0) 52%);
}

.hero__inner {
  position: relative;
  z-index: 2;
  grid-row: 2;
  padding: 0 var(--gut) clamp(2rem, 5vw, 3.5rem);
  color: var(--chalk);
}

.hero__wordmark {
  font-family: var(--display);
  font-weight: 200;
  font-variation-settings: "SOFT" 40, "WONK" 1, "opsz" 144;
  font-size: clamp(3.6rem, 15.5vw, 15rem);
  line-height: 0.86;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  margin: 0;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  margin-top: clamp(1rem, 2.5vw, 1.6rem);
  padding-top: 1.1rem;
  border-top: 1px solid rgba(250, 247, 241, 0.32);
}

.hero__line {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.05rem, 0.9rem + 0.7vw, 1.6rem);
  line-height: 1.3;
  margin: 0;
  max-width: 24ch;
}

.hero__tag {
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  opacity: 0.82;
  margin: 0;
}

.hero__cue {
  position: absolute;
  top: clamp(6rem, 14vh, 9rem);
  right: var(--gut);
  z-index: 2;
  color: var(--chalk);
  font-size: 0.63rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  opacity: 0.8;
}

.hero__cue::after {
  content: "";
  display: block;
  width: 1px;
  height: 3.2rem;
  margin: 0.8rem auto 0;
  background: currentColor;
  transform-origin: top;
  animation: drop 2.6s var(--ease) infinite;
}

@keyframes drop {
  0%   { transform: scaleY(0); opacity: 0; }
  40%  { transform: scaleY(1); opacity: 0.9; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* ---------- statement ---------- */

.statement { background: var(--linen); }

.statement__grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 5fr);
  gap: clamp(1.5rem, 5vw, 5rem);
  align-items: start;
}

@media (max-width: 780px) {
  .statement__grid { grid-template-columns: 1fr; }
}

.statement__body {
  font-size: clamp(1.15rem, 1rem + 0.75vw, 1.65rem);
  line-height: 1.5;
  font-weight: 300;
  margin: 1.6rem 0 0;
  max-width: 40ch;
  color: var(--ink);
}

/* ---------- gallery plate ---------- */

.plate { background: var(--parchment); }

.plate__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(0.75rem, 2.2vw, 1.75rem);
}

.frame {
  position: relative;
  margin: 0;
  grid-column: span 3;
  border: 0;
  padding: 0;
  background: var(--linen);
  cursor: zoom-in;
  overflow: hidden;
  font: inherit;
  color: inherit;
  text-align: left;
  width: 100%;
  display: block;
}

.frame--wide { grid-column: span 4; }
.frame--tall { grid-column: span 2; }
.frame--std  { grid-column: span 3; }

.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  transition: transform 0.9s var(--ease), filter 0.6s var(--ease);
}

.frame--tall img { aspect-ratio: 3 / 4; }
.frame--wide img { aspect-ratio: 16 / 10; }

.frame:hover img,
.frame:focus-visible img { transform: scale(1.032); }

.frame figcaption {
  position: absolute;
  left: 0.9rem;
  bottom: 0.85rem;
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--chalk);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  text-shadow: 0 1px 12px rgba(38, 37, 31, 0.6);
  pointer-events: none;
}

.frame:hover figcaption,
.frame:focus-visible figcaption { opacity: 1; transform: none; }

@media (max-width: 760px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .frame, .frame--wide, .frame--std { grid-column: span 2; }
  .frame--tall { grid-column: span 1; }
}

/* ---------- stories index (signature) ---------- */

.index { background: var(--linen); position: relative; }

.index__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.index__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 1rem clamp(1rem, 4vw, 3rem);
  padding: clamp(1.1rem, 2.6vw, 2rem) 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
  transition: color 0.35s var(--ease), padding-inline-start 0.45s var(--ease);
}

.index__text {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem clamp(1rem, 4vw, 3rem);
}

.index__tail {
  display: flex;
  gap: clamp(0.9rem, 2vw, 1.8rem);
  flex-shrink: 0;
}

.index__row:hover,
.index__row:focus-visible {
  color: var(--olive);
  padding-inline-start: clamp(0.5rem, 1.6vw, 1.4rem);
}

.index__couple {
  font-family: var(--display);
  font-weight: 300;
  font-variation-settings: "SOFT" 30, "WONK" 1, "opsz" 72;
  font-size: clamp(1.5rem, 1rem + 2.4vw, 3rem);
  line-height: 1.05;
}

.index__place,
.index__year {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--moss);
  white-space: nowrap;
}

.index__thumb { display: none; }

/* cursor-following preview, pointer devices only */
.peek {
  position: fixed;
  top: 0;
  left: 0;
  width: clamp(180px, 17vw, 270px);
  aspect-ratio: 4 / 5;
  z-index: 30;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(-50%, -50%, 0) scale(0.94);
  transition: opacity 0.35s var(--ease), transform 0.45s var(--ease);
  overflow: hidden;
  background: var(--parchment);
}

.peek.is-on { opacity: 1; transform: translate3d(-50%, -50%, 0) scale(1); }

.peek img { width: 100%; height: 100%; object-fit: cover; }

@media (hover: none), (max-width: 780px) {
  .peek { display: none; }

  .index__row {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
  }

  .index__thumb {
    display: block;
    width: clamp(64px, 20vw, 96px);
    aspect-ratio: 4 / 5;
    object-fit: cover;
  }

  .index__text {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .index__tail { gap: 0.75rem; }
}

/* ---------- steps ---------- */

.steps { background: var(--olive); color: var(--chalk); }
.steps .eyebrow { color: rgba(250, 247, 241, 0.66); }

.steps__list {
  list-style: none;
  margin: clamp(2rem, 5vw, 3.5rem) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

@media (max-width: 880px) { .steps__list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .steps__list { grid-template-columns: 1fr; } }

.steps__item {
  padding-top: 1.1rem;
  border-top: 1px solid rgba(250, 247, 241, 0.28);
}

.steps__num {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  color: rgba(250, 247, 241, 0.6);
  margin-bottom: 1.6rem;
  font-variant-numeric: tabular-nums;
}

.steps__title {
  font-family: var(--display);
  font-weight: 300;
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
}

.steps__body {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(250, 247, 241, 0.82);
}

/* ---------- quote ---------- */

.words { background: var(--linen); text-align: center; }

.words__text {
  font-family: var(--display);
  font-weight: 300;
  font-variation-settings: "SOFT" 40, "WONK" 1, "opsz" 96;
  font-size: clamp(1.5rem, 1rem + 2.6vw, 3rem);
  line-height: 1.24;
  margin: 0 auto;
  max-width: 22ch;
  text-wrap: balance;
}

.words__by {
  margin-top: 2.2rem;
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--moss);
}

/* ---------- enquire ---------- */

.enquire { background: var(--parchment); }

.enquire__grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 5fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

@media (max-width: 860px) { .enquire__grid { grid-template-columns: 1fr; } }

.enquire__body { margin: 1.4rem 0 2.4rem; max-width: 34ch; }

.detail {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
  font-size: 0.9rem;
}

.detail a { text-decoration: none; border-bottom: 1px solid var(--rule); }
.detail a:hover { border-bottom-color: var(--olive); }

.form { display: grid; gap: 1.5rem; }

.field { display: grid; gap: 0.5rem; }

.field label {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--moss);
}

.field input,
.field textarea {
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  padding: 0.55rem 0;
  border-radius: 0;
  transition: border-color 0.3s var(--ease);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--olive);
}

.field textarea { resize: vertical; min-height: 6.5rem; }

.field--pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 520px) { .field--pair { grid-template-columns: 1fr; } }

.pot { position: absolute; left: -9999px; }

.btn {
  justify-self: start;
  font-family: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--chalk);
  background: var(--olive);
  border: 1px solid var(--olive);
  padding: 1rem 2.4rem;
  cursor: pointer;
  border-radius: 0;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

.btn:hover { background: transparent; color: var(--olive); }

/* ---------- footer ---------- */

.foot {
  background: var(--linen);
  border-top: 1px solid var(--rule);
  padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.foot__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: baseline;
  justify-content: space-between;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--moss);
}

.foot__mark {
  font-family: var(--display);
  font-weight: 300;
  font-size: 1.6rem;
  letter-spacing: 0.3em;
  text-transform: lowercase;
  color: var(--ink);
}

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(31, 30, 25, 0.94);
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s;
}

.lightbox.is-open { opacity: 1; visibility: visible; }

.lightbox img {
  max-width: 100%;
  max-height: 84svh;
  object-fit: contain;
}

.lightbox__bar {
  position: absolute;
  inset: auto 0 clamp(1rem, 3vw, 2rem) 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  color: var(--chalk);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.lightbox__btn {
  background: none;
  border: 1px solid rgba(250, 247, 241, 0.4);
  color: var(--chalk);
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  padding: 0.55rem 1.1rem;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

.lightbox__btn:hover { background: var(--chalk); color: var(--ink); }

.lightbox__close {
  position: absolute;
  top: clamp(1rem, 3vw, 2rem);
  right: clamp(1rem, 3vw, 2rem);
}

.lightbox__count { font-variant-numeric: tabular-nums; }

/* ---------- reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.reveal.is-in { opacity: 1; transform: none; }

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