:root {
  color-scheme: light;
  --ocean: #083046;
  --deep: #0d3445;
  --water: #00615f;
  --muted: #4e6769;
  --paper: #fffdf8;
  --sand: #f2e9d9;
  --line: #c5d3cc;
  --foam: #bce8dd;
  --rust: #9a3e11;
  --orange: #cb541c;
  --wrap: min(100% - 6rem, 78rem);
  --serif: Georgia, "Times New Roman", serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--deep); background: var(--paper); font: 1rem/1.65 "Segoe UI", system-ui, sans-serif; }
a { color: var(--rust); text-underline-offset: .22em; }
a:hover { color: var(--water); }
:focus-visible { outline: 3px solid #00776c; outline-offset: 4px; }
img { display: block; max-width: 100%; }
figure, p, h1, h2, h3 { margin: 0; }
h1, h2, h3 { line-height: 1.08; }
h2, h3 { text-wrap: balance; }
h2 { font: 400 clamp(2.65rem, 6.2vw, 5.35rem)/.99 var(--serif); letter-spacing: -.065em; }
h3 { font-size: clamp(1.2rem, 2.4vw, 1.65rem); letter-spacing: -.04em; }
button, summary { cursor: pointer; }
[hidden] { display: none !important; }
.wrap { width: var(--wrap); margin-inline: auto; }
.skip-link { position: absolute; top: 0; left: 1rem; padding: .65rem; background: var(--paper); transform: translateY(-140%); z-index: 10; }
.skip-link:focus { transform: none; }

.site-header { background: var(--paper); }
.header-inner { display: flex; min-height: 4.25rem; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .4rem; color: var(--deep); white-space: nowrap; font-weight: 620; text-decoration: none; }
.brand span { display: grid; place-items: center; width: 2rem; aspect-ratio: 1; border: 1px solid var(--water); border-radius: 50%; margin-right: .2rem; color: var(--water); font: 1rem var(--serif); }
.brand b { color: var(--water); font-weight: 650; }
nav { display: flex; gap: clamp(.7rem, 2.8vw, 2.25rem); }
nav a { color: var(--deep); font-size: .94rem; text-decoration: none; }
.language { padding: .35rem .85rem; border: 1px solid var(--line); border-radius: 2rem; font-size: .93rem; text-decoration: none; }
.language:hover { border-color: var(--water); }

.hero { position: relative; min-height: clamp(30rem, 46vw, 52rem); display: grid; isolation: isolate; color: #fffdf7; background: var(--ocean); }
.hero-image, .hero-image .zoom, .hero-image img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-image .zoom { background: transparent; }
.hero-image img { object-fit: cover; object-position: center 46%; }
.hero-image .zoom::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, #031b2aa6 0%, #0528384d 35%, transparent 67%); pointer-events: none; }
.hero-caption { position: relative; z-index: 1; pointer-events: none; display: flex; align-items: flex-start; padding-block: clamp(3rem, 5.2vw, 6rem) 5rem; }
.hero-copy { max-width: 45rem; text-shadow: 0 2px 18px #04212c66; }
.project-id { font-size: .93rem; font-weight: 700; letter-spacing: .15em; }
h1 { margin: .15rem 0 .38rem; font: 400 clamp(4.3rem, 10vw, 9.2rem)/.9 var(--serif); letter-spacing: -.08em; }
.tagline { max-width: 25rem; font-size: clamp(1.16rem, 2.2vw, 1.65rem); font-weight: 620; line-height: 1.24; text-wrap: balance; }
.hero-image figcaption { position: absolute; right: clamp(1rem, 4.1vw, 4.5rem); bottom: 1.35rem; color: #fffdf7; background: #052b3fe6; padding: .45rem 3.65rem .45rem .8rem; pointer-events: none; display: block; }
.hero-image figcaption .type, .hero-image figcaption strong { display: none; }
.hero-image figcaption .caption { color: inherit; font-size: .88rem; }
.hero-image .expand-icon { right: clamp(1.2rem, 4.4vw, 4.8rem); bottom: 1.5rem; z-index: 1; width: 1.95rem; height: 1.95rem; }

.status { background: var(--sand); }
.status-inner { display: grid; grid-template-columns: 1.15fr 1fr; align-items: end; justify-content: space-between; gap: 1.5rem 4rem; padding-block: clamp(2.7rem, 5.5vw, 4.85rem); }
.status strong { color: var(--water); font-size: .95rem; font-weight: 750; letter-spacing: .04em; }
.lead { max-width: 43rem; margin-top: .55rem; font: 400 clamp(1.45rem, 2.65vw, 2.1rem)/1.34 var(--serif); letter-spacing: -.026em; }
.actions { display: flex; flex-wrap: wrap; gap: .8rem 1.3rem; align-items: center; justify-content: flex-end; }
.button { display: inline-block; padding: .72rem 1.16rem; border: 1px solid var(--rust); border-radius: .15rem; background: var(--rust); color: #fffdf7; text-decoration: none; font-weight: 720; }
.button:hover { color: #fffdf7; background: #78300e; }

.content-section { padding-block: clamp(3.4rem, 7.1vw, 7.25rem); }
.section-intro { max-width: 46rem; }
.section-intro p { margin-top: 1.15rem; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.16rem); }
.operation, .prototype-layout { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: center; gap: 2rem clamp(2.5rem, 7.5vw, 7rem); }
.story-image { min-width: 0; }
.story-image .zoom { display: grid; place-items: center; background: var(--deep); aspect-ratio: 4/5; }
.story-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 51%; }
.story-image figcaption { padding: .85rem 0 0; }
.flow, .milestones { padding: 0; margin: 1.95rem 0 0; }
.flow { list-style-position: inside; }
.flow li, .milestones li { padding: .9rem 0; border-top: 1px solid var(--line); }
.flow li::marker { color: var(--water); font-weight: 750; }
.flow strong, .milestones strong { font-size: 1.1rem; }
.flow p, .milestones p { margin-top: .24rem; color: var(--muted); }
.infographics-link { margin-top: .65rem; font-weight: 650; }

.environment { padding-block: clamp(3.3rem, 6.75vw, 6.7rem); background: var(--ocean); color: #fffdf7; }
.environment .section-intro p { color: var(--foam); }
.environment-layout { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 1.15rem 2.3rem; margin-top: 2.2rem; }
.env-photo { display: flex; flex-direction: column; min-height: 0; }
.env-photo--costa { grid-row: span 2; }
.env-photo img { width: 100%; min-height: 0; flex: 1; height: clamp(11rem, 19vw, 20rem); object-fit: cover; }
.env-photo--costa img { object-position: 43% 48%; }
.env-photo--gaviota img { object-position: center 43%; }
.env-photo figcaption { padding: .5rem 0 .2rem; color: #e0ece5; font-size: .9rem; }
.env-photo a, .licence a { color: var(--foam); }
.licence { margin-top: 1.45rem; font-size: .9rem; }

.prototype { background: var(--sand); }
.prototype-layout { align-items: start; }
.section-intro .measurement { color: var(--water); font-weight: 650; }
.milestones { list-style: none; margin: 0; }

.gallery-group { margin-top: 2.7rem; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.6rem; margin-top: 1rem; }
.gallery-tile { min-width: 0; }
.zoom { display: block; position: relative; background: #e0ece8; }
.gallery-tile .zoom { display: grid; place-items: center; aspect-ratio: 16/10; }
.gallery-tile img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: contain; }
.gallery-group--infographics .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.2rem, 4vw, 3.5rem); }
.gallery-group--infographics .gallery-tile .zoom { aspect-ratio: 5/6; }
.expand-icon { display: grid; place-items: center; position: absolute; inset: auto .65rem .65rem auto; width: 2.25rem; height: 2.25rem; border-radius: 50%; border: 1px solid #fffdf7; background: #053044e8; color: #fffdf7; font-size: 1.23rem; line-height: 1; }
.zoom:hover .expand-icon { background: var(--rust); }
figcaption { display: grid; gap: .12rem; padding: .75rem .1rem .7rem; }
.type { color: var(--water); font-size: .88rem; font-weight: 650; }
.caption { color: var(--muted); font-size: .94rem; }
.gallery-group details { margin-top: .7rem; }
summary { color: var(--rust); width: fit-content; padding: .3rem 0; font-weight: 650; }

.contact { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem 3rem; padding: clamp(1.7rem, 5vw, 4rem); background: #e1eee8; }
.contact p { max-width: 43rem; margin-top: .85rem; color: var(--muted); }
.contact .button { flex-shrink: 0; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem 1.25rem; margin-top: 4rem; padding-block: 1.45rem; border-top: 1px solid var(--line); }
.footer p { color: var(--muted); }

dialog { width: min(64rem, 100% - 1.5rem); max-height: calc(100% - 1.5rem); overflow: auto; padding: .8rem; border: 1px solid #50767a; border-radius: .2rem; background: #0b2737; color: #fffdf7; color-scheme: dark; }
dialog::backdrop { background: #061b28e5; }
.viewer-toolbar, .viewer-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .45rem .75rem; }
.viewer-toolbar { position: sticky; top: 0; z-index: 1; background: #0b2737; }
.viewer-type { margin-top: .2rem; color: #a6e4db; }
.viewer-image { width: 100%; height: min(63vh, 52rem); object-fit: contain; margin: .6rem auto; }
.viewer-caption { padding-bottom: .75rem; color: #e0eee8; }
dialog a { color: #c8e8df; }
dialog :focus-visible, .hero :focus-visible { outline-color: #ffe6a8; }
dialog button { min-height: 2.75rem; padding: .4rem .65rem; background: #113848; color: #fffdf7; font: inherit; border: 1px solid #476f75; border-radius: .2rem; }
dialog button:hover { border-color: #a6e4db; }
@media (prefers-reduced-motion: no-preference) {
  .section-arrived { animation: arrive .65s ease-out both; }
  @keyframes arrive { from { opacity: .68; transform: translateY(.75rem); } to { opacity: 1; transform: translateY(0); } }
}

@media (max-width: 980px) {
  :root { --wrap: calc(100% - 3rem); }
  .contact { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 720px) {
  :root { --wrap: calc(100% - 2rem); }
  .header-inner { flex-wrap: wrap; gap: .4rem .75rem; padding-block: .65rem; }
  nav { order: 3; width: 100%; gap: 1.05rem; }
  .hero { min-height: clamp(28rem, 113vw, 36rem); }
  .hero-image img { object-position: 75% center; }
  .hero-image .zoom::after { background: linear-gradient(180deg, #031b2ab2 0%, #082a424a 36%, transparent 64%); }
  .hero-caption { padding-top: 2.55rem; }
  .hero-image figcaption { left: 1rem; right: 1rem; bottom: .85rem; padding-right: 3.65rem; }
  .hero-image .expand-icon { right: 1.35rem; bottom: 1.15rem; }
  .status-inner, .operation, .prototype-layout, .environment-layout { grid-template-columns: 1fr; gap: 1.6rem; }
  .actions { justify-content: flex-start; }
  .story-image { max-width: 31rem; }
  .story-image .zoom { aspect-ratio: 4/4.4; }
  .environment-layout { grid-template-rows: none; }
  .env-photo--costa { grid-row: auto; }
  .env-photo img { height: auto; aspect-ratio: 16/10; flex: auto; }
  .env-photo--costa img { aspect-ratio: 4/4.4; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
  .gallery-group--infographics .gallery-grid { grid-template-columns: 1fr; }
}
@media (max-width: 370px) {
  h1 { font-size: 3.9rem; }
  nav { gap: .75rem; }
  .gallery-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
