/* ========================================================================
   ORDOVICIAN — Quiet luxury design system
   Aman / Six Senses editorial sensibility
   ======================================================================== */

:root {
  /* Brand palette — refined from source */
  --cream:        #f4f1ea;
  --cream-2:      #ece7dc;
  --paper:        #faf8f3;
  --sand:         #d3c7b4;
  --sand-deep:    #a89478;
  --sand-soft:    #e3d9c5;
  --ink:          #1a1f26;
  --ink-soft:     #2d3540;
  --muted:        #6b6356;
  --hairline:     rgba(26, 31, 38, 0.14);
  --hairline-soft:rgba(26, 31, 38, 0.08);
  --ocean:        #5a7a82;
  --ocean-deep:   #2f4d56;
  --jungle:       #4a5a3e;
  --sunset:       #c89071;

  /* Type */
  --f-display: "DM Serif Display", "Cormorant Garamond", "Times New Roman", serif;
  --f-serif:   "Cormorant Garamond", "DM Serif Display", "Times New Roman", serif;
  --f-sans:    "Work Sans", "Inter", -apple-system, sans-serif;

  /* Scale */
  --container: 1320px;
  --gutter: clamp(20px, 4vw, 56px);

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

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--f-sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { background: none; border: 0; font: inherit; color: inherit; cursor: pointer; }
ul, ol { list-style: none; }

/* ----- Typography ----- */
.display-xl, .display-l, .display-m, .display-s {
  font-family: var(--f-display);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.display-xl { font-size: clamp(56px, 9vw, 132px); letter-spacing: -0.02em; }
.display-l  { font-size: clamp(44px, 6vw, 88px); }
.display-m  { font-size: clamp(32px, 4vw, 56px); }
.display-s  { font-size: clamp(24px, 2.4vw, 36px); }

.italic { font-style: italic; }

.eyebrow {
  font-family: var(--f-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
}

.lede {
  font-family: var(--f-serif);
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.45;
  font-weight: 400;
  color: var(--ink-soft);
  letter-spacing: 0.005em;
}

p.body { font-size: 15.5px; line-height: 1.75; color: var(--ink-soft); max-width: 60ch; }

.rule {
  width: 48px; height: 1px; background: var(--sand-deep);
  display: inline-block; vertical-align: middle;
}

/* ----- Layout helpers ----- */
.container { max-width: var(--container); margin: 0 auto; padding-inline: var(--gutter); }
.wide      { max-width: 1640px; margin: 0 auto; padding-inline: var(--gutter); }

section { position: relative; }

/* ----- Navigation ----- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 22px var(--gutter);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  color: #fff;
  transition: background 0.4s var(--ease), color 0.4s var(--ease), padding 0.3s var(--ease);
}
.nav.is-scrolled {
  background: rgba(244, 241, 234, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--ink);
  padding-top: 14px; padding-bottom: 14px;
  border-bottom: 1px solid var(--hairline-soft);
}
.nav__left, .nav__right {
  display: flex; align-items: center; gap: 28px;
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 400;
}
.nav__right { justify-content: flex-end; }
.nav__left a, .nav__right a { opacity: 0.9; transition: opacity 0.2s; }
.nav__left a:hover, .nav__right a:hover { opacity: 1; }

.nav__wordmark {
  text-align: center;
  font-family: var(--f-display);
  font-size: 22px;
  letter-spacing: 0.42em;
  font-weight: 400;
  padding-inline: 6px;
}
.nav__wordmark small {
  display: block;
  font-family: var(--f-sans);
  font-size: 9px;
  letter-spacing: 0.5em;
  margin-top: 2px;
  opacity: 0.72;
}

.nav__lang {
  display: inline-flex; gap: 0;
  font-size: 11px; letter-spacing: 0.2em;
}
.nav__lang button { padding: 6px 8px; opacity: 0.55; }
.nav__lang button.active { opacity: 1; }
.nav__lang span { opacity: 0.4; }

.nav__cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 20px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  transition: background 0.25s, color 0.25s;
}
.nav__cta:hover { background: currentColor; }
.nav__cta:hover span { color: var(--cream); }
.nav.is-scrolled .nav__cta:hover { background: var(--ink); }
.nav.is-scrolled .nav__cta:hover span { color: var(--cream); }

.nav__burger {
  display: inline-flex; flex-direction: column; gap: 5px;
  padding: 8px 0;
}
.nav__burger span {
  width: 22px; height: 1px; background: currentColor; display: block;
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 16px 32px;
  font-family: var(--f-sans);
  font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase; font-weight: 500;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  border-radius: 999px;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
  cursor: pointer;
}
.btn:hover { background: var(--ink); color: var(--cream); }
.btn--solid { background: var(--ink); color: var(--cream); }
.btn--solid:hover { background: var(--sand-deep); border-color: var(--sand-deep); }
.btn--ghost { border-color: rgba(255,255,255,0.6); color: #fff; }
.btn--ghost:hover { background: #fff; color: var(--ink); }
.btn--sand { background: var(--sand-deep); border-color: var(--sand-deep); color: #fff; }
.btn--sand:hover { background: var(--ink); border-color: var(--ink); }

.btn .arrow { transition: transform 0.3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.link {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 500;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--ink);
  transition: gap 0.3s var(--ease), border-color 0.3s;
}
.link:hover { gap: 16px; border-color: var(--sand-deep); }

/* ----- Placeholder imagery (elegant gradient frames) ----- */
.ph {
  position: relative;
  overflow: hidden;
  background: var(--sand-soft);
  isolation: isolate;
}
.ph::before {
  content: ""; position: absolute; inset: 0;
  background: var(--ph-grad, linear-gradient(135deg, #c9d6d4 0%, #8aa9b0 50%, #5a7a82 100%));
  z-index: 0;
}
.ph::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(255,255,255,0.18), transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(0,0,0,0.18), transparent 50%);
  z-index: 1;
}
.ph__label {
  position: absolute;
  bottom: 18px; left: 20px;
  font-family: var(--f-sans);
  font-size: 9.5px; letter-spacing: 0.36em; text-transform: uppercase;
  color: rgba(255,255,255,0.78);
  z-index: 2;
  display: flex; align-items: center; gap: 8px;
}
.ph__label::before {
  content: ""; width: 16px; height: 1px; background: rgba(255,255,255,0.78);
}

/* Placeholder palettes */
.ph--ocean    { --ph-grad: linear-gradient(160deg, #b8d0d1 0%, #6c95a0 45%, #2f4d56 100%); }
.ph--sunset   { --ph-grad: linear-gradient(180deg, #f0b591 0%, #d68d68 40%, #8c4d3d 100%); }
.ph--jungle   { --ph-grad: linear-gradient(170deg, #97a682 0%, #5b6e4d 50%, #2e3a26 100%); }
.ph--sand     { --ph-grad: linear-gradient(160deg, #e8dcc4 0%, #c5ad88 50%, #8a7252 100%); }
.ph--night    { --ph-grad: linear-gradient(180deg, #3a4a55 0%, #1d2730 60%, #0d141a 100%); }
.ph--water    { --ph-grad: linear-gradient(180deg, #a8c6c8 0%, #6e9298 40%, #3d6168 80%, #234048 100%); }
.ph--mist     { --ph-grad: linear-gradient(180deg, #d8dccc 0%, #b5b8a6 50%, #7e8474 100%); }
.ph--coral    { --ph-grad: linear-gradient(160deg, #e8b8a0 0%, #c08570 50%, #7c4838 100%); }
.ph--palm     { --ph-grad: linear-gradient(180deg, #c0c9a2 0%, #7e8e64 45%, #3e4a35 100%); }
.ph--dusk     { --ph-grad: linear-gradient(180deg, #c9a890 0%, #7a6d6e 45%, #2e3845 100%); }

/* Real media injected on top of the gradient — image/video covers the container.
   The gradient stays as fallback for when an asset fails to load. */
.ph__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
  display: block;
}
.ph__media--video { pointer-events: none; }
.ph:has(.ph__media)::after { display: none; }

/* Subtle grain overlay */
.ph--grain::after {
  background:
    radial-gradient(ellipse at 20% 30%, rgba(255,255,255,0.18), transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(0,0,0,0.22), transparent 50%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.18 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ----- Footer ----- */
.footer {
  background: var(--ink);
  color: var(--cream);
  padding: 96px var(--gutter) 40px;
}
.footer__wrap { max-width: var(--container); margin: 0 auto; }
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 56px;
  padding-bottom: 64px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer h4 {
  font-family: var(--f-sans);
  font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; font-weight: 500;
  color: var(--sand);
  margin-bottom: 24px;
}
.footer__brand {
  font-family: var(--f-display); font-size: 32px; letter-spacing: 0.32em;
  margin-bottom: 18px;
}
.footer__tag {
  font-family: var(--f-serif); font-size: 18px; font-style: italic;
  color: rgba(255,255,255,0.7); line-height: 1.5; max-width: 28ch;
}
.footer ul li { margin-bottom: 12px; }
.footer ul li a {
  font-size: 14px; color: rgba(255,255,255,0.78);
  transition: color 0.2s;
}
.footer ul li a:hover { color: var(--sand); }
.footer__bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 32px;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}
.footer__social { display: flex; gap: 18px; }

@media (max-width: 900px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .footer__bottom { flex-direction: column; gap: 16px; }
}

/* ----- Utility ----- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.divider {
  height: 1px; background: var(--hairline);
  margin: 0 auto; width: 100%;
}

/* Reveal animation (subtle) */
.reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }
