/* ============================================================
   NOORÉ — Design System
   Elegance, Woven Quietly.
   ============================================================ */

/* ---------- 1. Tokens ---------- */
:root {
  /* Warm editorial palette */
  --espresso: #1E1712;
  --espresso-soft: #2A211A;
  --ink: #17120E;

  --ivory: #F7F2EA;
  --ivory-pure: #FCFAF6;
  --beige: #E8DCCA;
  --sand: #D8C6AE;
  --taupe: #A08D77;
  --taupe-deep: #6E5C48;

  --champagne: #C8A87C;
  --champagne-soft: #E3D2B8;

  --black: #0B0908;

  --line: rgba(30, 23, 18, 0.13);
  --line-light: rgba(30, 23, 18, 0.07);
  --line-invert: rgba(247, 242, 234, 0.22);

  --text: #241C16;
  --text-soft: #6B5B4C;
  --text-mute: #8B7A6A;
  --text-invert: #F2EBE0;
  --text-invert-soft: rgba(242, 235, 224, 0.68);

  /* Type scale (fluid) */
  --f-display: clamp(3.1rem, 10.5vw, 9.5rem);
  --f-h1: clamp(2.4rem, 6.2vw, 5.1rem);
  --f-h2: clamp(1.95rem, 4.1vw, 3.35rem);
  --f-h3: clamp(1.35rem, 2.1vw, 1.75rem);
  --f-lead: clamp(1.02rem, 1.55vw, 1.3rem);
  --f-body: clamp(0.94rem, 1.05vw, 1rem);
  --f-small: 0.8125rem;
  --f-micro: 0.6875rem;

  --serif: "Cormorant Garamond", "Didot", "Bodoni MT", "Times New Roman", serif;
  --sans: "Jost", "Futura", "Avenir Next", "Segoe UI", system-ui, sans-serif;

  /* Rhythm */
  --gutter: clamp(1.15rem, 4.6vw, 5.5rem);
  --sec-y: clamp(4.5rem, 11vw, 10.5rem);
  --sec-y-sm: clamp(3rem, 7vw, 6rem);
  --maxw: 1680px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast: 0.32s;
  --t-med: 0.62s;
  --t-slow: 1s;

  --header-h: 78px;
}

/* ---------- 2. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

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

body {
  font-family: var(--sans);
  font-size: var(--f-body);
  font-weight: 300;
  line-height: 1.75;
  letter-spacing: 0.012em;
  color: var(--text);
  background: var(--ivory-pure);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  border-radius: 0;
}

button { cursor: pointer; }

ul, ol { list-style: none; }

:focus-visible {
  outline: 1.5px solid var(--taupe-deep);
  outline-offset: 3px;
}

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

/* ---------- 3. Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1.03;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

h1 { font-size: var(--f-h1); }
h2 { font-size: var(--f-h2); }
h3 { font-size: var(--f-h3); line-height: 1.22; }

p { text-wrap: pretty; }

.display {
  font-size: var(--f-display);
  line-height: 0.9;
  letter-spacing: -0.028em;
}

.lead {
  font-size: var(--f-lead);
  line-height: 1.65;
  color: var(--text-soft);
  font-weight: 300;
}

.eyebrow {
  font-family: var(--sans);
  font-size: var(--f-micro);
  font-weight: 400;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--taupe-deep);
}

.eyebrow--light { color: var(--text-invert-soft); }

.eyebrow-line {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.eyebrow-line::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
  max-width: 74px;
}

.serif { font-family: var(--serif); }
.italic { font-style: italic; }

/* ---------- 4. Layout ---------- */
.shell {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.shell--narrow { max-width: 1080px; }
.shell--wide { max-width: 1880px; }

.section { padding-block: var(--sec-y); }
.section--sm { padding-block: var(--sec-y-sm); }
.section--flush-top { padding-top: 0; }
.section--flush-bottom { padding-bottom: 0; }

.bg-ivory { background: var(--ivory-pure); }
.bg-sand { background: var(--ivory); }
.bg-stone { background: #EFE7DA; }
.bg-dark { background: var(--espresso); color: var(--text-invert); }
.bg-dark .lead,
.bg-dark p { color: var(--text-invert-soft); }
.bg-dark .eyebrow { color: var(--champagne-soft); }

.rule {
  height: 1px;
  background: var(--line);
  border: 0;
}
.bg-dark .rule { background: var(--line-invert); }

/* Section heading block */
.head {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  margin-bottom: clamp(2.25rem, 4.6vw, 4.25rem);
}

.head--center {
  align-items: center;
  text-align: center;
}

.head--split {
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.head__title { max-width: 20ch; }
.head--center .head__title { max-width: 24ch; }
.head__sub { max-width: 52ch; }

/* ---------- 5. Buttons ---------- */
.btn {
  --btn-bg: var(--espresso);
  --btn-fg: var(--ivory);
  --btn-bd: var(--espresso);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  min-height: 52px;
  padding: 0.95rem 2.1rem;
  font-family: var(--sans);
  font-size: var(--f-micro);
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 1px solid var(--btn-bd);
  overflow: hidden;
  isolation: isolate;
  transition: color var(--t-fast) var(--ease-soft),
              border-color var(--t-fast) var(--ease-soft),
              transform var(--t-fast) var(--ease-soft);
  -webkit-tap-highlight-color: transparent;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--btn-fg);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform var(--t-med) var(--ease);
}

.btn:hover::before { transform: scaleY(1); }
.btn:hover { color: var(--btn-bg); }

.btn:active { transform: translateY(1px); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--espresso);
  --btn-bd: rgba(30, 23, 18, 0.3);
}
.btn--ghost:hover { --btn-bd: var(--espresso); }

.btn--light {
  --btn-bg: var(--ivory-pure);
  --btn-fg: var(--espresso);
  --btn-bd: var(--ivory-pure);
}

.btn--outline-light {
  --btn-bg: transparent;
  --btn-fg: var(--ivory-pure);
  --btn-bd: rgba(247, 242, 234, 0.45);
}
.btn--outline-light:hover { --btn-bd: var(--ivory-pure); }

.btn--block { width: 100%; }

.btn--sm {
  min-height: 44px;
  padding: 0.7rem 1.5rem;
  font-size: 0.625rem;
}

/* Text link with underline wipe */
.link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--f-micro);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding-bottom: 0.4rem;
  color: inherit;
}

.link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  opacity: 0.4;
  transform-origin: right;
  transition: transform var(--t-med) var(--ease), opacity var(--t-fast);
}

.link:hover::after { transform: scaleX(0); }

.link__arrow {
  display: inline-block;
  transition: transform var(--t-med) var(--ease);
}
.link:hover .link__arrow { transform: translateX(5px); }

/* ---------- 6. Media / image frame ---------- */
.frame {
  position: relative;
  overflow: hidden;
  background: var(--beige);
}

.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.frame--zoom img {
  transition: transform 1.15s var(--ease);
  will-change: transform;
}
.frame--zoom:hover img { transform: scale(1.055); }

.ratio-1-1 { aspect-ratio: 1 / 1; }
.ratio-4-5 { aspect-ratio: 4 / 5; }
.ratio-3-4 { aspect-ratio: 3 / 4; }
.ratio-2-3 { aspect-ratio: 2 / 3; }
.ratio-9-16 { aspect-ratio: 9 / 16; }
.ratio-3-2 { aspect-ratio: 3 / 2; }
.ratio-4-3 { aspect-ratio: 4 / 3; }
.ratio-16-9 { aspect-ratio: 16 / 9; }

/* Image reveal on scroll.
   Progressive: the curtain only exists when JS is active (html.js), so the
   image is always visible without it. A JS failsafe force-completes any
   reveal that never intersects, so imagery can never be left hidden. */
.reveal-img {
  position: relative;
  overflow: hidden;
}

.js .reveal-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--beige);
  transform-origin: bottom;
  transition: transform 1.05s var(--ease);
  pointer-events: none;
}

.js .reveal-img.is-in::after { transform: scaleY(0); }

/* ---------- 7. Reveal animations ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

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

.js [data-reveal="mask"] {
  opacity: 1;
  transform: none;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.1s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

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

[data-reveal="line"] {
  opacity: 1;
  transform: none;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.15s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

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

/* ---------- 8. Utilities ---------- */
.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;
}

.no-overflow { overflow-x: hidden; }

.stack-sm > * + * { margin-top: 0.75rem; }
.stack > * + * { margin-top: 1.4rem; }
.stack-lg > * + * { margin-top: 2.4rem; }

.center { text-align: center; }
.mt-auto { margin-top: auto; }

.flex { display: flex; }
.between { justify-content: space-between; }
.center-y { align-items: center; }
.wrap { flex-wrap: wrap; }
.gap-sm { gap: 0.75rem; }
.gap { gap: 1.5rem; }
.gap-lg { gap: clamp(2rem, 4vw, 3.5rem); }

/* ---------- 9. Responsive base ---------- */
@media (max-width: 720px) {
  :root { --header-h: 64px; }

  body { line-height: 1.7; }

  .head--split { align-items: flex-start; }
}

@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;
    scroll-behavior: auto !important;
  }

  .js [data-reveal] { opacity: 1; transform: none; clip-path: none; }
  .js .reveal-img::after { display: none; }
}
