@font-face {
    font-family: "Archivo Black";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/ArchivoBlack-Regular.ttf") format("truetype");
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/Inter-Regular.ttf") format("truetype");
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/Inter-Medium.ttf") format("truetype");
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/Inter-SemiBold.ttf") format("truetype");
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/Inter-Bold.ttf") format("truetype");
}

:root {
    --ink: #111317;
    --navy: #073853;
    --navy-deep: #03283d;
    --sea: #0c7395;
    --ivory: #f7f3ea;
    --paper: #fffdf7;
    --lavender: #c9c4ff;
    --lavender-dark: #8e88e8;
    --white: #ffffff;
    --muted: #515961;
    --line: rgba(7, 56, 83, 0.2);
    --display: "Archivo Black", Impact, sans-serif;
    --body: "Inter", Arial, sans-serif;
    --page: min(1320px, calc(100% - 96px));
    --radius-lg: 34px;
    --radius-md: 22px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    overflow-x: hidden;
    background: var(--ivory);
    color: var(--ink);
    font-family: var(--body);
    font-size: 16px;
    line-height: 1.55;
    text-rendering: optimizeLegibility;
}

body.menu-open,
body.dialog-open {
    overflow: hidden;
}

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

a {
    color: inherit;
    text-decoration: none;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    font: inherit;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--lavender);
    outline-offset: 4px;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 2000;
    padding: 10px 16px;
    background: var(--white);
    color: var(--navy);
    transform: translateY(-160%);
}

.skip-link:focus {
    transform: translateY(0);
}

.container {
    width: var(--page);
    margin-inline: auto;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--sea);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.display-heading {
    margin: 0;
    font-family: var(--display);
    font-weight: 400;
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.intro-copy {
    max-width: 660px;
    margin: 0;
    color: var(--muted);
    font-size: 1.06rem;
    line-height: 1.72;
}

.button {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    padding: 13px 26px;
    border: 2px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.94rem;
    font-weight: 700;
    transition: transform 180ms ease, background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button-dark {
    background: var(--ink);
    color: var(--white);
}

.button-dark:hover {
    background: var(--navy);
}

.button-outline {
    border-color: rgba(255, 255, 255, 0.9);
    background: transparent;
    color: var(--white);
}

.button-outline:hover {
    background: var(--white);
    color: var(--navy-deep);
}

.button-outline-dark {
    border-color: var(--navy-deep);
    background: transparent;
    color: var(--navy-deep);
}

.button-outline-dark:hover {
    background: var(--navy-deep);
    color: var(--white);
}

.header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 1000;
    height: 84px;
    color: var(--white);
    transition: background-color 220ms ease, color 220ms ease, box-shadow 220ms ease;
}

.header.scrolled,
.header.menu-active {
    background: rgba(247, 243, 234, 0.97);
    color: var(--navy-deep);
    box-shadow: 0 1px 0 var(--line);
    backdrop-filter: blur(12px);
}

.nav-container {
    width: var(--page);
    height: 84px;
    margin-inline: auto;
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 16px 28px;
}

.logo {
    color: inherit;
    font-family: var(--display);
    font-size: 1.75rem;
    letter-spacing: -0.06em;
}

.nav-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(18px, 2.6vw, 42px);
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-menu a {
    position: relative;
    padding-block: 10px;
    font-size: 0.88rem;
    font-weight: 600;
}

.nav-menu a::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 6px;
    left: 0;
    height: 2px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 180ms ease;
}

.nav-menu a:hover::after,
.nav-menu a:focus-visible::after,
.nav-menu a[aria-current="page"]::after {
    transform: scaleX(1);
}

.language-toggle,
.menu-toggle {
    min-width: 48px;
    min-height: 42px;
    border: 1px solid currentColor;
    border-radius: 10px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 700;
}

.menu-toggle {
    display: none;
    min-width: 64px;
    padding-inline: 12px;
}

.page-hero {
    position: relative;
    min-height: 650px;
    display: flex;
    align-items: flex-end;
    isolation: isolate;
    overflow: hidden;
    background-color: var(--navy);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    color: var(--white);
}

.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(2, 32, 48, 0.5);
}

.gallery-hero {
    background-image: url("../img/gallery/gallery_foto5.webp");
    background-position: center 48%;
}

.education-hero {
    background-image: url("../img/gallery/gallery_foto1.webp");
    background-position: center 48%;
}

.projects-hero {
    background-image: url("../img/posidonia3.webp");
    background-position: center 56%;
}

.about-hero {
    background-image: url("../img/gallery/gallery_enric.webp");
    background-position: center 44%;
}

.contact-hero {
    background-image: url("../img/gallery/gallery_foto3.webp");
    background-position: center 48%;
}

.page-hero-content {
    width: var(--page);
    margin-inline: auto;
    padding: 138px 0 62px;
}

.page-title {
    max-width: 1120px;
    margin: 0;
    color: var(--white);
    font-family: var(--display);
    font-size: clamp(5.5rem, 12vw, 10rem);
    font-weight: 400;
    line-height: 0.84;
    letter-spacing: -0.075em;
}

.page-tagline {
    max-width: 680px;
    margin: 26px 0 0;
    font-size: clamp(1.45rem, 2.8vw, 2.35rem);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.page-caption {
    position: absolute;
    right: max(48px, calc((100% - 1320px) / 2));
    bottom: 46px;
    max-width: 220px;
    margin: 0;
    text-align: right;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.75rem;
    line-height: 1.45;
}

.intro-section {
    padding: 86px 0 70px;
    background: var(--ivory);
}

.intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.72fr);
    gap: clamp(38px, 8vw, 110px);
    align-items: end;
}

.intro-grid .display-heading {
    max-width: 820px;
    font-size: clamp(3.35rem, 6.7vw, 6.6rem);
}

.gallery-section,
.programs-section,
.projects-section,
.science-section,
.method-section,
.principles-section,
.contact-section {
    padding: 72px 0 92px;
    background: var(--ivory);
}

.principles-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.principle-card {
    min-height: 360px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--paper);
}

.principle-card:nth-child(2) {
    background: var(--lavender);
}

.principle-number {
    color: var(--lavender-dark);
    font-family: var(--display);
    font-size: 4.2rem;
    line-height: 0.9;
    letter-spacing: -0.06em;
}

.principle-title {
    margin: 0 0 14px;
    color: var(--navy-deep);
    font-family: var(--display);
    font-size: 2rem;
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.045em;
}

.principle-copy {
    margin: 0;
    color: var(--muted);
}

.team-showcase {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    min-height: 760px;
    background: var(--navy-deep);
    color: var(--white);
}

.team-image {
    height: 100%;
    min-height: 760px;
    object-fit: cover;
    object-position: center 46%;
}

.team-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(48px, 7vw, 102px);
}

.team-panel .eyebrow {
    color: var(--lavender);
}

.team-panel .display-heading {
    max-width: 680px;
    font-size: clamp(3rem, 5.5vw, 5.8rem);
}

.team-intro {
    max-width: 640px;
    margin: 22px 0 34px;
    color: rgba(255, 255, 255, 0.78);
}

.team-list {
    border-top: 1px solid rgba(255, 255, 255, 0.24);
}

.team-member {
    display: grid;
    grid-template-columns: minmax(160px, 0.55fr) minmax(0, 1fr);
    gap: 28px;
    padding: 24px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.24);
}

.team-role {
    color: var(--lavender);
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.team-name {
    margin: 0 0 8px;
    font-size: 1.22rem;
    line-height: 1.15;
}

.team-bio {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.92rem;
}

.contact-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.7fr) minmax(0, 1.3fr);
    gap: clamp(28px, 5vw, 70px);
    align-items: start;
}

.contact-aside {
    position: sticky;
    top: 112px;
    padding: 34px;
    border-radius: var(--radius-md);
    background: var(--lavender);
    color: var(--navy-deep);
}

.contact-aside .display-heading {
    font-size: clamp(2.4rem, 4vw, 4.2rem);
}

.contact-aside-copy {
    margin: 22px 0 0;
    color: rgba(3, 40, 61, 0.8);
}

.contact-paths {
    display: grid;
    margin-top: 30px;
    border-top: 1px solid rgba(3, 40, 61, 0.24);
}

.contact-path {
    padding: 17px 0;
    border-bottom: 1px solid rgba(3, 40, 61, 0.24);
}

.contact-path strong,
.contact-path span {
    display: block;
}

.contact-path strong {
    margin-bottom: 3px;
}

.contact-path span {
    color: rgba(3, 40, 61, 0.72);
    font-size: 0.88rem;
}

.contact-form-shell {
    padding: clamp(30px, 5vw, 58px);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--paper);
}

.contact-form-heading {
    margin-bottom: 30px;
}

#contact-form-title {
    scroll-margin-top: 112px;
}

#team-title {
    scroll-margin-top: 112px;
}

.contact-form-heading .display-heading {
    font-size: clamp(2.8rem, 5vw, 5rem);
}

.contact-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.form-group {
    display: grid;
    gap: 9px;
}

.form-group.form-full,
.submit-row,
.form-message {
    grid-column: 1 / -1;
}

.form-group label {
    color: var(--navy-deep);
    font-size: 0.82rem;
    font-weight: 700;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    min-height: 54px;
    padding: 14px 16px;
    border: 1px solid rgba(7, 56, 83, 0.34);
    border-radius: 12px;
    background: var(--white);
    color: var(--ink);
    font: inherit;
}

.form-group textarea {
    min-height: 180px;
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--sea);
    outline: 3px solid rgba(201, 196, 255, 0.72);
    outline-offset: 2px;
}

.submit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.submit-button {
    border: 0;
}

.submit-button:disabled {
    cursor: wait;
    opacity: 0.7;
    transform: none;
}

.privacy-note {
    max-width: 500px;
    margin: 0;
    color: var(--muted);
    font-size: 0.78rem;
}

.form-message {
    display: none;
    margin: 0;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
}

.form-message.success {
    background: #dff3e8;
    color: #145235;
}

.form-message.error {
    background: #fbe3df;
    color: #7d241a;
}

.error-page {
    min-height: 100vh;
    display: flex;
    align-items: flex-end;
    isolation: isolate;
    position: relative;
    overflow: hidden;
    background: var(--navy-deep) url("../img/posidonia3.webp") center 56% / cover no-repeat;
    color: var(--white);
}

.error-page::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(2, 32, 48, 0.66);
}

.error-content {
    width: var(--page);
    margin-inline: auto;
    padding: 150px 0 72px;
}

.error-code {
    margin: 0;
    font-family: var(--display);
    font-size: clamp(8rem, 24vw, 20rem);
    font-weight: 400;
    line-height: 0.74;
    letter-spacing: -0.085em;
}

.error-copy {
    max-width: 640px;
    margin: 34px 0 26px;
    font-size: clamp(1.35rem, 2.4vw, 2.15rem);
    font-weight: 600;
    line-height: 1.16;
}

.section-heading-row {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.65fr);
    gap: 50px;
    align-items: end;
    margin-bottom: 38px;
}

.section-heading-row .display-heading {
    font-size: clamp(2.85rem, 5.5vw, 5.4rem);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-flow: dense;
    gap: 18px;
}

.gallery-item {
    grid-column: span 4;
    margin: 0;
}

.gallery-item.wide {
    grid-column: span 8;
}

.gallery-item.tall .gallery-trigger {
    min-height: 640px;
}

.gallery-trigger {
    position: relative;
    width: 100%;
    min-height: 390px;
    overflow: hidden;
    padding: 0;
    border: 0;
    border-radius: var(--radius-md);
    background: var(--navy);
    color: var(--white);
    cursor: pointer;
    text-align: left;
}

.gallery-trigger::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(3, 40, 61, 0.16);
    transition: background-color 180ms ease;
}

.gallery-trigger:hover::after {
    background: rgba(3, 40, 61, 0.34);
}

.gallery-trigger img {
    height: 100%;
    min-height: inherit;
    object-fit: cover;
    transition: transform 400ms ease;
}

.gallery-trigger:hover img {
    transform: scale(1.025);
}

.gallery-label {
    position: absolute;
    right: 20px;
    bottom: 18px;
    left: 20px;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.35;
}

.gallery-label small {
    flex: none;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.feature-band {
    background: var(--lavender);
    color: var(--navy-deep);
}

.feature-band-inner {
    width: var(--page);
    min-height: 320px;
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    padding: 54px 0;
}

.feature-band .display-heading {
    max-width: 820px;
    font-size: clamp(2.9rem, 5.7vw, 5.7rem);
}

.feature-band-copy {
    max-width: 390px;
    margin: 0;
    font-weight: 600;
}

.program-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.program-card {
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--paper);
    box-shadow: 0 1px 0 var(--line);
}

.program-image {
    height: 280px;
    object-fit: cover;
}

.program-card:nth-child(1) .program-image {
    object-position: center 62%;
}

.program-card-body {
    padding: 28px 28px 32px;
}

.program-number,
.project-number {
    display: block;
    margin-bottom: 18px;
    color: var(--sea);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.program-title,
.project-card-title,
.science-card-title {
    margin: 0;
    color: var(--navy-deep);
    font-family: var(--display);
    font-size: 1.65rem;
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.045em;
}

.program-description,
.project-card-description,
.science-card-description {
    margin: 16px 0 0;
    color: var(--muted);
}

.method-section {
    background: var(--paper);
}

.method-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--line);
}

.method-step {
    min-height: 260px;
    padding: 30px 34px 24px 0;
    border-right: 1px solid var(--line);
}

.method-step + .method-step {
    padding-left: 34px;
}

.method-step:last-child {
    border-right: 0;
}

.method-step strong {
    display: block;
    margin-bottom: 50px;
    color: var(--lavender-dark);
    font-family: var(--display);
    font-size: 3.2rem;
    font-weight: 400;
    letter-spacing: -0.06em;
}

.method-step h3 {
    margin: 0 0 12px;
    font-size: 1.25rem;
}

.method-step p {
    margin: 0;
    color: var(--muted);
}

.projects-list {
    display: grid;
    gap: 26px;
}

.project-feature {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.82fr);
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--paper);
    box-shadow: 0 1px 0 var(--line);
}

.project-feature:nth-child(even) {
    grid-template-columns: minmax(360px, 0.82fr) minmax(0, 1.12fr);
}

.project-feature:nth-child(even) .project-feature-image {
    order: 2;
}

.project-feature-image {
    min-height: 430px;
    object-fit: cover;
}

.project-feature-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(34px, 5vw, 72px);
}

.project-feature .project-card-title {
    max-width: 500px;
    font-size: clamp(2rem, 3.5vw, 3.5rem);
}

.project-stat {
    display: inline-flex;
    align-self: flex-start;
    margin-top: 30px;
    padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--navy-deep);
    font-size: 0.82rem;
    font-weight: 700;
}

.posidonia-story {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    min-height: 610px;
    background: var(--navy-deep);
    color: var(--white);
}

.posidonia-story-image {
    height: 100%;
    min-height: 610px;
    object-fit: cover;
}

.posidonia-story-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(48px, 8vw, 112px);
}

.posidonia-story-copy .eyebrow {
    color: var(--lavender);
}

.posidonia-story-copy .display-heading {
    max-width: 690px;
    font-size: clamp(3rem, 5.5vw, 5.8rem);
}

.posidonia-story-copy p:not(.eyebrow) {
    max-width: 680px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.82);
}

.benefit-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 34px;
    border-top: 1px solid rgba(255, 255, 255, 0.24);
}

.benefit-item {
    padding: 18px 18px 18px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.24);
    font-size: 0.9rem;
    font-weight: 600;
}

.science-section {
    background: var(--lavender);
}

.science-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.science-card {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    border: 1px solid rgba(7, 56, 83, 0.28);
    border-radius: var(--radius-md);
    color: var(--navy-deep);
}

.science-card-description {
    color: rgba(3, 40, 61, 0.8);
}

.join-section {
    padding: 76px 0;
    background: var(--navy);
    color: var(--white);
}

.join-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.join-section .eyebrow {
    color: var(--lavender);
}

.join-section .display-heading {
    max-width: 860px;
    font-size: clamp(2.7rem, 5.2vw, 5rem);
}

.footer {
    padding: 52px 0 26px;
    background: var(--navy-deep);
    color: rgba(255, 255, 255, 0.82);
}

.footer-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 80px;
}

.footer-title {
    margin: 0 0 12px;
    color: var(--white);
    font-family: var(--display);
    font-size: 1.85rem;
    font-weight: 400;
    letter-spacing: -0.05em;
}

.footer-text {
    max-width: 430px;
    margin: 0;
}

.footer-links-title {
    margin: 0 0 12px;
    color: var(--white);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-links a {
    font-size: 0.88rem;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-copyright {
    margin: 36px 0 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 0.78rem;
}

.lightbox {
    width: min(1120px, calc(100% - 36px));
    max-width: none;
    padding: 0;
    border: 0;
    border-radius: var(--radius-md);
    background: var(--navy-deep);
    color: var(--white);
}

.lightbox::backdrop {
    background: rgba(3, 20, 30, 0.82);
}

.lightbox-shell {
    padding: 18px;
}

.lightbox-topbar {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 2px 2px 14px;
}

.lightbox-close,
.lightbox-nav {
    min-height: 42px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.54);
    border-radius: 999px;
    background: transparent;
    color: var(--white);
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 700;
}

.lightbox-image {
    max-height: 70vh;
    object-fit: contain;
    border-radius: 14px;
    background: #021b2a;
}

.lightbox-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 16px;
}

.lightbox-caption {
    margin: 0;
    text-align: center;
    font-weight: 600;
}

@media (max-width: 1050px) {
    :root {
        --page: min(100% - 54px, 960px);
    }

    .nav-container {
        gap: 14px;
    }

    .nav-menu {
        gap: 18px;
    }

    .gallery-item,
    .gallery-item.wide {
        grid-column: span 6;
    }

    .program-grid,
    .science-grid,
    .principles-grid {
        grid-template-columns: 1fr 1fr;
    }

    .program-card:last-child,
    .science-card:last-child,
    .principle-card:last-child {
        grid-column: 1 / -1;
    }

    .project-feature,
    .project-feature:nth-child(even) {
        grid-template-columns: 1fr 1fr;
    }

    .posidonia-story {
        grid-template-columns: 0.8fr 1.2fr;
    }

    .team-showcase {
        grid-template-columns: 0.82fr 1.18fr;
    }
}

@media (max-width: 820px) {
    :root {
        --page: calc(100% - 38px);
    }

    .header,
    .nav-container {
        height: 72px;
    }

    .nav-container {
        grid-template-columns: 1fr auto auto;
        gap: 10px;
    }

    .menu-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        inset: 72px 0 auto;
        display: none;
        align-items: stretch;
        padding: 18px 19px 28px;
        background: var(--ivory);
        color: var(--navy-deep);
        box-shadow: 0 12px 26px rgba(3, 40, 61, 0.14);
    }

    .nav-menu.active {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .nav-menu a {
        display: block;
        padding: 12px 6px;
        border-bottom: 1px solid var(--line);
    }

    .nav-menu a::after {
        display: none;
    }

    .page-hero {
        min-height: 610px;
    }

    .page-hero-content {
        padding-top: 116px;
    }

    .page-caption {
        display: none;
    }

    .intro-grid,
    .section-heading-row,
    .project-feature,
    .project-feature:nth-child(even),
    .posidonia-story,
    .team-showcase,
    .contact-layout,
    .footer-content {
        grid-template-columns: 1fr;
    }

    .section-heading-row {
        gap: 18px;
    }

    .program-grid,
    .science-grid,
    .principles-grid {
        grid-template-columns: 1fr;
    }

    .program-card:last-child,
    .science-card:last-child,
    .principle-card:last-child {
        grid-column: auto;
    }

    .team-image {
        min-height: 580px;
    }

    .contact-aside {
        position: static;
    }

    .project-feature:nth-child(even) .project-feature-image {
        order: 0;
    }

    .project-feature-image {
        min-height: 360px;
    }

    .posidonia-story-image {
        min-height: 440px;
    }

    .method-grid {
        grid-template-columns: 1fr;
    }

    .method-step,
    .method-step + .method-step {
        min-height: 0;
        padding: 28px 0;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .method-step strong {
        margin-bottom: 20px;
    }

    .join-inner,
    .feature-band-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .footer-content {
        gap: 34px;
    }
}

@media (max-width: 560px) {
    :root {
        --page: calc(100% - 30px);
        --radius-lg: 25px;
        --radius-md: 18px;
    }

    .logo {
        font-size: 1.45rem;
    }

    .language-toggle {
        min-width: 42px;
    }

    .menu-toggle {
        min-width: 58px;
    }

    .page-hero {
        min-height: 610px;
    }

    .gallery-hero {
        background-position: 57% center;
    }

    .education-hero {
        background-position: 45% center;
    }

    .projects-hero {
        background-position: 60% center;
    }

    .page-title {
        margin-left: -3px;
        font-size: clamp(3.35rem, 18vw, 4.9rem);
        letter-spacing: -0.085em;
    }

    .page-tagline {
        margin-top: 20px;
        font-size: 1.6rem;
    }

    .intro-section,
    .gallery-section,
    .programs-section,
    .projects-section,
    .science-section,
    .method-section,
    .principles-section,
    .contact-section {
        padding: 58px 0 66px;
    }

    .intro-grid .display-heading,
    .section-heading-row .display-heading,
    .feature-band .display-heading,
    .join-section .display-heading,
    .posidonia-story-copy .display-heading {
        font-size: 2.75rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .gallery-item,
    .gallery-item.wide {
        grid-column: auto;
    }

    .gallery-trigger,
    .gallery-item.tall .gallery-trigger {
        min-height: 360px;
    }

    .program-image {
        height: 230px;
    }

    .project-feature-image {
        min-height: 260px;
    }

    .project-feature-content,
    .posidonia-story-copy {
        padding: 32px 24px 38px;
    }

    .posidonia-story-image {
        min-height: 330px;
    }

    .team-image {
        min-height: 440px;
    }

    .team-panel {
        padding: 38px 24px 48px;
    }

    .team-member,
    .contact-form {
        grid-template-columns: 1fr;
    }

    .team-member {
        gap: 9px;
    }

    .form-group.form-full,
    .submit-row,
    .form-message {
        grid-column: auto;
    }

    .submit-row {
        align-items: stretch;
        flex-direction: column;
    }

    .submit-button {
        width: 100%;
    }

    .benefit-list {
        grid-template-columns: 1fr;
    }

    .feature-band-inner {
        gap: 28px;
    }

    .join-section,
    .footer {
        padding-top: 54px;
    }

    .join-inner {
        align-items: stretch;
    }

    .join-inner .button {
        width: 100%;
    }

    .lightbox-shell {
        padding: 12px;
    }

    .lightbox-footer {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .lightbox-caption {
        grid-column: 1 / -1;
        grid-row: 1;
    }
}

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