/* ============================================================
   auryn.travel — shared styles (landing + legal pages)
   Palette: dark cinematic. Teal for action, gold for brand.
   ============================================================ */

:root {
  --bg: #101014;
  --surface: #18181C;
  --elevated: #1E1E24;
  --border: #2A2A32;
  --border-bright: #36363E;
  --text: #F0F0EC;
  --text-body: #A0A0A8;
  --text-muted: #78788A;
  --text-dim: #4E4E5A;
  --teal: #34D1BF;
  --teal-soft: #5DCAA5;
  --teal-deep: #1D9E75;
  --gold: #D4A853;
  --gold-soft: #FAC775;
  --gold-deep: #854F0B;
  --surface-teal: #13191E;
  --surface-gold: #1E1A16;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --max: 1200px;
  --radius: 16px;
  /* Safe-area insets (iOS notch/home indicator). Resolve to 0 on non-supporting browsers. */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  /* Fluid shell padding shared across pages */
  --shell-pad: clamp(18px, 4.5vw, 24px);
  color-scheme: only dark;
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
  color-scheme: only dark;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; }

/* Force dark regardless of system pref */
@media (prefers-color-scheme: light) {
  html, body { background: var(--bg); color: var(--text); }
}

/* Grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.04;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}
@media (max-width: 768px) {
  body::before { display: none; }
}

h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  color: var(--text);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

a { color: inherit; text-decoration: none; transition: color 0.3s var(--ease); }

::selection { background: var(--teal); color: var(--bg); }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--shell-pad);
  padding-left: max(var(--shell-pad), var(--safe-left));
  padding-right: max(var(--shell-pad), var(--safe-right));
}

/* ================== NAV ================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 18px 0;
  padding-top: max(18px, var(--safe-top));
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  background: rgba(16, 16, 20, 0.6);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.nav.scrolled {
  background: rgba(16, 16, 20, 0.85);
  border-bottom-color: var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.brand svg { width: 26px; height: 26px; transition: transform 0.3s var(--ease); }
.brand:hover svg { transform: rotate(15deg); }
.brand .wm {
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  font-size: 18px;
  letter-spacing: 3px;
  color: var(--gold);
  text-transform: lowercase;
}
.nav-links {
  display: flex;
  gap: 32px;
  font-size: 14px;
  color: var(--text-muted);
}
.nav-links a {
  position: relative;
  padding-bottom: 2px;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); }
@media (max-width: 640px) {
  .nav-links { gap: 18px; font-size: 13px; }
  .nav-links .hide-sm { display: none; }
}

/* ================== BUTTONS ================== */
.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.3s var(--ease);
  text-decoration: none;
}
.btn-primary {
  background: var(--teal);
  color: #0A1F1B;
  box-shadow: 0 8px 24px -8px rgba(52, 209, 191, 0.35);
}
.btn-primary:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 0 32px rgba(52, 209, 191, 0.45), 0 12px 32px -8px rgba(52, 209, 191, 0.5);
}
.btn-ghost {
  background: transparent;
  border-color: var(--border-bright);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--teal);
  color: var(--teal);
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: #1A1005;
  box-shadow: 0 8px 24px -8px rgba(212, 168, 83, 0.5);
}
.btn-gold:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 0 32px rgba(212, 168, 83, 0.4), 0 12px 32px -8px rgba(212, 168, 83, 0.6);
}
.btn:active::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transform: translate(-50%, -50%) scale(0);
  animation: btnRipple 0.5s ease-out;
  pointer-events: none;
}
@keyframes btnRipple {
  to { transform: translate(-50%, -50%) scale(60); opacity: 0; }
}

/* ================== A11Y ================== */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 4px;
}
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 12px 18px;
  background: var(--teal);
  color: #0A1F1B;
  font-weight: 500;
  z-index: 200;
  border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* ================== FOOTER ================== */
footer {
  padding: 48px 0 max(36px, calc(24px + var(--safe-bottom)));
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 2;
}
.foot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.foot-links {
  display: flex;
  gap: 28px;
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}
.foot-links a:hover { color: var(--teal); }
.foot-meta {
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 1px;
}

/* ================== LEGAL PAGES ================== */
/* Legal text targets a comfortable measure of ~70ch. Padding scales with the viewport
   so the column never crowds the safe area on small screens. */
.legal {
  max-width: min(760px, 78ch);
  margin: 0 auto;
  padding: clamp(96px, 18vw, 140px) clamp(20px, 5vw, 32px) clamp(56px, 10vw, 96px);
  padding-left: max(clamp(20px, 5vw, 32px), var(--safe-left));
  padding-right: max(clamp(20px, 5vw, 32px), var(--safe-right));
  padding-bottom: max(clamp(56px, 10vw, 96px), calc(56px + var(--safe-bottom)));
}
.legal h1 {
  font-size: clamp(34px, 6vw, 52px);
  margin-bottom: 8px;
  line-height: 1.1;
}
.legal .effective {
  color: var(--text-muted);
  font-size: clamp(11px, 2.4vw, 13px);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: clamp(36px, 7vw, 56px);
}
.legal h2 {
  font-size: clamp(20px, 4vw, 26px);
  color: var(--gold);
  margin-top: clamp(36px, 7vw, 56px);
  margin-bottom: 16px;
  line-height: 1.2;
}
.legal h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(15px, 2.6vw, 16px);
  font-weight: 500;
  color: var(--text);
  margin-top: 28px;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}
.legal p, .legal li {
  color: var(--text-body);
  font-size: clamp(15px, 2.4vw, 16px);
  line-height: 1.8;
  margin-bottom: 16px;
  overflow-wrap: anywhere;
}
.legal ul, .legal ol {
  padding-left: 22px;
  margin-bottom: 16px;
}
.legal li { margin-bottom: 8px; }
.legal strong { color: var(--text); font-weight: 500; }
.legal a { color: var(--teal); border-bottom: 1px solid rgba(52, 209, 191, 0.3); }
.legal a:hover { border-bottom-color: var(--teal); }
.legal .intro {
  color: var(--text);
  font-size: clamp(16px, 2.6vw, 18px);
  line-height: 1.8;
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

/* ================== MOBILE ================== */
@media (max-width: 720px) {
  .nav-links { gap: 16px; font-size: 13px; }
}
