/* ── Fiji Tourism Guide ── Design System ── */
:root {
  /* Tropical palette */
  --ocean-deep: #0a7e8c;
  --ocean-mid: #1493a5;
  --ocean-light: #b8e4ec;
  --ocean-pale: #e2f4f7;

  --sunset: #e8753c;
  --sunset-warm: #f08945;
  --sunset-pale: #fde8de;

  --sand: #f2d398;
  --sand-light: #f8e8c8;
  --sand-pale: #fdf5e6;

  --coral: #d4534a;
  --palm: #2d8a4e;
  --palm-light: #c8e6d0;

  /* Surfaces &amp; text */
  --bg: #fefaf3;
  --surface: #ffffff;
  --text: #0d2620;
  --muted: #5a7d76;
  --muted-light: #8ca8a2;
  --line: rgba(10, 126, 140, 0.12);
  --line-strong: rgba(10, 126, 140, 0.22);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --max-width: 1060px;

  --shadow-card: 0 2px 12px rgba(10, 126, 140, 0.06), 0 8px 28px rgba(10, 126, 140, 0.04);
  --shadow-elevated: 0 4px 20px rgba(10, 126, 140, 0.08), 0 12px 40px rgba(10, 126, 140, 0.05);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: "DM Sans", sans-serif;
  font-weight: 400;
  letter-spacing: -0.01em;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  margin: 0;
}

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0;
  color: var(--text);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin-bottom: 20px; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); margin-bottom: 16px; }
h3 { font-size: 1.25rem; margin-bottom: 8px; }

p { margin: 0; color: var(--muted); line-height: 1.65; }

/* ── Links ── */
a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

/* ── Buttons ── */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border: 1.5px solid var(--ocean-deep);
  background: transparent;
  color: var(--ocean-deep);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  font-family: "DM Sans", sans-serif;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(10, 126, 140, 0.15);
}

.button-primary {
  background: var(--ocean-deep);
  color: #ffffff;
  border-color: var(--ocean-deep);
  box-shadow: 0 4px 14px rgba(10, 126, 140, 0.25);
}

.button-primary:hover {
  background: #086b78;
  border-color: #086b78;
  color: #ffffff;
  box-shadow: 0 6px 22px rgba(10, 126, 140, 0.35);
}

.button-sunset {
  background: var(--sunset);
  color: #ffffff;
  border-color: var(--sunset);
  box-shadow: 0 4px 14px rgba(232, 117, 60, 0.22);
}

.button-sunset:hover {
  background: #d46530;
  border-color: #d46530;
  color: #ffffff;
  box-shadow: 0 6px 22px rgba(232, 117, 60, 0.32);
}

.button-ocean {
  color: var(--ocean-deep);
  border-color: var(--ocean-deep);
  background: rgba(10, 126, 140, 0.05);
}

.button-ocean:hover {
  background: rgba(10, 126, 140, 0.1);
  color: #075b65;
  border-color: #075b65;
}

.button-ghost {
  border-color: transparent;
  background: transparent;
  color: var(--ocean-deep);
}

.button-ghost:hover {
  background: rgba(10, 126, 140, 0.08);
  color: #075b65;
  box-shadow: none;
}

.button-secondary {
  border-color: var(--line);
  background: var(--surface);
}

.button-block {
  width: 100%;
}

/* ── Layout ── */
.page-shell {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
}

.section {
  padding: 80px 0;
}

.section-heading {
  text-align: center;
  margin-bottom: 48px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.section-heading p {
  font-size: 1.08rem;
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--sunset);
}

/* ── Header ── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 40px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: flex;
  align-items: center;
  color: var(--ocean-deep);
}

.brand-mark svg {
  width: 36px;
  height: 36px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: "Playfair Display", serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
}

.brand-tag {
  font-size: 0.72rem;
  color: var(--muted-light);
  letter-spacing: 0.03em;
}

.site-nav {
  display: flex;
  gap: 28px;
}

.site-nav a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
}

.site-nav a:hover {
  color: var(--ocean-deep);
}

/* ── Hero ── */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
  padding-top: 60px;
  padding-bottom: 100px;
}

.hero-copy h1 {
  background: linear-gradient(135deg, var(--text) 0%, #0a5e6a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-lead {
  font-size: 1.15rem;
  max-width: 44ch;
  margin-bottom: 36px;
  color: var(--muted);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-stage {
  position: relative;
}

.stage-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.island-card {
  display: flex;
  flex-direction: column;
}

.stage-decoration {
  position: relative;
  height: 160px;
  background: linear-gradient(180deg, #c8eef7 0%, #e2f4f7 40%, var(--sand-pale) 70%, var(--sand-light) 100%);
  overflow: hidden;
}

/* Ocean waves */
.wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  height: 48px;
  opacity: 0.4;
}

.wave-1 {
  bottom: 24px;
  background: linear-gradient(90deg, var(--ocean-mid) 25%, var(--ocean-deep) 50%, var(--ocean-mid) 75%);
  border-radius: 50% 50% 0 0;
  animation: waveFloat 6s ease-in-out infinite;
}

.wave-2 {
  bottom: 12px;
  background: linear-gradient(90deg, var(--ocean-light) 25%, var(--ocean-mid) 50%, var(--ocean-light) 75%);
  border-radius: 50% 50% 0 0;
  opacity: 0.5;
  animation: waveFloat 4.5s ease-in-out infinite reverse;
}

.wave-3 {
  bottom: 0;
  background: linear-gradient(90deg, var(--ocean-pale) 25%, var(--ocean-light) 50%, var(--ocean-pale) 75%);
  border-radius: 50% 50% 0 0;
  opacity: 0.6;
  animation: waveFloat 5s ease-in-out infinite;
}

@keyframes waveFloat {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-15px); }
}

/* Sun */
.sun-circle {
  position: absolute;
  top: 28px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, var(--sand) 0%, var(--sunset-warm) 100%);
  box-shadow: 0 0 40px rgba(232, 117, 60, 0.3), 0 0 80px rgba(242, 211, 152, 0.2);
  animation: sunPulse 3s ease-in-out infinite;
}

@keyframes sunPulse {
  0%, 100% { box-shadow: 0 0 40px rgba(232, 117, 60, 0.3), 0 0 80px rgba(242, 211, 152, 0.2); }
  50% { box-shadow: 0 0 50px rgba(232, 117, 60, 0.4), 0 0 100px rgba(242, 211, 152, 0.3); }
}

/* Island silhouette */
.island-silhouette {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 40px;
  background: var(--palm);
  border-radius: 50% 50% 0 0;
  opacity: 0.8;
}

.island-silhouette::after {
  content: '';
  position: absolute;
  top: -30px;
  left: 30px;
  width: 4px;
  height: 30px;
  background: var(--palm);
  border-radius: 2px 2px 40% 40%;
}

.stage-content {
  padding: 28px 32px;
}

.card-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--ocean-deep);
  margin-bottom: 16px;
}

.signal-grid {
  display: grid;
  gap: 14px;
}

.signal-grid article {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.signal-grid article:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.signal-grid article strong {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 4px;
  color: var(--text);
}

.signal-grid article p {
  font-size: 0.85rem;
}

/* ── About Section ── */
.about-section {
  background: linear-gradient(180deg, var(--surface) 0%, var(--ocean-pale) 100%);
  border-radius: var(--radius-xl);
  margin: 0 -16px;
  padding: 80px 40px;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.about-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.about-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-elevated);
}

.about-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.about-card h3 {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  margin-bottom: 12px;
}

.about-card p {
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ── Feature Cards ── */
#features .section-heading {
  margin-bottom: 40px;
}

.feature-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-elevated);
  border-color: var(--ocean-light);
}

.feature-icon {
  display: block;
  font-size: 2rem;
  margin-bottom: 14px;
}

.feature-card h3 {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--muted);
}

/* ── Try the AI Guide ── */
.try-guide-section {
  background: linear-gradient(135deg, var(--ocean-pale) 0%, var(--sand-pale) 100%);
  border-radius: var(--radius-xl);
  margin: 0 -16px;
  padding: 80px 40px;
}

.try-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 36px;
  align-items: start;
}

.try-chat-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.try-chat-header {
  background: var(--ocean-deep);
  color: #ffffff;
  padding: 14px 20px;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--palm-light);
  box-shadow: 0 0 6px rgba(45, 138, 78, 0.5);
}

.try-chat-body {
  padding: 24px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chat-bubble {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.chat-received {
  align-self: flex-start;
  background: var(--ocean-pale);
  color: var(--text);
  border-bottom-left-radius: 6px;
}

.chat-sent {
  align-self: flex-end;
  background: var(--sand-light);
  color: var(--text);
  border-bottom-right-radius: 6px;
}

.try-chat-prompts {
  margin-top: 8px;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius);
}

.try-chat-prompts span {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.prompt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.prompt-chip {
  display: inline-block;
  padding: 6px 14px;
  font-size: 0.8rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--ocean-deep);
  font-weight: 500;
}

.try-chat-footer {
  padding: 14px 24px;
  background: var(--bg);
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

.try-channels {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.try-channels h3 {
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.channel-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.channel-icon {
  font-size: 1.1rem;
}

.channel-note {
  font-size: 0.82rem;
  color: var(--muted-light);
  text-align: center;
}

/* ── Partner Section ── */
.partner-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items: start;
}

.partner-copy {
  padding: 8px;
}

.partner-copy p {
  margin-bottom: 16px;
  line-height: 1.65;
}

.partner-benefits {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.partner-benefits li {
  padding: 6px 0;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.5;
}

.contact-note {
  margin-top: 20px;
  font-size: 0.9rem;
}

.contact-note a {
  color: var(--ocean-deep);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-note a:hover {
  color: #075b65;
}

.partner-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-card);
}

.partner-form h3 {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  font-size: 1.3rem;
  margin-bottom: 24px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.field-full {
  grid-column: 1 / -1;
}

.partner-form label {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.88rem;
}

.partner-form span {
  font-size: 0.84rem;
}

.partner-form input,
.partner-form select,
.partner-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  background: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: "DM Sans", sans-serif;
}

.partner-form input:focus,
.partner-form select:focus,
.partner-form textarea:focus {
  outline: none;
  border-color: var(--ocean-mid);
  box-shadow: 0 0 0 3px rgba(10, 126, 140, 0.1);
}

.form-footer {
  margin-top: 20px;
}

.form-status {
  min-height: 24px;
  margin-top: 12px;
  font-size: 0.9rem;
}

.form-status[data-tone="success"] {
  color: var(--palm);
}

.form-status[data-tone="error"] {
  color: var(--coral);
}

/* ── Footer ── */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 48px 0;
  border-top: 1px solid var(--line);
  margin-top: 80px;
  font-size: 0.84rem;
  color: var(--muted-light);
}

.footer-links {
  display: flex;
  gap: 24px;
  font-size: 0.84rem;
}

.footer-links a {
  color: var(--muted-light);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--ocean-deep);
}

.site-footer strong {
  color: var(--ocean-deep);
  font-weight: 600;
}

/* ── Clero Embedded Chat Widget ── */
.clero-chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
}

.clero-chat-widget iframe {
  display: none;
  background: white;
}

.clero-chat-widget.is-active iframe {
  display: block;
}

.clero-chat-toggle {
  width: 60px;
  height: 60px;
  border-radius: 999px;
  background: var(--ocean-deep);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(10, 126, 140, 0.2);
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s;
}

.clero-chat-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 28px rgba(10, 126, 140, 0.3);
}

.clero-chat-toggle svg {
  width: 28px;
  height: 28px;
}

/* ── Legal pages ── */
.legal-page .site-header {
  padding-top: 18px;
}

.legal-shell {
  padding: clamp(28px, 4vw, 40px);
  border-radius: var(--radius-xl);
}

.legal-meta {
  margin-top: 14px;
}

.legal-section {
  margin-top: 28px;
}

.legal-section h2 {
  font-size: clamp(1.5rem, 3vw, 2.05rem);
  margin-bottom: 10px;
}

/* ── Responsive ── */
@media (max-width: 1080px) {
  .hero,
  .partner-panel,
  .try-grid {
    grid-template-columns: 1fr;
  }

  .feature-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .site-header,
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .site-nav {
    display: none;
  }

  .about-grid,
  .feature-cards {
    grid-template-columns: 1fr;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .about-section,
  .try-guide-section {
    margin: 0;
    border-radius: var(--radius-lg);
    padding: 48px 24px;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(calc(100% - 20px), var(--max-width));
  }

  .section {
    padding: 40px 0;
  }

  .hero {
    padding-top: 24px;
    padding-bottom: 40px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .button {
    width: 100%;
  }

  .button {
    width: 100%;
  }

  .stage-decoration {
    height: 120px;
  }

  .about-section,
  .try-guide-section {
    padding: 40px 20px;
    margin: 0;
    border-radius: var(--radius);
  }

  .partner-form {
    padding: 24px 20px;
  }
}

@media (max-width: 480px) {
  .clero-chat-widget {
    bottom: 12px;
    right: 12px;
  }
  .clero-chat-widget iframe {
    width: calc(100vw - 24px) !important;
    height: calc(100vh - 120px) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button {
    transition: none;
  }

  .wave-1,
  .wave-2,
  .wave-3,
  .sun-circle {
    animation: none;
  }

  .about-card:hover,
  .feature-card:hover {
    transform: none;
  }
}
