/* atollrate — Maldives resort price index
   Design tokens carried over from the canvas export. */

:root {
  --bg: #04101a;
  --panel: #0a1b27;
  --line: #14293a;
  --line2: #1c3547;
  --chip: #07161f;
  --tag: #0f2431;
  --text: #eaf2f5;
  --muted: #8298a7;
  --dim: #617889;
  --accent: #35e0c6;
  --accentSoft: #08302c;
  --accentText: #8af2e2;
  --gold: #e9c98d;
  --on-accent: #04101a;
  --nav: rgba(4, 16, 26, 0.82);
  --scrim: rgba(4, 16, 26, 0.78);
  --shell: 1280px;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}

html[data-theme="light"] {
  --bg: #f5f8f9;
  --panel: #ffffff;
  --line: #e2eaee;
  --line2: #d3e0e5;
  --chip: #f1f5f7;
  --tag: #eef3f5;
  --text: #08202c;
  --muted: #5c7382;
  --dim: #7d919d;
  --accent: #0a9c87;
  --accentSoft: #e5f6f2;
  --accentText: #07806f;
  --gold: #a97c17;
  --on-accent: #ffffff;
  --nav: rgba(245, 248, 249, 0.86);
  --scrim: rgba(8, 32, 44, 0.72);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background .2s, color .2s;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accentText); }

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

img { max-width: 100%; display: block; }

.shell { max-width: var(--shell); margin: 0 auto; padding: 0 28px; }

.mono {
  font-family: var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--dim);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: var(--on-accent);
  padding: 12px 20px;
  border-radius: 0 0 10px 0;
  font-weight: 700;
}
.skip:focus { left: 0; }

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--nav);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav__in {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}
.brand__mark {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--text);
}
.brand__mark span { color: var(--accent); }
.brand__tag {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .2em;
  color: var(--dim);
  text-transform: uppercase;
  white-space: nowrap;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13.5px;
  color: var(--muted);
}
.live {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
  white-space: nowrap;
}
.live__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.8s ease-in-out infinite;
  flex: none;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .35; transform: scale(.7); }
}

.btn-ghost {
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line2);
  background: var(--chip);
  color: var(--text);
  transition: border-color .15s, color .15s;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- hero ---------- */

.hero { position: relative; height: 660px; overflow: hidden; }
.hero > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(4, 16, 26, .72) 0%,
    rgba(4, 16, 26, .15) 32%,
    rgba(4, 16, 26, .55) 68%,
    rgba(4, 16, 26, .94) 100%);
}
.hero__body {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 28px 64px;
  color: #eaf2f5;
}
.hero__eyebrow {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .24em;
  color: var(--accent);
  text-transform: uppercase;
}
.hero h1 {
  margin: 16px 0 0;
  font-size: clamp(34px, 6.2vw, 76px);
  line-height: .98;
  font-weight: 800;
  letter-spacing: -.04em;
  max-width: 900px;
  text-wrap: balance;
  color: #fff;
}
.hero__sub {
  margin: 20px 0 0;
  max-width: 560px;
  font-size: clamp(15px, 1.6vw, 17.5px);
  line-height: 1.6;
  color: #c2d2dc;
  text-wrap: pretty;
}
.hero__stats {
  margin-top: 36px;
  display: flex;
  gap: 44px;
  flex-wrap: wrap;
}
.stat__n {
  font-size: clamp(24px, 3.4vw, 32px);
  font-weight: 800;
  letter-spacing: -.03em;
}
.stat__n--accent { color: var(--accent); }
.stat__l {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .16em;
  color: #93a8b6;
}

/* ---------- generic section ---------- */

.section { max-width: var(--shell); margin: 0 auto; padding: 80px 28px 0; }
.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
h2 {
  margin: 0;
  font-size: clamp(23px, 3.2vw, 30px);
  font-weight: 800;
  letter-spacing: -.03em;
}
.section__note { font-size: 14px; color: var(--muted); }

/* ---------- featured ---------- */

.feat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.feat {
  border-radius: 18px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.feat__media { position: relative; height: 230px; }
.feat__media img { width: 100%; height: 100%; object-fit: cover; }
.feat__pill {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(4, 16, 26, .78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 999px;
  padding: 6px 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: #35e0c6;
}
.feat__body { padding: 18px 20px 20px; }
.feat__name { font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.feat__meta { margin-top: 4px; font-size: 13px; color: var(--muted); }
.feat__foot {
  margin-top: 16px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.feat__price { font-size: 27px; font-weight: 800; color: var(--accent); letter-spacing: -.02em; }
.feat__on { font-size: 12px; color: var(--muted); }
.feat__save { text-align: right; font-size: 12.5px; color: var(--gold); }

.feat-strip {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 18px;
}
.tile {
  position: relative;
  height: 300px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile__body {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(4, 16, 26, 0) 42%, rgba(4, 16, 26, .9) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  color: #eaf2f5;
}
.tile__eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  color: #35e0c6;
}
.tile__name { margin-top: 8px; font-size: 21px; font-weight: 800; letter-spacing: -.025em; color: #fff; }
.tile__meta { margin-top: 4px; font-size: 13.5px; color: #c2d2dc; }
.tile__meta b { color: #35e0c6; font-weight: 700; }

/* ---------- atoll cards ---------- */

.atoll-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.atoll-card {
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  padding: 16px 18px;
  border-radius: 14px;
  font-family: var(--sans);
  color: var(--text);
  transition: border-color .15s, background .15s;
  border: 1px solid var(--line);
  background: var(--panel);
}
.atoll-card:hover { border-color: var(--accent); }
.atoll-card[aria-pressed="true"] { border-color: var(--accent); background: var(--accentSoft); }
.atoll-card__n { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.atoll-card__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}
.atoll-card__c { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.atoll-card__p { font-size: 13.5px; font-weight: 700; color: var(--accent); }

/* ---------- filters ---------- */

.filters {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.filter-row { display: flex; align-items: flex-start; gap: 18px; }
.filter-row__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--dim);
  padding-top: 9px;
  width: 52px;
  flex: none;
}
.filter-row__set { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  cursor: pointer;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 999px;
  transition: border-color .15s, background .15s, color .15s;
  border: 1px solid var(--line2);
  background: var(--chip);
  color: var(--muted);
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 26px 2px 16px;
  flex-wrap: wrap;
}
.toolbar__count { font-size: 14px; color: var(--muted); }
.toolbar__count strong { color: var(--text); }
.toolbar__sort { display: flex; align-items: center; gap: 10px; }
select {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line2);
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  outline: none;
  cursor: pointer;
}

/* ---------- results ---------- */

.groups { display: flex; flex-direction: column; gap: 34px; }
.group__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  padding: 0 4px 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}
.group__head h3 { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -.015em; }
.group__sub { font-family: var(--mono); font-size: 11px; color: var(--dim); letter-spacing: .1em; }
.group__items { display: flex; flex-direction: column; gap: 12px; }

.row {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.row__top {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 18px 22px 14px;
}
.row__badge {
  flex: none;
  width: 50px;
  height: 50px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -.02em;
  color: var(--on-accent);
}
.row__id { flex: 1; min-width: 0; }
.row__namewrap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row__name { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.row__stars { font-family: var(--mono); font-size: 12px; color: var(--gold); }
.row__meta { margin-top: 5px; font-size: 13.5px; color: var(--muted); }
.row__pricing { text-align: right; flex: none; }
.row__cheapest {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  color: var(--dim);
}
.row__best {
  font-size: 29px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -.025em;
  line-height: 1.25;
}
.row__best small { font-size: 13px; font-weight: 500; color: var(--muted); }
.row__save { font-size: 12.5px; color: var(--muted); }

.providers {
  padding: 0 22px 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.prov {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 15px;
  border-radius: 11px;
  border: 1px solid var(--line2);
  background: var(--chip);
}
.prov--best { border-color: var(--accent); background: var(--accentSoft); }
.prov__n { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.prov--best .prov__n { color: var(--accentText); }
.prov__r { display: flex; align-items: center; gap: 6px; }
.prov__d { font-size: 10px; width: 12px; text-align: right; color: transparent; }
.prov__d--down { color: var(--accent); }
.prov__d--up { color: #f2907c; }
.prov__p { font-family: var(--mono); font-size: 14.5px; font-weight: 500; color: var(--text); }
.prov--best .prov__p { color: var(--accent); }

.row__tags {
  padding: 0 22px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.tag {
  font-size: 12px;
  font-weight: 500;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--tag);
  color: var(--muted);
  border: 1px solid var(--line2);
}

.empty { text-align: center; padding: 80px 20px; color: var(--dim); font-size: 15px; }

/* ---------- notice + footer ---------- */

.notice {
  max-width: var(--shell);
  margin: 72px auto 0;
  padding: 0 28px;
}
.notice__in {
  border: 1px solid var(--gold);
  background: var(--tag);
  border-radius: 16px;
  padding: 20px 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.notice__icon { font-size: 20px; line-height: 1.3; flex: none; }
.notice__t {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
}
.notice__p { margin: 8px 0 0; font-size: 14px; line-height: 1.65; color: var(--muted); }

.footer {
  max-width: var(--shell);
  margin: 64px auto 0;
  padding: 32px 28px 80px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.footer__brand { font-size: 20px; font-weight: 800; letter-spacing: -.03em; }
.footer__brand span { color: var(--accent); }
.footer__col { max-width: 640px; }
.footer__p {
  margin: 0;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.8;
  color: var(--dim);
}
.footer__p a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.footer__p a:hover { color: var(--accent); }

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
  .feat-grid > .feat:last-child { grid-column: 1 / -1; }
  .feat-strip { grid-template-columns: 1fr 1fr; }
  .feat-strip > .tile:first-child { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .shell, .nav__in, .hero__body, .section, .notice, .footer { padding-left: 20px; padding-right: 20px; }
  .hero { height: 78vh; min-height: 480px; }
  .hero__body { padding-bottom: 44px; }
  .hero__stats { gap: 28px; margin-top: 28px; }
  .section { padding-top: 60px; }
  .brand__tag { display: none; }
  .nav__links { gap: 14px; }

  .row__top { flex-wrap: wrap; gap: 14px; }
  .row__badge { width: 42px; height: 42px; border-radius: 11px; font-size: 14px; }
  .row__pricing { text-align: left; flex: 1 0 100%; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
  .row__cheapest { order: 1; }
  .row__best { order: 2; font-size: 25px; }
  .row__save { order: 3; }
  .providers { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .feat-grid { grid-template-columns: 1fr; }
  .feat-grid > .feat:last-child { grid-column: auto; }
  .feat-strip { grid-template-columns: 1fr; }
  .feat-strip > .tile:first-child { grid-column: auto; }
  .tile { height: 240px; }
  .atoll-grid { grid-template-columns: 1fr 1fr; }

  .nav__in { flex-wrap: wrap; gap: 10px; padding: 12px 20px; }
  .nav__links { width: 100%; justify-content: space-between; font-size: 13px; }

  .filters { padding: 16px; border-radius: 14px; }
  .filter-row { flex-direction: column; gap: 8px; }
  .filter-row__label { width: auto; padding-top: 0; }
  .chip { font-size: 12.5px; padding: 8px 13px; }

  .toolbar { align-items: flex-start; flex-direction: column; gap: 10px; }
  .providers { grid-template-columns: 1fr; }
  .notice__in { flex-direction: column; gap: 10px; padding: 18px; }
  .footer { flex-direction: column; gap: 18px; }
}

@media (max-width: 380px) {
  .atoll-grid { grid-template-columns: 1fr; }
}
