/* ---------- Colour options ----------
   Everything reads these variables. html[data-theme] picks white or black
   (set by js/config.js); .band flips a section to the cream palette on the
   black option, as the partners section does. */

:root,
[data-theme="light"] {
  --bg: #faf7f3;
  --fg: #111111;
  --muted: #55524d;
  --line: #e2ddd5;
  --field-bg: #ffffff;
  --field-line: #d9d3ca;
  --placeholder: #98928a;
  --hero-fade: 250, 247, 243;
  /* js/content.js replaces these two with the pictures chosen in the admin. */
  --hero-light: url("../images/hero-light.jpg");
  --hero-dark: url("../images/hero-dark.jpg");
  --hero-image: var(--hero-light);
  --hero-position: 88% center;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0e0e0d;
  --fg: #f5f0e8;
  --muted: #bdb7ae;
  --line: #3a3835;
  --field-bg: #1a1a18;
  --field-line: #3f3d39;
  --placeholder: #8a857d;
  --hero-fade: 14, 14, 13;
  --hero-image: var(--hero-dark);
  --hero-position: 92% 20%;
  color-scheme: dark;
}

/* While js/content.js fetches the admin's edits (at most ~1.5 s), the page
   stays faded out so the built-in text doesn't visibly swap. */
main,
.site-nav,
.site-footer {
  transition: opacity 0.25s ease;
}

.cms-loading main,
.cms-loading .site-nav,
.cms-loading .site-footer {
  opacity: 0;
}

[data-theme="dark"] .band {
  --bg: #f7f1ea;
  --fg: #111111;
  --muted: #55524d;
  --line: #e2ddd5;
}

:root {
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p,
ul {
  margin: 0;
}

/* Sections the admin switched off (js/content.js), whatever their display. */
[hidden] {
  display: none !important;
}

section[id],
article[id],
p[id] {
  scroll-margin-top: 96px;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Shared ---------- */

.wordmark {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  white-space: nowrap;
}

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 46px;
  padding: 11px 26px;
  border: 1px solid var(--fg);
  border-radius: 0;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
  transition: opacity 0.15s, background-color 0.15s, color 0.15s;
}

.btn-solid {
  background: var(--fg);
  color: var(--bg);
}

.btn-solid:hover {
  opacity: 0.85;
}

.btn-outline {
  background: transparent;
  color: var(--fg);
}

.btn-outline:hover {
  background: var(--fg);
  color: var(--bg);
}

/* On black, the mockup fills these buttons in cream instead of outlining them. */
[data-theme="dark"] .partners .btn-outline {
  background: var(--fg);
  color: var(--bg);
}

[data-theme="dark"] .partners .btn-outline:hover {
  opacity: 0.85;
}

.btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.btn:focus-visible,
a:focus-visible,
.modal-close:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}

.arrow {
  font-size: 18px;
  line-height: 1;
}

.btn-small {
  min-height: 40px;
  padding: 9px 20px;
  font-size: 12px;
  font-weight: 600;
}

.btn-block {
  width: 100%;
  margin-top: 24px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.site-nav {
  display: none;
}

.site-nav a {
  font-size: 15px;
}

.site-nav a:hover {
  opacity: 0.65;
}

.theme-toggle {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  transition: border-color 0.15s;
}

.theme-toggle:hover {
  border-color: var(--fg);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}

/* Shows what the button switches to: a moon on white, a sun on black. */
.icon-sun,
[data-theme="dark"] .icon-moon {
  display: none;
}

[data-theme="dark"] .icon-sun {
  display: block;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: flex;
  flex-direction: column-reverse;
}

.hero-image {
  aspect-ratio: 16 / 10;
  background: var(--hero-image) var(--hero-position) / cover no-repeat;
}

.hero-copy {
  position: relative;
  padding-top: 32px;
  padding-bottom: 40px;
}

.hero h1 {
  max-width: 13em;
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.hero-lead {
  max-width: 28em;
  margin-top: 20px;
  font-size: 17px;
  line-height: 1.6;
}

/* ---------- Roles ---------- */

.traveller {
  background: var(--bg);
  color: var(--fg);
  padding: 72px 0 80px;
}

.split {
  display: grid;
  gap: 32px;
  align-items: center;
}

.photo {
  position: relative;
  aspect-ratio: 19 / 10;
  overflow: hidden;
  background: var(--line);
}

.photo-wide {
  aspect-ratio: 5 / 3;
}

.photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.role h2 {
  margin-top: 14px;
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.role .lead {
  margin-top: 14px;
  font-size: 16px;
  line-height: 1.55;
}

.checks {
  display: grid;
  gap: 10px;
  margin-top: 24px;
  padding: 0;
  list-style: none;
}

.checks li {
  position: relative;
  padding-left: 38px;
  font-size: 16px;
}

/* A drawn check mark, so it follows the text colour in both options. */
.checks li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.32em;
  width: 13px;
  height: 7px;
  border-left: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
}

.role .btn {
  margin-top: 32px;
}

/* "For travellers", "For wellness experts & partners". */
.section-eyebrow {
  margin-bottom: 28px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.3em;
}

.partners {
  padding: 0;
  background: var(--bg);
  color: var(--fg);
}

.partners-intro {
  padding-top: 72px;
  text-align: center;
}

.partners-intro .section-eyebrow {
  margin-bottom: 12px;
}

.partners-intro h2 {
  max-width: 16em;
  margin: 0 auto;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

/* The black option: soft corners on pictures and buttons, as in the mockup. */
[data-theme="dark"] .photo,
[data-theme="dark"] .btn {
  border-radius: 4px;
}

.partners > .container {
  border-top: 1px solid var(--line);
}

[data-theme="dark"] .partners > .container {
  border-top: 0;
}

.pair {
  display: grid;
  gap: 0;
  padding: 48px 0 72px;
}

/* Stacked on phones: a rule and room between the two audiences. */
.pair .role + .role {
  margin-top: 56px;
  padding-top: 56px;
  border-top: 1px solid var(--line);
}

/* Equal-height columns, so the two buttons line up at the bottom. */
.pair .role {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.pair .photo {
  align-self: stretch;
  aspect-ratio: 3 / 2;
}

.pair .eyebrow {
  margin-top: 32px;
}

.pair .role .lead {
  margin-top: 16px;
}

.pair .checks {
  margin-bottom: 36px;
}

.pair .role .btn {
  margin-top: auto;
}

.statement {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  padding: 40px 0 64px;
  border-top: 1px solid var(--line);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-align: center;
}

/* Stacked on phones, where a slash would otherwise end a line. */
.statement {
  flex-direction: column;
  align-items: center;
}

.statement .slash {
  display: none;
  letter-spacing: 0;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-top: 28px;
  padding-bottom: 28px;
  text-align: center;
}

.footer-inner .wordmark {
  font-size: 15px;
  color: var(--fg);
}

.footer-inner a:not(.wordmark):hover {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ---------- Sign-up dialog ---------- */

.modal {
  width: calc(100% - 32px);
  max-width: 480px;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--bg);
  color: var(--fg);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
}

.modal::backdrop {
  background: rgba(10, 10, 10, 0.55);
  backdrop-filter: blur(2px);
}

.modal-inner {
  position: relative;
  padding: 32px 24px 28px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: none;
  font-size: 26px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}

.modal-close:hover {
  color: var(--fg);
}

.modal-title {
  padding-right: 32px;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.15;
}

.modal-intro {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

.fields {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.field {
  display: block;
  font-size: 13px;
  font-weight: 500;
}

.field .optional {
  font-weight: 400;
  color: var(--placeholder);
}

.field input,
.field select,
.field textarea {
  display: block;
  width: 100%;
  height: 48px;
  margin-top: 6px;
  padding: 0 14px;
  border: 1px solid var(--field-line);
  border-radius: 0;
  background: var(--field-bg);
  font-family: var(--sans);
  font-size: 15px;
  color: var(--fg);
  outline: none;
  transition: border-color 0.15s;
}

.field textarea {
  height: auto;
  min-height: 104px;
  padding: 12px 14px;
  line-height: 1.5;
  resize: vertical;
}

.field input::placeholder {
  color: var(--placeholder);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--fg);
}

.field.invalid input,
.field.invalid select,
.field.invalid textarea {
  border-color: #c2410c;
}

.form-error {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid #f3c4b4;
  background: #fdf0eb;
  font-size: 14px;
  color: #9a3412;
}

.form-note {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.form-note a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.modal-done-text {
  margin-top: 14px;
  font-size: 16px;
  line-height: 1.55;
}

/* ---------- Legal pages ---------- */

.legal {
  max-width: 760px;
  padding-top: 48px;
  padding-bottom: 72px;
}

.legal h1 {
  margin-top: 12px;
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 400;
  line-height: 1.1;
}

.legal .updated {
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
}

.legal h2 {
  margin-top: 40px;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.25;
}

.legal p,
.legal ul {
  margin-top: 14px;
  color: var(--muted);
}

.legal ul {
  padding-left: 20px;
}

.legal li + li {
  margin-top: 6px;
}

.legal strong {
  font-weight: 500;
  color: var(--fg);
}

.legal a {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal address {
  margin-top: 14px;
  font-style: normal;
  line-height: 1.8;
}

/* ---------- Tablet and up ---------- */

@media (min-width: 768px) {
  .container {
    padding: 0 40px;
  }

  .header-inner {
    min-height: 80px;
  }

  .wordmark {
    font-size: 22px;
  }

  .hero {
    display: block;
    min-height: 460px;
  }

  .hero-image {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
  }

  /* Fades the photo into the page colour behind the headline. */
  .hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
      to right,
      rgba(var(--hero-fade), 0.92) 0%,
      rgba(var(--hero-fade), 0.7) 38%,
      rgba(var(--hero-fade), 0) 62%
    );
  }

  .hero-copy {
    z-index: 2;
    padding-top: 56px;
    padding-bottom: 72px;
  }

  .hero h1 {
    max-width: 11.5em;
    font-size: 44px;
  }

  .hero-lead {
    max-width: 26em;
  }

  .traveller {
    padding: 104px 0 112px;
  }

  .partners-intro {
    padding-top: 112px;
  }

  .partners-intro h2 {
    font-size: 32px;
  }

  .split {
    grid-template-columns: 1.05fr 1fr;
    gap: 52px;
  }

  .role h2 {
    font-size: 30px;
  }

  .pair {
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 64px 0 88px;
  }

  .pair .role + .role {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }

  .pair .role:first-child {
    padding-right: 48px;
    border-right: 1px solid var(--line);
  }

  .pair .role:last-child {
    padding-left: 48px;
  }

  .statement {
    flex-direction: row;
    gap: 8px 32px;
    padding: 52px 0 96px;
    font-size: 22px;
    letter-spacing: 0.34em;
  }

  .statement .slash {
    display: inline;
  }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
  }

  .modal-inner {
    padding: 36px 36px 30px;
  }

  .legal h1 {
    font-size: 52px;
  }
}

@media (min-width: 1024px) {
  .site-nav {
    display: flex;
    gap: 32px;
    margin-left: auto;
    margin-right: 12px;
  }

  .theme-toggle {
    margin-left: 0;
  }

  .hero {
    min-height: 520px;
  }

  .hero-copy {
    padding-top: 72px;
  }

  .role h2 {
    font-size: 32px;
  }

  .hero h1 {
    font-size: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}
