/* =========================================================================
   Maldives Traveller Declaration — stylesheet
   Palette drawn from the national flag: green #007E3A, red #D21034,
   plus a lagoon blue used for surfaces and links.
   ========================================================================= */

:root {
  --green: #007E3A;
  --green-deep: #04602d;
  --red: #D21034;
  --red-deep: #a70c28;
  --lagoon: #0f7f95;
  --sand: #f6f4ef;
  --surface: #ffffff;
  --surface-alt: #f1f6f3;
  --ink: #16211c;
  --ink-soft: #4d5a54;
  --line: #dce4df;

  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;

  --shadow-s: 0 1px 2px rgba(16, 33, 26, .06), 0 2px 8px rgba(16, 33, 26, .05);
  --shadow-m: 0 8px 30px rgba(16, 33, 26, .10);

  --gap: clamp(1rem, 3vw, 2rem);
  --block: clamp(3rem, 7vw, 5.5rem);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* `clip` rather than `hidden`: it contains stray overflow without turning the
   body into a scroll container, which would break position: sticky. */
html, body { max-width: 100%; overflow-x: clip; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(1rem, .97rem + .15vw, 1.0625rem);
  line-height: 1.65;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -.015em;
  text-wrap: balance;
}
h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem); }
h2 { font-size: clamp(1.45rem, 1.1rem + 1.4vw, 2.05rem); }
h3 { font-size: clamp(1.15rem, 1rem + .6vw, 1.4rem); }

p { margin: 0 0 1.1em; }
a { color: var(--lagoon); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--green-deep); }
img, svg, video { max-width: 100%; height: auto; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
::selection { background: rgba(0, 126, 58, .18); }

:focus-visible {
  outline: 3px solid var(--lagoon);
  outline-offset: 2px;
  border-radius: 3px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: .5rem;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: .6rem 1rem;
  border-radius: var(--radius-s);
}
.skip-link:focus { left: .5rem; }

/* ---- Layout primitives -------------------------------------------------- */

.wrap {
  width: min(100% - 2.5rem, 1160px);
  margin-inline: auto;
}
.wrap--reading { width: min(100% - 2.5rem, 760px); }

.eyebrow {
  margin: 0 0 .6rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--green);
}

/* ---- Buttons ------------------------------------------------------------ */

.btn {
  --btn-bg: var(--green);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .72rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 650;
  font-size: .97rem;
  text-decoration: none;
  transition: transform .14s ease, box-shadow .14s ease, background-color .14s ease;
}
.btn:hover { color: var(--btn-fg); transform: translateY(-1px); box-shadow: var(--shadow-m); }
.btn:active { transform: translateY(0); }
.btn--accent { --btn-bg: var(--red); }
.btn--accent:hover { --btn-bg: var(--red-deep); }
.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: #fff;
  border-color: rgba(255, 255, 255, .55);
  backdrop-filter: blur(3px);
}
.btn--ghost:hover { --btn-bg: rgba(255, 255, 255, .14); }
.btn--quiet {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  border-color: var(--line);
}
.btn--quiet:hover { --btn-bg: var(--surface-alt); }
.btn--sm { padding: .48rem 1rem; font-size: .88rem; }
.btn--lg { padding: .9rem 1.7rem; font-size: 1.03rem; }
.btn--block { display: flex; width: 100%; }

.ticks { list-style: none; margin: 0 0 1.6rem; padding: 0; display: grid; gap: .45rem; }
.ticks li { position: relative; padding-left: 1.7rem; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .48em;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7'/%3E%3C/svg%3E") center / 68% no-repeat;
}
.ticks--inline { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }

/* ---- Header ------------------------------------------------------------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-head__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
  padding-block: .6rem;
}

.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: inherit; min-width: 0; }
.brand__mark { border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); flex: none; }
.brand__text { display: grid; min-width: 0; }
.brand__name { font-weight: 750; font-size: 1.02rem; line-height: 1.2; letter-spacing: -.02em; }
.brand__tag { font-size: .76rem; color: var(--ink-soft); line-height: 1.3; }

.site-nav { display: flex; align-items: center; gap: .4rem 1.1rem; flex-wrap: wrap; justify-content: flex-end; }
.site-nav__link {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: .93rem;
  padding: .3rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav__link:hover { color: var(--green-deep); border-bottom-color: var(--green); }

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface);
}
.lang-switch__opt {
  padding: .3rem .68rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--ink-soft);
  text-decoration: none;
}
.lang-switch__opt + .lang-switch__opt { border-left: 1px solid var(--line); }
.lang-switch__opt:hover { background: var(--surface-alt); color: var(--ink); }
.lang-switch__opt.is-current { background: var(--green); color: #fff; }

@media (max-width: 720px) {
  .brand__tag { display: none; }
  .site-nav__link { display: none; }
  .brand__name { font-size: .93rem; }
}
/* Below this width the brand wordmark and the CTA cannot both fit on one line,
   so the logo keeps its space and the nav sits on the row underneath. */
@media (max-width: 480px) {
  .site-head__inner { flex-wrap: wrap; justify-content: flex-start; }
  .brand { flex: 1 1 100%; }
  .site-nav { flex: 1 1 100%; justify-content: space-between; padding-bottom: .2rem; }
}

/* ---- Hero --------------------------------------------------------------- */

.hero { position: relative; color: #fff; isolation: isolate; }
.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(4, 40, 30, .74), rgba(4, 40, 30, .58)),
    url("https://images.unsplash.com/photo-1514282401047-d79a71a590e8?auto=format&fit=crop&w=1600&q=68") center / cover no-repeat;
}
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 80% at 15% 10%, rgba(0, 126, 58, .38), transparent 60%);
}
.hero__inner {
  display: grid;
  gap: var(--gap);
  padding-block: var(--block);
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 940px) {
  .hero__inner { grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 4vw, 3.5rem); }
}
.hero__copy .eyebrow { color: #a9e9c3; }
.hero__lead { font-size: clamp(1.02rem, .95rem + .4vw, 1.2rem); max-width: 34em; color: rgba(255, 255, 255, .93); }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; }

.hero__panel {
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius-l);
  padding: clamp(1.4rem, 3vw, 2.1rem);
  box-shadow: var(--shadow-m);
}
.hero__panel > h2 { font-size: 1.35rem; margin-bottom: 1.1rem; }

.steps { list-style: none; margin: 0 0 1.3rem; padding: 0; display: grid; gap: .95rem; }
.steps__item {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: start;
  gap: .8rem;
  padding: .85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--surface-alt);
}
.steps__num {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: .85rem;
  font-weight: 750;
}
.steps__icon { color: var(--green); display: grid; place-items: center; width: 1.75rem; height: 1.75rem; }
.steps__icon svg { width: 100%; height: 100%; }
.steps__body { display: grid; gap: .1rem; font-size: .93rem; }
.steps__label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.steps__body strong { font-size: 1rem; }
.steps__body > span:last-child { color: var(--ink-soft); }

/* ---- Facts strip -------------------------------------------------------- */

.facts { background: var(--green-deep); color: #fff; padding-block: clamp(2rem, 4vw, 3rem); }
.facts__title { font-size: 1.15rem; text-align: center; margin-bottom: 1.6rem; color: rgba(255, 255, 255, .85); font-weight: 600; }
.facts__grid {
  margin: 0;
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  text-align: center;
}
.facts__cell dt { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); font-weight: 800; letter-spacing: -.02em; }
.facts__cell dd { margin: .2rem 0 0; font-size: .9rem; color: rgba(255, 255, 255, .8); }

/* ---- Long-form prose ---------------------------------------------------- */

.explainer { padding-block: var(--block); }
.explainer__title { margin-bottom: 1.2rem; }

.prose { font-size: 1.03rem; }
.prose > *:first-child { margin-top: 0; }
.prose h2 { margin-top: 2.4rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.prose h3 { margin-top: 1.9rem; }
.prose ul, .prose ol { margin: 0 0 1.3em; padding-left: 1.35em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--green); font-weight: 700; }
.prose strong { font-weight: 700; }

.prose blockquote {
  margin: 1.8rem 0;
  padding: 1rem 1.3rem;
  border-left: 4px solid var(--green);
  background: var(--surface-alt);
  border-radius: 0 var(--radius-m) var(--radius-m) 0;
  color: var(--ink);
}
.prose blockquote p:last-child { margin-bottom: 0; }

.prose figure { margin: 2rem 0; }
.prose figure img { width: 100%; border-radius: var(--radius-m); border: 1px solid var(--line); background: var(--sand); }
.prose figcaption { margin-top: .55rem; font-size: .85rem; color: var(--ink-soft); text-align: center; }

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.8rem 0;
  font-size: .93rem;
}
.prose table :is(th, td) { padding: .65rem .8rem; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose thead th { background: var(--surface-alt); font-weight: 700; }
.prose tbody tr:nth-child(even) { background: rgba(241, 246, 243, .55); }

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .88em;
  background: var(--surface-alt);
  padding: .12em .38em;
  border-radius: 4px;
}

/* Tables scroll inside their own box rather than pushing the page sideways.
   site.js wraps each .prose table in .table-scroll; the media query below is
   the no-JS fallback. */
.table-scroll {
  overflow-x: auto;
  margin: 1.8rem 0;
  border-radius: var(--radius-s);
  -webkit-overflow-scrolling: touch;
}
.table-scroll table { margin: 0; min-width: 34rem; }

@media (max-width: 640px) {
  .prose > table { display: block; overflow-x: auto; }
}

/* ---- Callout notes ------------------------------------------------------ */

.note {
  margin: 2rem 0;
  padding: 1.15rem 1.3rem;
  border-radius: var(--radius-m);
  border: 1px solid var(--line);
  background: var(--surface-alt);
}
.note p:last-child, .note > *:last-child { margin-bottom: 0; }
.note strong { display: block; margin-bottom: .35rem; font-size: 1.02rem; }
.note--tip { border-left: 5px solid var(--lagoon); background: #eef7f9; }
.note--cta {
  border: 0;
  background: linear-gradient(135deg, var(--green-deep), var(--lagoon));
  color: #fff;
  text-align: center;
  padding: 1.7rem 1.4rem;
}
.note--cta a:not(.btn) { color: #fff; }
.note--cta .btn { margin-top: .6rem; }

/* ---- Cards -------------------------------------------------------------- */

.latest, .index-list { padding-block: var(--block); }
.latest { background: var(--sand); }
.latest__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.6rem;
}
.latest__head h2 { margin: 0; }
.link-more { font-weight: 650; font-size: .95rem; text-decoration: none; }
.link-more:hover { text-decoration: underline; }

.card-grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  overflow: hidden;
  box-shadow: var(--shadow-s);
  transition: transform .16s ease, box-shadow .16s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-m); }
.card__media { display: block; aspect-ratio: 16 / 9; background: var(--surface-alt); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; flex: 1; }
.card__date { font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); }
.card__body h2, .card__body h3 { font-size: 1.13rem; margin: .4rem 0 .5rem; }
.card__body :is(h2, h3) a { color: inherit; text-decoration: none; }
.card__body :is(h2, h3) a:hover { color: var(--green-deep); }
.card__body p { font-size: .93rem; color: var(--ink-soft); margin-bottom: 1rem; }
.card__more { margin-top: auto; font-size: .88rem; font-weight: 650; color: var(--green); }

/* ---- Guide index head --------------------------------------------------- */

.index-head { padding-block: var(--block) 0; }
.index-head__lead { font-size: 1.08rem; color: var(--ink-soft); max-width: 40em; }

.strip { padding-bottom: var(--block); }

/* ---- Article ------------------------------------------------------------ */

.article { padding-block: clamp(1.5rem, 4vw, 2.6rem) var(--block); }
.crumbs { font-size: .85rem; color: var(--ink-soft); margin-bottom: 1.4rem; display: flex; gap: .5rem; flex-wrap: wrap; }
.crumbs a { color: var(--ink-soft); text-decoration: none; }
.crumbs a:hover { color: var(--green-deep); text-decoration: underline; }

.article__head { margin-bottom: 2.2rem; }
.article__meta { font-size: .82rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-soft); margin-bottom: .6rem; }
.article__standfirst { font-size: 1.12rem; color: var(--ink-soft); margin-bottom: 0; }

.article__foot {
  margin-top: 3rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--line);
  display: flex;
  gap: .8rem;
  flex-wrap: wrap;
}

/* ---- FAQ (native disclosure, no JS) ------------------------------------- */

.faq { padding-block: var(--block); background: var(--sand); }
.faq__title { margin-bottom: 1.5rem; }
.faq__list { display: grid; gap: .7rem; }
.faq__item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  overflow: hidden;
}
.faq__q {
  cursor: pointer;
  list-style: none;
  padding: 1rem 3rem 1rem 1.2rem;
  font-weight: 650;
  position: relative;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after {
  content: "";
  position: absolute;
  right: 1.2rem;
  top: 50%;
  width: .7rem;
  height: .7rem;
  margin-top: -.45rem;
  border-right: 2.5px solid var(--green);
  border-bottom: 2.5px solid var(--green);
  transform: rotate(45deg);
  transition: transform .18s ease;
}
.faq__item[open] .faq__q::after { transform: rotate(-135deg); margin-top: -.15rem; }
.faq__q:hover { background: var(--surface-alt); }
.faq__a { padding: 0 1.2rem 1.1rem; color: var(--ink-soft); }
.faq__a p:last-child { margin-bottom: 0; }

/* ---- Embedded form pages ------------------------------------------------ */

.embed-head { padding-block: var(--block) 1.5rem; background: var(--surface-alt); text-align: center; }
.embed-head .ticks--inline { justify-content: center; margin-bottom: 0; }
.embed-head p { color: var(--ink-soft); }
.embed-shell { padding-block: 2rem var(--block); }
.embed-shell .wrap { max-width: 900px; }

/* ---- Footer ------------------------------------------------------------- */

.site-foot {
  background: #10251d;
  color: rgba(255, 255, 255, .78);
  padding-block: var(--block) 2rem;
  font-size: .92rem;
}
.site-foot a { color: rgba(255, 255, 255, .82); text-decoration: none; }
.site-foot a:hover { color: #fff; text-decoration: underline; }
.site-foot__grid {
  display: grid;
  gap: 2.2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) { .site-foot__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .site-foot__grid { grid-template-columns: 1.6fr .8fr .8fr 1.4fr; } }

.brand--foot .brand__name { color: #fff; }
.brand--foot .brand__tag { color: rgba(255, 255, 255, .6); display: block; }

.trust { display: flex; gap: .9rem; align-items: flex-start; margin: 1.4rem 0 1.2rem; }
.trust__seal { flex: none; border-radius: 6px; }
.trust p { margin: 0; font-size: .84rem; color: rgba(255, 255, 255, .68); }

.pay-row__label { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: rgba(255, 255, 255, .5); margin-bottom: .5rem; }
.pay-row { display: flex; flex-wrap: wrap; gap: .45rem; }
/* Each card SVG paints its own full-bleed background, so no padding or backing
   colour here — that would show as a white halo. Just round off the corners. */
.pay-row__card {
  display: block;
  border-radius: 5px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12);
}

.site-foot__col h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: #fff; margin-bottom: .9rem; }
.site-foot__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.site-foot__help p { font-size: .86rem; }
.site-foot__notice { font-size: .79rem; color: rgba(255, 255, 255, .6); line-height: 1.6; }
.site-foot__notice a { text-decoration: underline; }

.legal {
  margin: 2.5rem 0 0;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, .13);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.legal small { font-size: .76rem; color: rgba(255, 255, 255, .5); line-height: 1.6; max-width: 70ch; }

/* ---- Print -------------------------------------------------------------- */

@media print {
  .site-head, .site-foot, .article__foot, .note--cta, .skip-link { display: none !important; }
  body { color: #000; font-size: 11pt; }
  .prose a::after { content: " (" attr(href) ")"; font-size: .85em; color: #555; }
}
