/* ==========================================================================
   VERA ESTATES — base: tokens, fonts, reset, type, utilities
   ========================================================================== */

@font-face {
  font-family: "Cormorant Garamond";
  src: url("../assets/fonts/cormorant-latin.woff2") format("woff2");
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant Garamond";
  src: url("../assets/fonts/cormorant-italic-latin.woff2") format("woff2");
  font-weight: 300 600;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Jost";
  src: url("../assets/fonts/jost-latin.woff2") format("woff2");
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Colour: warm ivory, soft stone, charcoal, a whisper of bronze */
  --ivory: #f5f0e6;
  --paper: #ece5d7;
  --stone: #ddd4c2;
  --stone-dk: #b9ae98;
  --char: #1d1c1a;
  --char-2: #2a2825;
  --ink-2: #55514a;
  --mute: #7a746a;
  --bronze: #86663f;
  --bronze-lt: #c7a676;
  --line: rgba(29, 28, 26, 0.16);
  --line-strong: rgba(29, 28, 26, 0.36);
  --line-inv: rgba(245, 240, 230, 0.26);

  --font-serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --font-sans: "Jost", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(20px, 4.6vw, 80px);
  --maxw: 1480px;
  --section-y: clamp(88px, 12vw, 200px);
  --header-h: 84px;

  --ease: cubic-bezier(0.22, 0.72, 0.12, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  background: var(--ivory);
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--char);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

/* Page enter: a single soft fade so navigation feels composed */
.js body {
  animation: page-in 0.9s var(--ease) both;
}

@keyframes page-in {
  from {
    opacity: 0;
  }
}

img,
picture,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd,
ul,
ol {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

address {
  font-style: normal;
}

::selection {
  background: var(--char);
  color: var(--ivory);
}

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

.on-dark :focus-visible,
.hero :focus-visible,
.site-header:not(.is-scrolled) :focus-visible {
  outline-color: var(--bronze-lt);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 500;
  padding: 0.85em 1.3em;
  background: var(--char);
  color: var(--ivory);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transform: translateY(-200%);
  transition: transform 0.25s var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

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

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: calc(var(--maxw) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  padding-block: var(--section-y);
}

.on-dark {
  background: var(--char);
  color: var(--ivory);
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */

.display {
  font-family: var(--font-serif);
  font-weight: 300;
  text-transform: uppercase;
  line-height: 0.96;
  letter-spacing: 0;
  text-wrap: balance;
}

.h2 {
  font-size: clamp(2.6rem, 6.6vw, 6.2rem);
}

.display em,
.it {
  font-style: italic;
  font-weight: 300;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 1em;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--bronze);
  line-height: 1;
}

.eyebrow::before {
  content: "";
  width: 32px;
  height: 1px;
  background: currentColor;
}

.on-dark .eyebrow {
  color: var(--bronze-lt);
}

.lede {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 1.9vw, 1.75rem);
  line-height: 1.4;
  font-weight: 400;
  color: var(--char);
  max-width: 28em;
}

.on-dark .lede {
  color: var(--ivory);
}

.body-text {
  color: var(--ink-2);
  max-width: 34em;
}

.on-dark .body-text {
  color: rgba(245, 240, 230, 0.78);
}

/* --------------------------------------------------------------------------
   Reveals (only when JS is running)
   -------------------------------------------------------------------------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* Photography: a slow, level curtain that lifts to reveal the frame */
.js [data-reveal="img"] {
  opacity: 1;
  transform: none;
  clip-path: inset(0 0 calc(100% - 2px) 0); /* 2px sliver keeps IntersectionObserver aware of the element */
  transition: clip-path 1.5s var(--ease);
  transition-delay: var(--d, 0ms);
}

.js [data-reveal="img"] img {
  transform: scale(1.1);
  transition: transform 2.2s var(--ease);
  transition-delay: var(--d, 0ms);
}

.js [data-reveal="img"].is-in {
  clip-path: inset(0 0 0 0);
}

.js [data-reveal="img"].is-in img {
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js body {
    animation: none;
  }

  .js [data-reveal],
  .js [data-reveal="img"],
  .js [data-reveal="img"] img {
    opacity: 1;
    transform: none;
    clip-path: none;
    transition: none;
  }
}
