/* ============================================================
   BASE — Warandhorn & Kritatee
   At the edge of the sea. Dusk, stone, wine, still water.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&family=EB+Garamond:ital,wght@0,400;0,500;1,400;1,500&family=Italianno&display=swap');

/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

body {
  background-color: #120f15;
  color: #d8cdc0;
  font-family: 'EB Garamond', 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  line-height: 1.75;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Palette ──
   Sandstone / Clay / Faded Mauve / Plum / Wine / Tobacco / Deep Sea
   Washed, faded, organic — not saturated. */
:root {
  --ink:          #120f15;
  --charcoal:     #1c1720;
  --shadow:       #29212a;
  --veil:         #372a35;

  --sandstone:    #c9a97d;
  --clay:         #c3917f;
  --faded-mauve:  #9c7684;
  --plum:         #5c3a4d;
  --wine:         #6d2a34;
  --tobacco:      #6b4a35;
  --deep-sea:     #1b2330;

  --stone:        #8f7c72;
  --ash:          #ab9a8d;
  --parchment:    #d8cdc0;
  --cream:        #f0e7db;

  --font-serif:   'EB Garamond', 'Cormorant Garamond', Georgia, serif;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-caps:    'Cormorant Garamond', Georgia, serif;
  --font-script:  'Italianno', 'Cormorant Garamond', cursive;

  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 8rem;

  --transition-slow: 1.2s ease;
  --transition-med: 0.6s ease;
}

/* ── Typography ── */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: var(--cream);
}

h1 { font-size: clamp(2.8rem, 7vw, 5.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.8rem); }

.caps {
  font-family: var(--font-caps);
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ash);
  font-weight: 500;
}

.script {
  font-family: var(--font-script);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.05;
  color: var(--cream);
}

p {
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  color: var(--parchment);
  max-width: 52ch;
}

em, i { font-style: italic; }

a {
  color: inherit;
  text-decoration: none;
  transition: opacity var(--transition-med);
}

a:hover { opacity: 0.6; }

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 1px solid var(--sandstone);
  outline-offset: 4px;
}

/* ── Nav ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.6rem 3rem;
}

nav::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(18,15,21,0.65) 0%, transparent 100%);
  z-index: -1;
  pointer-events: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.4rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-caps);
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--parchment);
  opacity: 0.65;
  transition: opacity var(--transition-med);
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active { opacity: 1; }

.nav-links a.active {
  border-bottom: 1px solid rgba(216,205,192,0.5);
  padding-bottom: 0.3rem;
}

.nav-divider {
  display: inline-block;
  width: 1px;
  height: 12px;
  background: var(--stone);
  opacity: 0.35;
  margin: 0 0.2rem;
  flex-shrink: 0;
  align-self: center;
}

/* ── Divider ornament ── */
.ornament {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: var(--spacing-md) 0;
}

.ornament::before,
.ornament::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--stone), transparent);
  opacity: 0.4;
}

.ornament-diamond {
  width: 5px;
  height: 5px;
  background: var(--stone);
  transform: rotate(45deg);
  opacity: 0.6;
  flex-shrink: 0;
}

/* ── Compass / star mark ──
   A small recurring motif — thin four-point star. */
.mark {
  display: inline-block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.7;
}

.mark svg { width: 100%; height: 100%; display: block; }

/* ── Wax-seal circle ── */
.seal {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(240,231,219,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 35% 30%, rgba(109,42,52,0.55), rgba(92,58,77,0.35) 60%, rgba(18,15,21,0.2) 100%);
}

.seal .mark { width: 18px; height: 18px; opacity: 0.9; }

/* ── Page wrapper ── */
.page {
  min-height: 100vh;
  position: relative;
}

/* ── Fade-in animation ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.fade-up { animation: fadeUp 1.4s cubic-bezier(0.22, 1, 0.36, 1) both; }
.fade-in { animation: fadeIn 1.8s ease both; }

.delay-1 { animation-delay: 0.3s; }
.delay-2 { animation-delay: 0.7s; }
.delay-3 { animation-delay: 1.1s; }
.delay-4 { animation-delay: 1.5s; }
.delay-5 { animation-delay: 2.0s; }

/* ── Image / overlay ── */
.overlay-dark {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(18,15,21,0.35) 0%,
    rgba(18,15,21,0.15) 35%,
    rgba(18,15,21,0.55) 72%,
    rgba(18,15,21,0.92) 100%
  );
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  font-family: var(--font-caps);
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  padding: 0.9rem 2.6rem;
  border: 1px solid rgba(216,205,192,0.35);
  color: var(--parchment);
  background: transparent;
  cursor: pointer;
  transition: border-color var(--transition-med), color var(--transition-med), background var(--transition-med);
}

.btn:hover {
  border-color: rgba(216,205,192,0.8);
  color: var(--cream);
  opacity: 1;
  background: rgba(216,205,192,0.05);
}

/* ── Section content centering ── */
.section-inner {
  max-width: 680px;
  margin: 0 auto;
  padding: var(--spacing-xl) var(--spacing-md);
}

.section-inner.wide { max-width: 960px; }

.text-center { text-align: center; }
.text-left   { text-align: left; }

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

/* ── Horizontal rule ── */
hr.fine {
  border: none;
  border-top: 1px solid rgba(171,154,141,0.18);
  margin: var(--spacing-lg) 0;
}

/* ── Scroll indicator ── */
.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  opacity: 0;
  animation: fadeIn 1s ease 3s both;
}

.scroll-hint span {
  font-family: var(--font-caps);
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  color: var(--ash);
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--stone), transparent);
  animation: scrollPulse 2s ease-in-out 3s infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50%      { opacity: 0.8; transform: scaleY(1.1); }
}

/* ── Watercolour swatches ──
   Irregular hand-painted colour references, not CSS rectangles. */
.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem 1.6rem;
}

.swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  width: 64px;
}

.swatch-blob {
  width: 62px;
  height: 52px;
  position: relative;
  filter: saturate(0.92);
}

.swatch-blob::before {
  content: '';
  position: absolute;
  inset: 0;
  background: inherit;
  background-color: var(--sw-color);
  clip-path: var(--sw-shape, polygon(8% 22%, 30% 4%, 68% 0%, 92% 20%, 100% 55%, 82% 88%, 48% 100%, 14% 86%, 0% 52%));
  opacity: 0.92;
  mix-blend-mode: normal;
}

.swatch-blob::after {
  content: '';
  position: absolute;
  inset: -6px;
  background: radial-gradient(ellipse at 40% 35%, var(--sw-color) 0%, transparent 68%);
  clip-path: var(--sw-shape, polygon(8% 22%, 30% 4%, 68% 0%, 92% 20%, 100% 55%, 82% 88%, 48% 100%, 14% 86%, 0% 52%));
  opacity: 0.28;
  filter: blur(3px);
  z-index: -1;
}

.swatch:nth-child(2n) .swatch-blob { --sw-shape: polygon(4% 30%, 22% 6%, 58% 0%, 88% 10%, 100% 42%, 94% 78%, 66% 100%, 28% 96%, 2% 66%); transform: rotate(-3deg); }
.swatch:nth-child(3n) .swatch-blob { --sw-shape: polygon(14% 10%, 46% 0%, 82% 8%, 100% 34%, 96% 70%, 74% 98%, 36% 100%, 6% 80%, 0% 40%); transform: rotate(2deg); }
.swatch:nth-child(4n) .swatch-blob { --sw-shape: polygon(6% 18%, 34% 2%, 72% 4%, 98% 26%, 100% 62%, 78% 92%, 42% 100%, 10% 84%, 0% 48%); transform: rotate(-1.5deg); }

.swatch-name {
  font-family: var(--font-caps);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ash);
  text-align: center;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .nav-links { gap: 1.7rem; }
}

@media (max-width: 768px) {
  nav {
    padding: 1.1rem 1.25rem;
    overflow-x: auto;
    justify-content: flex-start;
    scrollbar-width: none;
  }
  nav::-webkit-scrollbar { display: none; }

  .nav-links { gap: 1.3rem; flex-shrink: 0; }

  .section-inner { padding: var(--spacing-lg) var(--spacing-sm); }
}

@media (max-width: 480px) {
  nav { padding-inline: .9rem; }
  .nav-links { gap: .8rem; }
  .nav-links a { font-size: 0.61rem; letter-spacing:.2em; }
}
