:root {
  --bg: #08090d;
  --surface: rgba(18, 20, 28, 0.86);
  --surface-strong: rgba(24, 26, 36, 0.96);
  --line: rgba(255, 255, 255, 0.1);
  --accent: #ff9f1c;
  --accent-2: #6ee7b7;
  --accent-3: #ff8fb8;
  --text: #ffffff;
  --text-muted: #a5adbd;
  --font: "Space Grotesk", system-ui, sans-serif;
  --section-pad: clamp(72px, 11vh, 130px) clamp(20px, 6vw, 120px);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

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

html {
  scroll-behavior: smooth;
  scrollbar-color: rgba(255, 159, 28, 0.3) var(--bg);
  scrollbar-width: thin;
}

body {
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 159, 28, 0.12), transparent 28%),
    radial-gradient(circle at 80% 22%, rgba(255, 143, 184, 0.08), transparent 24%),
    radial-gradient(circle at 62% 75%, rgba(110, 231, 183, 0.08), transparent 26%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  margin: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.site-header {
  align-items: center;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(8, 9, 13, 0.74);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  left: 0;
  min-height: 68px;
  padding: 16px clamp(20px, 5vw, 56px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  color: var(--accent);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0;
  text-decoration: none;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(10px, 2vw, 24px);
  justify-content: flex-end;
}

nav a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0;
  text-decoration: none;
  transition: color 0.25s ease;
  white-space: nowrap;
}

nav a:hover {
  color: var(--accent);
}

.section-band,
.accent-band {
  background: transparent;
}

.hero {
  min-height: calc(100vh - 68px);
  padding: var(--section-pad);
  padding-bottom: clamp(48px, 7vh, 78px);
}

.hero-grid {
  align-items: center;
  display: grid;
  gap: clamp(30px, 6vw, 72px);
  grid-template-columns: minmax(0, 1.02fr) minmax(300px, 0.98fr);
  margin: 0 auto;
  max-width: 1120px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 14px;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  letter-spacing: 0;
  line-height: 1.03;
  margin: 0;
}

h1 {
  font-size: clamp(2.7rem, 5.6vw, 5.2rem);
  max-width: 720px;
}

h2 {
  font-size: clamp(2rem, 4.8vw, 4.5rem);
}

h3 {
  font-size: clamp(1.08rem, 2vw, 1.45rem);
}

.lead {
  color: var(--text-muted);
  font-size: clamp(1.05rem, 1.5vw, 1.22rem);
  line-height: 1.72;
  margin: 26px 0 0;
  max-width: 700px;
}

.hero-visual {
  min-height: 440px;
}

.portugal-panel {
  background:
    radial-gradient(circle at 66% 25%, rgba(255, 159, 28, 0.18), transparent 26%),
    radial-gradient(circle at 34% 78%, rgba(255, 143, 184, 0.18), transparent 24%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  height: min(58vh, 560px);
  min-height: 390px;
  overflow: hidden;
  position: relative;
}

.portugal-panel::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 34%);
  content: "";
  inset: 0;
  position: absolute;
}

.map-heading {
  color: var(--text-muted);
  display: grid;
  gap: 3px;
  left: 24px;
  position: absolute;
  top: 22px;
  z-index: 2;
}

.map-heading span {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.map-heading strong {
  color: var(--text);
  font-size: 1.22rem;
}

.portugal-map {
  height: 88%;
  left: 50%;
  max-width: 88%;
  position: absolute;
  top: 54%;
  transform: translate(-50%, -50%);
}

.map-shape {
  fill: rgba(255, 255, 255, 0.06);
  stroke: rgba(255, 255, 255, 0.36);
  stroke-width: 2;
}

.coast-line {
  fill: none;
  stroke: rgba(255, 255, 255, 0.24);
  stroke-linecap: round;
  stroke-width: 3;
}

.map-marker circle {
  fill: var(--accent-3);
  stroke: #fff;
  stroke-width: 5;
}

.map-marker text {
  fill: var(--text);
  font-family: var(--font);
  font-size: 18px;
  font-weight: 600;
}

.map-marker text + text {
  fill: var(--accent-2);
  font-size: 16px;
}

.booking-card {
  background: rgba(8, 9, 13, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
  bottom: 22px;
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  position: absolute;
  right: 22px;
  z-index: 2;
}

.booking-card span {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.booking-card strong {
  color: var(--accent);
  font-size: 1.16rem;
}

.kpi-strip {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: clamp(28px, 5vw, 58px) auto 0;
  max-width: 1120px;
}

.kpi,
.chart-panel,
.detail-item,
.takeaways div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.kpi {
  min-height: 122px;
  padding: 18px;
}

.kpi span {
  color: var(--text-muted);
  display: block;
  font-size: 0.88rem;
}

.kpi strong {
  color: var(--text);
  display: block;
  font-size: clamp(1.55rem, 3vw, 2.45rem);
  line-height: 1.1;
  margin-top: 8px;
}

.story-section {
  display: grid;
  gap: clamp(26px, 5vw, 64px);
  grid-template-columns: minmax(260px, 0.58fr) minmax(0, 1fr);
  padding: var(--section-pad);
}

.section-copy {
  align-self: start;
  max-width: 500px;
  position: sticky;
  top: 96px;
}

.section-copy p:not(.eyebrow) {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.72;
  margin: 22px 0 0;
}

.chart-panel {
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.24);
  min-width: 0;
  padding: clamp(18px, 3vw, 28px);
}

.panel-heading {
  align-items: start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.panel-heading p {
  color: var(--text-muted);
  margin: 8px 0 0;
}

.select-label {
  color: var(--text-muted);
  display: grid;
  font-size: 0.86rem;
  gap: 6px;
  min-width: 180px;
}

select {
  appearance: none;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  min-height: 42px;
  padding: 8px 34px 8px 10px;
}

.chart {
  margin-top: 18px;
  min-height: 300px;
  position: relative;
}

.chart.tall {
  min-height: 430px;
}

svg {
  display: block;
  height: auto;
  max-width: 100%;
  overflow: visible;
}

.axis text,
.label,
.legend {
  fill: var(--text-muted);
  font-family: var(--font);
  font-size: 12px;
}

.axis line,
.axis path,
.grid line,
.grid {
  stroke: rgba(255, 255, 255, 0.1);
}

.bar-confirmed {
  fill: var(--accent-2);
}

.bar-canceled,
.highlight {
  fill: var(--accent-3);
}

.bar-context {
  fill: rgba(255, 159, 28, 0.18);
}

.line-secondary {
  fill: none;
  stroke: var(--accent-3);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.bubble {
  cursor: pointer;
  opacity: 0.84;
  stroke: rgba(255, 255, 255, 0.8);
  stroke-width: 2;
}

.bubble:hover,
.bubble.selected {
  opacity: 1;
  stroke: var(--text);
  stroke-width: 2.5;
}

.detail-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.detail-item {
  padding: 14px;
}

.detail-item span {
  color: var(--text-muted);
  display: block;
  font-size: 0.86rem;
}

.detail-item strong {
  color: var(--text);
  display: block;
  font-size: 1.35rem;
  margin-top: 4px;
}

.closing {
  padding: var(--section-pad);
}

.closing-copy {
  margin: 0 auto;
  max-width: 980px;
}

.closing-copy p:not(.eyebrow) {
  color: var(--text-muted);
  font-size: 1.12rem;
  line-height: 1.72;
  max-width: 780px;
}

.takeaways {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 32px;
}

.takeaways div {
  padding: 18px;
}

.takeaways strong,
.takeaways span {
  display: block;
}

.takeaways strong {
  color: var(--accent);
}

.takeaways span {
  color: var(--text-muted);
  margin-top: 6px;
}

.tooltip {
  background: rgba(24, 26, 36, 0.98);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 0.88rem;
  left: 0;
  max-width: 260px;
  opacity: 0;
  padding: 10px 12px;
  pointer-events: none;
  position: fixed;
  top: 0;
  transform: translate(-50%, calc(-100% - 12px));
  transition: opacity 140ms ease;
  z-index: 20;
}

.tooltip.visible {
  opacity: 1;
}

.load-error {
  background: rgba(255, 143, 184, 0.16);
  border: 1px solid rgba(255, 143, 184, 0.45);
  border-radius: 8px;
  color: var(--text);
  margin: 18px;
  padding: 12px 14px;
}

@media (max-width: 1024px) {
  .hero-grid,
  .story-section {
    grid-template-columns: 1fr;
  }

  .section-copy {
    max-width: 760px;
    position: static;
  }

  .hero {
    min-height: auto;
  }

  .hero-visual {
    min-height: 330px;
  }

  .portugal-panel {
    height: 380px;
    min-height: 330px;
  }

  .kpi-strip,
  .detail-grid,
  .takeaways {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    min-height: 92px;
  }

  nav {
    justify-content: flex-start;
  }

  .hero,
  .story-section,
  .closing {
    padding-left: 16px;
    padding-right: 16px;
  }

  .kpi-strip,
  .detail-grid,
  .takeaways {
    grid-template-columns: 1fr;
  }

  .panel-heading {
    display: block;
  }

  .select-label {
    margin-top: 14px;
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  .lisbon {
    left: 10%;
  }

  .algarve {
    right: 7%;
  }
}
