/* ===========================================================
   SAMUDRA — Shared design tokens & base
   Inspired by Maybourne's editorial / cinematic luxury aesthetic
   =========================================================== */

:root {
  /* Palette — warm cream + deep coastal teal + ink */
  --paper:        #F1EBDF;      /* base background (warm cream) */
  --paper-soft:   #E8E0CF;      /* recessed surface */
  --paper-deep:   #D9CFBC;      /* hairline rules / inset */
  --ink:          #1F1B17;      /* primary text */
  --ink-soft:     #3A332C;
  --ink-mute:     #6B6258;      /* secondary text / labels */
  --teal:         #1E443F;      /* deep coastal teal (signature) */
  --teal-deep:    #122B27;
  --sand:         #B89E7E;      /* warm tan accent */
  --gold:         #8E7549;      /* old-gold for fine accents */

  /* Type */
  --font-display: 'Cormorant Garamond', 'Cormorant', 'Times New Roman', serif;
  --font-script:  'Italianno', 'Cormorant Garamond', serif;
  --font-label:   'Jost', 'Inter', system-ui, sans-serif;

  /* Spacing rhythm */
  --gutter: clamp(20px, 4vw, 64px);
  --section-y: clamp(72px, 11vw, 160px);

  /* Motion */
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* Theme variant — applied via [data-theme="dusk"] on <html> */
html[data-theme="dusk"] {
  --paper:      #1A1F22;
  --paper-soft: #232A2D;
  --paper-deep: #2F383B;
  --ink:        #ECE4D2;
  --ink-soft:   #D5CCBA;
  --ink-mute:   #9C9484;
  --teal:       #C9B79A;
  --sand:       #B89E7E;
  --gold:       #C9A971;
}

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

html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* ---------- Typography ---------- */
.eyebrow {
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.eyebrow--gold { color: var(--gold); }
.eyebrow--light { color: rgba(255,255,255,0.78); }

.display-xl {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(48px, 8.4vw, 132px);
  line-height: 0.98;
  letter-spacing: -0.005em;
}
.display-l {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(40px, 5.6vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.005em;
}
.display-m {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(32px, 3.8vw, 56px);
  line-height: 1.08;
}
.display-s {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.2;
  letter-spacing: 0.01em;
}
.script {
  font-family: var(--font-script);
  font-weight: 400;
  font-style: italic;
  font-size: 1.5em;
  line-height: 0.9;
  color: var(--gold);
}
.lead {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(18px, 1.4vw, 21px);
  line-height: 1.65;
  color: var(--ink-soft);
}
p { font-family: var(--font-display); font-size: 17px; line-height: 1.65; color: var(--ink-soft); }

/* ---------- Rule lines ---------- */
.rule { height: 1px; width: 80px; background: var(--ink); opacity: 0.4; }
.rule--center { margin: 0 auto; }
.rule--vert { width: 1px; height: 80px; background: currentColor; opacity: 0.35; }
.rule--full { height: 1px; width: 100%; background: var(--paper-deep); }

.ornament { display: inline-flex; align-items: center; gap: 14px; color: var(--ink-mute); }
.ornament::before, .ornament::after {
  content:""; width: 36px; height: 1px; background: currentColor; opacity: 0.5;
}

/* ---------- Buttons / Links ---------- */
.link-arrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--font-label);
  font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--ink);
  padding-bottom: 4px;
  position: relative;
}
.link-arrow::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px;
  width: 100%; background: currentColor; transform-origin: left;
  transition: transform .5s var(--ease);
}
.link-arrow:hover::after { transform: scaleX(0); transform-origin: right; }
.link-arrow .arr { display: inline-block; transition: transform .4s var(--ease); }
.link-arrow:hover .arr { transform: translateX(6px); }

.btn-ghost {
  font-family: var(--font-label);
  font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase;
  padding: 16px 28px; border: 1px solid currentColor;
  transition: background .4s var(--ease), color .4s var(--ease);
}
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

.btn-solid {
  font-family: var(--font-label);
  font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase;
  padding: 16px 28px; background: var(--ink); color: var(--paper);
  transition: background .4s var(--ease);
}
.btn-solid:hover { background: var(--teal); }

/* ---------- Top nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 22px var(--gutter);
  color: var(--paper);
  transition: background .5s var(--ease), color .5s var(--ease), border .5s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-solid {
  background: var(--paper);
  color: var(--ink);
  border-bottom: 1px solid var(--paper-deep);
}
.nav__group { display: flex; gap: 34px; }
.nav__group--right { justify-content: flex-end; }
.nav__link {
  font-family: var(--font-label); font-size: 11px;
  letter-spacing: 0.28em; text-transform: uppercase;
  padding: 6px 0; position: relative;
}
.nav__link::after {
  content:""; position: absolute; left: 50%; right: 50%; bottom: 0; height: 1px;
  background: currentColor; transition: left .4s var(--ease), right .4s var(--ease);
}
.nav__link:hover::after, .nav__link.is-active::after { left: 0; right: 0; }

.brand {
  font-family: var(--font-display); font-weight: 400;
  font-size: 22px; letter-spacing: 0.42em; text-transform: uppercase;
  text-align: center;
}
.brand small {
  display: block;
  font-family: var(--font-label); font-size: 9px;
  letter-spacing: 0.4em; text-transform: uppercase;
  margin-top: 4px; opacity: 0.7;
}

.nav__reserve {
  font-family: var(--font-label); font-size: 11px;
  letter-spacing: 0.3em; text-transform: uppercase;
  padding: 10px 22px; border: 1px solid currentColor;
  transition: background .4s var(--ease), color .4s var(--ease);
}
.nav__reserve:hover { background: currentColor; color: var(--paper); }
.nav.is-solid .nav__reserve:hover { background: var(--ink); color: var(--paper); }

/* ---------- Footer ---------- */
.foot {
  background: var(--teal);
  color: var(--paper);
  padding: 96px var(--gutter) 36px;
}
.foot__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 64px;
  border-bottom: 1px solid rgba(241,235,223,0.18);
}
.foot__brand { display: flex; flex-direction: column; gap: 18px; max-width: 320px; }
.foot__brand .brand { text-align: left; font-size: 28px; }
.foot__brand p { color: rgba(241,235,223,0.7); font-size: 15px; line-height: 1.6; }
.foot__col h4 {
  font-family: var(--font-label); font-size: 10px;
  letter-spacing: 0.32em; text-transform: uppercase;
  color: rgba(241,235,223,0.55);
  margin-bottom: 22px; font-weight: 400;
}
.foot__col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.foot__col a {
  font-size: 15px; color: rgba(241,235,223,0.85);
  transition: color .3s var(--ease);
}
.foot__col a:hover { color: var(--paper); }
.foot__base {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 32px;
  font-family: var(--font-label); font-size: 10px;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: rgba(241,235,223,0.5);
}

/* ---------- Photo frame ---------- */
.frame {
  position: relative;
  background-color: #d6c9b1;
  background-image:
    radial-gradient(120% 80% at 30% 20%, rgba(255,255,255,0.45), transparent 60%),
    linear-gradient(135deg, #d6c9b1 0%, #b39d80 55%, #6e5e49 100%);
  background-size: cover;
  background-position: center;
  overflow: hidden;
  transition: filter .8s var(--ease), opacity .8s var(--ease);
}
/* Editorial filter — warm, desaturated, soft sepia. Strong enough that
   randomly-sourced photos read as a single cinematic body of work. */
.frame.has-photo {
  filter: saturate(0.55) contrast(1.06) brightness(0.9) sepia(0.18);
}
/* Warm teal/amber duotone above the photo + bottom darkening band
   so the caption stays legible regardless of source image. */
.frame.has-photo::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(8,18,20,0.18) 0%, rgba(40,28,18,0.12) 40%, rgba(8,14,16,0.72) 100%),
    linear-gradient(135deg, rgba(200,150,80,0.20), rgba(20,70,72,0.22));
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 1;
}
/* Caption sits above overlay + grain, with a small protective pill */
.frame__caption {
  z-index: 2;
  padding: 6px 10px 6px 0;
  background: linear-gradient(90deg, rgba(8,14,16,0.55) 0%, rgba(8,14,16,0.3) 70%, transparent 100%);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border-radius: 1px;
}
/* Once a real photo has been assigned, hide the placeholder caption —
   its specific descriptor would mislabel a random landscape. The
   editorial filter alone holds the frame together. */
.frame.has-photo .frame__caption { display: none; }
.frame--teal {
  background-image:
    radial-gradient(120% 80% at 70% 15%, rgba(245,238,222,0.25), transparent 60%),
    linear-gradient(160deg, #2c5b54 0%, #1e443f 45%, #0e2522 100%);
  color: #f1ebdf;
}
.frame--dusk {
  background-image:
    radial-gradient(80% 60% at 50% 90%, rgba(255,193,140,0.45), transparent 70%),
    linear-gradient(180deg, #3a2f3a 0%, #6b4a4a 45%, #c4866b 100%);
  color: #f1ebdf;
}
.frame--ocean {
  background-image:
    radial-gradient(60% 60% at 60% 70%, rgba(255,255,255,0.18), transparent 80%),
    linear-gradient(180deg, #5d8a89 0%, #2e5a59 50%, #143230 100%);
  color: #f1ebdf;
}
.frame--sand {
  background-image:
    radial-gradient(120% 80% at 50% 30%, #f4e9d2 0%, #d9c4a0 55%, #a78863 100%);
  color: #1F1B17;
}
.frame--forest {
  background-image:
    radial-gradient(80% 80% at 30% 70%, rgba(255,255,255,0.15), transparent 70%),
    linear-gradient(160deg, #4a5e3d 0%, #2c3a25 60%, #14180e 100%);
  color: #f1ebdf;
}
.frame--stone {
  background-image:
    radial-gradient(120% 80% at 50% 20%, #efe7d8 0%, #b8ad96 60%, #6c6453 100%);
  color: #1F1B17;
}

/* Film-grain veneer */
.frame::before {
  content: ""; position: absolute; inset: 0;
  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'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .35 0'/></filter><rect width='200' height='200' filter='url(%23n)' opacity='.6'/></svg>");
  mix-blend-mode: overlay;
  opacity: 0.5; pointer-events: none;
}

.frame__caption {
  position: absolute; left: 22px; bottom: 18px;
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-label); font-size: 10px;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: currentColor; opacity: 0.78;
}
.frame__caption::before {
  content:""; width: 18px; height: 1px; background: currentColor;
}
.frame__overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 14px;
  color: currentColor; opacity: 0.55;
  pointer-events: none;
}
.frame__overlay svg { width: 38px; height: 38px; }

/* ---------- Reveal-on-scroll utility ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Container ---------- */
.wrap { padding-left: var(--gutter); padding-right: var(--gutter); }
.wrap--narrow { max-width: 880px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* ---------- Section title block ---------- */
.section-head {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 26px;
  padding: var(--section-y) var(--gutter) calc(var(--section-y) * 0.5);
}
.section-head .rule { background: var(--ink); opacity: 0.6; }

/* ---------- Tag list ---------- */
.tagline {
  display: flex; align-items: center; gap: 18px;
  font-family: var(--font-label); font-size: 10px;
  letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--ink-mute);
}
.tagline .dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }

/* ---------- Mobile-ish ---------- */
@media (max-width: 880px) {
  .nav { grid-template-columns: auto 1fr auto; padding: 18px var(--gutter); }
  .nav__group { display: none; }
  .foot__grid { grid-template-columns: 1fr 1fr; }
}

/* ===========================================================
   SAMUDRA — AI Concierge Widget
   =========================================================== */

/* Toggle button — bottom-right floating */
#samudra-concierge-toggle {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 200;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(31, 27, 23, 0.28), 0 2px 8px rgba(31, 27, 23, 0.14);
  transition: background 0.4s var(--ease), transform 0.35s var(--ease), box-shadow 0.4s var(--ease);
}
#samudra-concierge-toggle:hover {
  background: var(--teal);
  transform: translateY(-2px);
  box-shadow: 0 14px 44px rgba(31, 27, 23, 0.32), 0 2px 8px rgba(31, 27, 23, 0.14);
}
#samudra-concierge-toggle.sc-toggle--open {
  background: var(--teal);
}

/* Chat panel */
#samudra-concierge {
  position: fixed;
  bottom: 100px;
  right: 32px;
  z-index: 199;
  width: 400px;
  max-width: calc(100vw - 48px);
  height: 70vh;
  max-height: 640px;
  min-height: 400px;
  background: var(--paper);
  border: 1px solid var(--paper-deep);
  box-shadow: 0 32px 96px rgba(10, 14, 20, 0.22), 0 4px 16px rgba(10, 14, 20, 0.10);
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px) scale(0.98);
  transform-origin: bottom right;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
#samudra-concierge.sc--open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* Panel header */
.sc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--paper-deep);
  flex-shrink: 0;
}
.sc-header__left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sc-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(30, 68, 63, 0.18);
}
.sc-agent-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.2;
}
.sc-status-line {
  font-family: var(--font-label);
  font-size: 9px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 2px;
}
.sc-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-mute);
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s var(--ease);
}
.sc-close:hover { color: var(--ink); }

/* Transcript area */
.sc-transcript {
  flex: 1;
  overflow-y: auto;
  padding: 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}
.sc-transcript::-webkit-scrollbar { width: 4px; }
.sc-transcript::-webkit-scrollbar-track { background: var(--paper-soft); }
.sc-transcript::-webkit-scrollbar-thumb { background: var(--paper-deep); border-radius: 2px; }

/* Messages */
.sc-msg { display: flex; flex-direction: column; gap: 6px; }
.sc-msg--user { align-items: flex-end; }
.sc-msg--agent { align-items: flex-start; }
.sc-msg--error { align-items: flex-start; }

.sc-bubble {
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper-soft);
  border: 1px solid var(--paper-deep);
  padding: 12px 16px;
  max-width: 88%;
  white-space: pre-wrap;
}
.sc-bubble--user {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.sc-bubble--error {
  background: transparent;
  border-color: #b37566;
  color: #7a3d31;
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: 0.08em;
}

/* Typing indicator */
.sc-typing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 18px;
}
.sc-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-mute);
  animation: scPulse 1.4s ease-in-out infinite both;
}
.sc-dot:nth-child(2) { animation-delay: 0.2s; }
.sc-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes scPulse {
  0%, 80%, 100% { opacity: 0.25; transform: scale(0.85); }
  40% { opacity: 1; transform: scale(1); }
}

/* Package cards */
.sc-pkg-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 88%;
  margin-top: 8px;
}
.sc-pkg-card {
  background: var(--paper);
  border: 1px solid var(--paper-deep);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sc-pkg-card__title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.2;
}
.sc-pkg-card__desc {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--ink-mute);
  line-height: 1.55;
}
.sc-card__reserve {
  display: inline-block;
  margin-top: 6px;
  align-self: flex-start;
  font-family: var(--font-label);
  font-size: 9px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--ink);
  padding: 8px 16px;
  border: none;
  text-decoration: none;
  transition: background 0.4s var(--ease);
}
.sc-card__reserve:hover { background: var(--teal); }

/* Input row */
.sc-input-row {
  display: flex;
  align-items: center;
  gap: 0;
  border-top: 1px solid var(--paper-deep);
  flex-shrink: 0;
}
.sc-input {
  flex: 1;
  border: none;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 15px;
  padding: 16px 18px;
  outline: none;
}
.sc-input::placeholder {
  color: var(--ink-mute);
  font-style: italic;
}
.sc-send {
  background: var(--ink);
  color: var(--paper);
  border: none;
  cursor: pointer;
  padding: 0 20px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.4s var(--ease);
}
.sc-send:hover { background: var(--teal); }
.sc-send:disabled { opacity: 0.45; cursor: not-allowed; }

/* Responsive: smaller screens */
@media (max-width: 480px) {
  #samudra-concierge-toggle { bottom: 20px; right: 20px; }
  #samudra-concierge { bottom: 88px; right: 12px; max-width: calc(100vw - 24px); }
}
