/* =========================================================
   Essencera EQ — coming soon
   ========================================================= */

/* ---------- Fonts (self-hosted, SIL Open Font License) ---------- */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-latin-400-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Josefin Sans';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/josefin-sans-latin-300-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/montserrat-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/montserrat-latin-600-normal.woff2') format('woff2');
}

/* ---------- Tokens ---------- */
:root {
  --ink:        #574940;
  --ink-soft:   #6d5f55;
  --paper:      #f3f2f0;

  --serif: 'Cormorant Garamond', 'Times New Roman', Times, serif;
  --sans:  'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  --thin:  'Josefin Sans', 'Montserrat', Arial, sans-serif;

  /* Proportional unit: the original artwork is 4:3, so sizes stay in
     the same relation to each other on any viewport shape. */
  --stage: min(100vw, 133.33vh);

  /* Vertical rhythm is additionally capped by viewport height, so the
     whole lockup fits on short laptop screens without scrolling. */
  --v: min(100vw, 108vh);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, p, figure { margin: 0; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding:
    calc(clamp(24px, calc(var(--v) * 0.042), 110px) + env(safe-area-inset-top)) 20px
    calc(clamp(24px, calc(var(--v) * 0.042), 110px) + env(safe-area-inset-bottom));
  overflow: hidden;
  isolation: isolate;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% center;
}

/* Keeps type legible when the photo is cropped tight on small screens.
   The artwork already carries a soft veil, so this stays very light. */
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 90% at 42% 48%,
      rgba(255, 255, 255, 0.42) 0%,
      rgba(255, 255, 255, 0.18) 45%,
      rgba(255, 255, 255, 0) 78%);
}

/* ---------- Content column ---------- */
.stage {
  width: 100%;
  max-width: calc(var(--stage) * 0.86);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Eyebrow */
.eyebrow {
  font-size: clamp(0.56rem, calc(var(--stage) * 0.0112), 0.95rem);
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-soft);
  line-height: 1.6;
  text-indent: 0.3em;
}
.eyebrow .dot { margin: 0 0.15em; }

/* Emblem */
.mark {
  display: block;
  width: auto;
  height: clamp(52px, calc(var(--stage) * 0.098), 132px);
  margin-top: clamp(24px, calc(var(--v) * 0.072), 190px);
  color: var(--ink);
}

/* Wordmark lockup */
.lockup {
  margin-top: clamp(16px, calc(var(--v) * 0.044), 118px);
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lockup__name,
.lockup__eq {
  text-transform: uppercase;
  font-size: clamp(2.05rem, calc(var(--stage) * 0.058), 6.6rem);
  letter-spacing: 0.055em;
  text-indent: 0.055em;
  display: block;
}
/* Equal side tracks, so EQ sits on the exact centre line of the wordmark
   even though the two italic phrases are different widths. */
.lockup__row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: baseline;
  column-gap: clamp(14px, calc(var(--stage) * 0.028), 76px);
  margin-top: clamp(6px, calc(var(--v) * 0.014), 42px);
}
.lockup__row > .lockup__flank:first-child { justify-self: end; }
.lockup__row > .lockup__flank:last-child  { justify-self: start; }
.lockup__flank {
  font-style: italic;
  font-size: clamp(0.88rem, calc(var(--stage) * 0.0242), 2.15rem);
  letter-spacing: 0.01em;
  white-space: nowrap;
  color: var(--ink);
}

/* Motto */
.motto {
  margin-top: clamp(14px, calc(var(--v) * 0.026), 70px);
  font-weight: 600;
  font-size: clamp(0.7rem, calc(var(--stage) * 0.0168), 1.45rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1.6;
  text-indent: 0.2em;
}

/* Hairline */
.rule {
  width: clamp(170px, calc(var(--stage) * 0.297), 1070px);
  height: 0;
  margin: clamp(22px, calc(var(--v) * 0.05), 132px) 0 0;
  border: 0;
  border-top: 1px solid rgba(87, 73, 64, 0.38);
}

/* Coming soon */
.status {
  margin-top: clamp(20px, calc(var(--v) * 0.044), 118px);
  font-family: var(--thin);
  font-weight: 300;
  font-size: clamp(1.45rem, calc(var(--stage) * 0.0384), 4.1rem);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  line-height: 1.1;
  text-indent: 0.24em;
}

/* Contact */
.contact {
  margin-top: clamp(30px, calc(var(--v) * 0.078), 215px);
  line-height: 1.5;
}
.contact__label {
  font-size: clamp(0.55rem, calc(var(--stage) * 0.0106), 0.9rem);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-indent: 0.3em;
}
.contact__mail {
  margin-top: clamp(8px, calc(var(--v) * 0.0115), 28px);
  font-size: clamp(0.85rem, calc(var(--stage) * 0.0138), 1.2rem);
}
.contact__mail a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.35em;
  text-decoration-thickness: 1px;
  transition: opacity 0.25s ease;
}
.contact__mail a:hover,
.contact__mail a:focus-visible { opacity: 0.6; }
.contact__domain {
  margin-top: clamp(9px, calc(var(--v) * 0.0125), 32px);
  font-size: clamp(0.56rem, calc(var(--stage) * 0.0106), 0.9rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-indent: 0.22em;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

/* ---------- Entrance ---------- */
@media (prefers-reduced-motion: no-preference) {
  .stage > *, .contact > * {
    animation: rise 1.1s cubic-bezier(0.22, 0.61, 0.36, 1) both;
  }
  .eyebrow  { animation-delay: 0.05s; }
  .mark     { animation-delay: 0.18s; }
  .lockup   { animation-delay: 0.3s; }
  .motto    { animation-delay: 0.42s; }
  .rule     { animation-delay: 0.52s; }
  .status   { animation-delay: 0.62s; }
  .contact  { animation-delay: 0.74s; animation-name: fade; }
  .contact > * { animation: none; }

  @keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
  }
  @keyframes fade {
    from { opacity: 0; }
    to   { opacity: 1; }
  }
}

/* ---------- Phones ---------- */
@media (max-width: 760px) {
  :root { --stage: min(170vw, 115vh); --v: min(120vw, 100vh); }

  .hero__media img { object-position: 58% center; }

  /* A soft halo behind the type rather than a flat wash, so the photo
     still reads at the top and bottom of the frame. */
  .hero__scrim {
    background:
      radial-gradient(132% 47% at 50% 50%,
        rgba(255, 255, 255, 0.9) 0%,
        rgba(255, 255, 255, 0.82) 40%,
        rgba(255, 255, 255, 0.46) 70%,
        rgba(255, 255, 255, 0.1) 89%,
        rgba(255, 255, 255, 0) 100%);
  }

  .stage { max-width: 100%; }

  .eyebrow { letter-spacing: 0.22em; text-indent: 0.22em; }
  .mark { height: clamp(62px, 17vw, 104px); }
  .contact__label { letter-spacing: 0.24em; text-indent: 0.24em; }

  /* The two italic lines sit under EQ instead of flanking it */
  .lockup__row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(4px, 1.2vw, 10px);
  }
  .lockup__eq { order: -1; margin-bottom: 0.12em; }
  .lockup__flank { font-size: clamp(0.92rem, 4.2vw, 1.3rem); }

  .rule { width: min(62vw, 300px); }
}

/* Portrait tablets: same crop as phones, with a slightly firmer veil */
@media (orientation: portrait) and (min-width: 761px) and (max-width: 1024px) {
  .hero__media img { object-position: 56% center; }
  .hero__scrim {
    background:
      radial-gradient(138% 52% at 50% 50%,
        rgba(255, 255, 255, 0.94) 0%,
        rgba(255, 255, 255, 0.88) 46%,
        rgba(255, 255, 255, 0.54) 74%,
        rgba(255, 255, 255, 0.14) 91%,
        rgba(255, 255, 255, 0) 100%);
  }
}

/* Short landscape viewports (phones turned sideways) */
@media (max-height: 560px) and (orientation: landscape) {
  .hero { padding: 24px 20px; }
  :root { --stage: min(100vw, 150vh); --v: min(100vw, 118vh); }
}

/* ---------- Print ---------- */
@media print {
  .hero { min-height: auto; }
  .hero__media, .hero__scrim { display: none; }
  .stage > *, .contact > * { animation: none !important; }
  body { background: #fff; }
}
