/* Carvoeiro Water Fun — maritime glass
 *
 * SPDX-License-Identifier: MIT
 * Copyright © Josep Bigorra <jjbigorra@gmail.com>
 *
 * A presentation layer on top of the generated olive utilities: a sea-mist
 * backdrop with slow tides, frosted panels held by a brass hairline, and
 * hover/scroll motion that switches itself off when the reader asks for less
 * animation.  Layout and type scale stay with the utility sheet; this file
 * adds the atmosphere around them.
 */

:root {
    --sea-ink: oklch(0.28 0.04 240);
    --sea-deep: oklch(0.44 0.07 232);
    --sea-mid: oklch(0.62 0.07 220);
    --sea-foam: oklch(0.97 0.01 205);
    --brass: oklch(0.74 0.09 82);
    --brass-deep: oklch(0.55 0.08 74);
    /* Warm, barely-there hairlines: the panes are held by light, not by grey. */
    --glass-line: rgb(255 252 246 / 0.5);
    --glass-line-strong: rgb(255 253 249 / 0.72);
    --glass-blur: 26px;
    --glass-shadow: 0 24px 56px -38px oklch(0.36 0.03 232 / 0.34),
        0 2px 10px oklch(0.36 0.03 232 / 0.04);
    --glass-shadow-lifted: 0 34px 72px -40px oklch(0.36 0.03 232 / 0.4),
        0 8px 20px oklch(0.36 0.03 232 / 0.05);
    --ease-lux: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ====== The water behind everything ====== */

.maritime-body {
    position: relative;
    overflow-x: hidden;
    color: var(--sea-ink);
    background:
        radial-gradient(120% 70% at 12% -12%,
                        oklch(1 0 0 / 0.94),
                        transparent 60%),
        radial-gradient(90% 60% at 92% -4%,
                        oklch(0.96 0.03 88 / 0.4),
                        transparent 54%),
        linear-gradient(180deg,
                        oklch(0.995 0.004 210) 0%,
                        oklch(0.98 0.008 214) 46%,
                        oklch(0.95 0.015 212) 100%);
    background-attachment: fixed;
}

.sea-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Sunlight coming through the surface, breathing very slowly. */
.sea-canvas::before {
    content: "";
    position: absolute;
    inset: -20% -10% auto;
    height: 70vh;
    background:
        radial-gradient(45% 55% at 22% 18%,
                        oklch(1 0 0 / 0.55),
                        transparent 70%),
        radial-gradient(35% 40% at 78% 8%,
                        oklch(0.93 0.06 92 / 0.4),
                        transparent 72%);
    filter: blur(10px);
    animation: glint-breathe 26s ease-in-out infinite alternate;
}

/* Fine caustic lines drifting sideways, like light on a pool floor. */
.sea-canvas::after {
    content: "";
    position: absolute;
    inset: -10%;
    background-image: repeating-linear-gradient(101deg,
                                              oklch(1 0 0 / 0.28) 0 1px,
                                              transparent 1px 22px);
    -webkit-mask-image: radial-gradient(70% 60% at 50% 35%,
                                        black,
                                        transparent 78%);
    mask-image: radial-gradient(70% 60% at 50% 35%, black, transparent 78%);
    opacity: 0.35;
    animation: caustics 68s linear infinite;
}

.tide {
    position: absolute;
    left: -18%;
    width: 136%;
    border-radius: 50% 50% 0 0 / 26% 26% 0 0;
    filter: blur(34px);
    transform-origin: 50% 100%;
}

.tide--1 {
    bottom: -30vh;
    height: 48vh;
    background: linear-gradient(180deg,
                                oklch(0.86 0.035 205 / 0.32),
                                oklch(0.66 0.055 224 / 0.38));
    animation: tide-drift 34s ease-in-out infinite alternate;
}

.tide--2 {
    bottom: -36vh;
    height: 52vh;
    background: linear-gradient(180deg,
                                oklch(0.84 0.04 212 / 0.26),
                                oklch(0.62 0.06 230 / 0.34));
    animation: tide-drift 27s ease-in-out -7s infinite alternate-reverse;
}

.tide--3 {
    bottom: -44vh;
    height: 56vh;
    background: linear-gradient(180deg,
                                oklch(0.8 0.045 218 / 0.2),
                                oklch(0.56 0.06 236 / 0.28));
    animation: tide-drift 41s ease-in-out -16s infinite alternate;
}

.page-layer {
    position: relative;
    z-index: 1;
}

/* A thin brass water line that fills as the page is read. */
.tide-line {
    position: fixed;
    inset-inline: 0;
    top: 0;
    z-index: 50;
    height: 3px;
    background: oklch(1 0 0 / 0.25);
    pointer-events: none;
}

.tide-line__fill {
    display: block;
    height: 100%;
    transform: scaleX(var(--progress, 0));
    transform-origin: 0 50%;
    background: linear-gradient(90deg, var(--sea-mid), var(--brass));
    transition: transform 120ms linear;
}

/* ====== Frosted panels ====== */

.glass {
    position: relative;
    border-radius: 32px;
    border: 1px solid var(--glass-line);
    background:
        linear-gradient(158deg,
                        oklch(1 0 0 / 0.92),
                        oklch(1 0 0 / 0.68) 56%,
                        oklch(0.985 0.006 205 / 0.66));
    box-shadow:
        inset 0 1px 0 oklch(1 0 0 / 0.95),
        inset 0 -1px 0 oklch(1 0 0 / 0.25),
        var(--glass-shadow);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(165%) brightness(1.02);
    backdrop-filter: blur(var(--glass-blur)) saturate(165%) brightness(1.02);
    transition: transform 700ms var(--ease-lux),
        box-shadow 700ms var(--ease-lux),
        border-color 700ms var(--ease-lux);
}

/* A pane is positioned so its hairline can be drawn, but a utility that places
   it absolutely (the carousel arrows) must keep the last word. */
.glass.absolute {
    position: absolute;
}

/* The brass hairline inlay that makes a pane read as cut glass. */
.glass::before {
    content: "";
    position: absolute;
    inset: 8px;
    border-radius: inherit;
    border: 1px solid color-mix(in oklab, var(--brass) 30%, transparent);
    opacity: 0.2;
    pointer-events: none;
    transition: opacity 700ms var(--ease-lux);
}

/* A sheen that sweeps across on hover. */
.glass--card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(105deg,
                              transparent 34%,
                              oklch(1 0 0 / 0.55) 47%,
                              transparent 60%);
    background-size: 260% 100%;
    background-position: 130% 0;
    opacity: 0;
    transition: opacity 500ms ease, background-position 1200ms var(--ease-lux);
}

.glass--panel {
    padding: clamp(1.5rem, 3.5vw, 2.75rem);
}

.glass--card {
    border-radius: 30px;
    padding: clamp(1.35rem, 3vw, 2.35rem);
}

.glass--card:hover,
.glass--card:focus-within {
    transform: translateY(-5px);
    border-color: var(--glass-line-strong);
    box-shadow:
        inset 0 1px 0 oklch(1 0 0 / 0.95),
        var(--glass-shadow-lifted);
}

.glass--card:hover::after,
.glass--card:focus-within::after {
    opacity: 1;
    background-position: -30% 0;
}

.glass--card:hover::before,
.glass--card:focus-within::before {
    opacity: 0.55;
}

/* Panels that follow the pointer a little; the script writes the angles. */
[data-tilt] {
    transform: perspective(1100px)
        rotateX(var(--tilt-x, 0deg))
        rotateY(var(--tilt-y, 0deg));
    transition: transform 800ms var(--ease-lux),
        box-shadow 700ms var(--ease-lux);
    will-change: transform;
}

[data-tilt].is-tilting {
    transition-duration: 120ms;
}

/* ====== Hero ====== */

.hero-shell {
    padding: clamp(1rem, 3vw, 2rem) clamp(1rem, 4vw, 2.5rem) 0;
}

/* The hero is the boat itself: the copy on the left, the Black Dolphin under
   the Benagil dome in a window on the right. */
.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
    gap: clamp(1.25rem, 3vw, 2.5rem);
    align-items: center;
    min-height: clamp(24rem, 34vw, 31rem);
    text-align: left;
}

.hero-copy {
    min-width: 0;
}

.hero .hero-title-row {
    justify-content: flex-start;
}

.hero .gold-rule {
    margin-inline: 0 auto;
}

.hero .hero-content {
    margin-inline: 0;
}

.hero .hero-actions {
    justify-content: flex-start;
}

/* A window of the day itself, framed in the same glass as the page. */
.hero-media {
    position: relative;
    margin: 0;
    height: 100%;
    min-height: clamp(18rem, 27vw, 24rem);
    overflow: hidden;
    border: 1px solid var(--glass-line);
    border-radius: 24px;
    background: oklch(0.9 0.02 210);
    box-shadow:
        inset 0 1px 0 oklch(1 0 0 / 0.7),
        0 34px 64px -48px oklch(0.3 0.04 232 / 0.75);
}

.hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(200deg, oklch(1 0 0 / 0.16), transparent 40%),
        radial-gradient(120% 85% at 50% 100%,
                        transparent 55%,
                        oklch(0.24 0.04 235 / 0.22));
}

.hero-media__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 56% center;
    transform: scale(1.01);
    transition: transform 1200ms var(--ease-lux);
}

.hero:hover .hero-media__img {
    transform: scale(1.055);
}

@media (max-width: 860px) {
    .hero {
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
        text-align: center;
    }

    .hero .hero-title-row {
        justify-content: center;
    }

    .hero .gold-rule {
        margin-inline: auto;
    }

    .hero .hero-content {
        margin-inline: auto;
    }

    .hero .hero-actions {
        justify-content: center;
    }

    .hero-media {
        min-height: 13rem;
        aspect-ratio: 16 / 10;
        border-radius: 20px;
    }
}

.hero-title-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    align-items: center;
    justify-content: center;
    animation: rise-in 1100ms var(--ease-lux) both;
}

.hero-content {
    margin-inline: auto;
    animation: rise-in 1300ms var(--ease-lux) 120ms both;
}

.hero-title-row h1 {
    font-size: clamp(2rem, 6.5vw, 4rem);
    line-height: 1;
    letter-spacing: 0.045em;
}

.hero-anchor {
    display: inline-block;
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    transform-origin: 50% 82%;
    animation: anchor-bob 7s ease-in-out infinite;
}

/* Lettering that catches the light like polished brass. */
.shimmer {
    background-image: linear-gradient(100deg,
                                      var(--sea-ink) 0%,
                                      var(--sea-deep) 26%,
                                      var(--brass) 47%,
                                      var(--sea-mid) 64%,
                                      var(--sea-ink) 100%);
    background-size: 240% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shimmer-drift 13s ease-in-out infinite;
}

.hero-actions a {
    display: inline-flex;
    transition: transform 450ms var(--ease-lux),
        filter 450ms var(--ease-lux);
}

.hero-actions a:hover,
.hero-actions a:focus-visible {
    transform: translateY(-3px);
    filter: drop-shadow(0 12px 18px oklch(0.28 0.04 240 / 0.25));
}

.gold-rule {
    height: 1px;
    max-width: 22rem;
    margin: 1.5rem auto;
    border: 0;
    background: linear-gradient(90deg,
                              transparent,
                              var(--brass) 50%,
                              transparent);
    opacity: 0.85;
}

/* Under a left-aligned heading the rule follows the text instead of floating
   off into the middle of the panel. */
.card-head + .gold-rule {
    margin-left: 0;
}

/* ====== Photographs ====== */

/* Each photograph is a <picture> with an AVIF source and the JPEG behind it.
   The wrapper is taken out of the layout so every frame sizes its <img> exactly
   as it did before. */
picture {
    display: contents;
}

.photo-frame {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid var(--glass-line);
    box-shadow: 0 22px 44px -34px oklch(0.36 0.03 232 / 0.42);
    background: oklch(0.97 0.01 205);
}

.photo-frame img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 1400ms var(--ease-lux),
        filter 1400ms var(--ease-lux);
}

.photo-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(160deg,
                              oklch(1 0 0 / 0.35),
                              transparent 52%);
    opacity: 0;
    transition: opacity 900ms var(--ease-lux);
}

.photo-frame:hover img,
.photo-frame:focus-within img {
    transform: scale(1.06) rotate(-0.4deg);
    filter: saturate(1.08) contrast(1.03);
}

.photo-frame:hover::after,
.photo-frame:focus-within::after {
    opacity: 1;
}

/* ====== Cards ====== */

/* One row of cards that shares the width evenly and wraps on small screens. */
.card-row {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(1rem, 2.4vw, 1.75rem);
}

.card-row > .glass--card {
    flex: 1 1 21rem;
}

.card-head {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 0.85rem;
}

/* A pale coin for a section icon, ringed in brass. */
.medallion {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    color: var(--sea-deep);
    background: linear-gradient(160deg,
                              oklch(1 0 0 / 0.98),
                              oklch(1 0 0 / 0.62));
    border: 1px solid oklch(1 0 0 / 0.9);
    box-shadow:
        inset 0 1px 0 oklch(1 0 0 / 1),
        0 10px 20px -14px oklch(0.28 0.04 240 / 0.55),
        0 0 0 1px color-mix(in oklab, var(--brass) 34%, transparent);
    transition: transform 600ms var(--ease-lux),
        box-shadow 600ms var(--ease-lux);
}

.glass--card:hover .medallion,
.glass--card:focus-within .medallion {
    transform: translateY(-2px) rotate(-6deg) scale(1.04);
    box-shadow:
        inset 0 1px 0 oklch(1 0 0 / 1),
        0 16px 26px -16px oklch(0.28 0.04 240 / 0.6),
        0 0 0 1px color-mix(in oklab, var(--brass) 55%, transparent);
}

/* Cards built around a photograph.  Several shapes share the grid, so the
   section reads as a spread rather than a row of identical tiles. */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1rem, 2.2vw, 1.5rem);
    align-items: stretch;
}

.theme-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
}

.theme-card__media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: oklch(0.93 0.02 210);
}

.theme-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1400ms var(--ease-lux),
        filter 1400ms var(--ease-lux);
}

.theme-card__media::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg,
                              transparent 62%,
                              oklch(1 0 0 / 0.24));
}

.theme-card:hover .theme-card__media img,
.theme-card:focus-within .theme-card__media img {
    transform: scale(1.07);
    filter: saturate(1.08) contrast(1.03);
}

.theme-card__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.7rem;
    justify-content: center;
    padding: clamp(1.15rem, 2.2vw, 1.7rem);
}

/* The small serif label that names each scene. */
.theme-card__eyebrow {
    font-family: 'Lora', ui-serif, serif;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--brass-deep);
}

/* The card's icon sits on the photograph, like a wax seal on a postcard. */
.theme-card__badge {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    width: 2.5rem;
    height: 2.5rem;
}

/* A wide card: photograph on one side, the wildlife note on the other. */
.theme-card--feature {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    grid-column: span 2;
}

.theme-card--feature .theme-card__media {
    aspect-ratio: auto;
    height: 100%;
    min-height: 19rem;
}

/* A portrait card, cropped tall and captioned on the glass. */
.theme-card--tall .theme-card__media {
    aspect-ratio: auto;
    height: 100%;
    min-height: 21rem;
}

/* The kayak sits low and right in its frame; keep it in the crop. */
.theme-card--tall .theme-card__media img {
    object-position: 62% 72%;
}

.theme-card__caption {
    position: absolute;
    left: 1rem;
    right: auto;
    bottom: 1rem;
    max-width: calc(100% - 2rem);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.9rem;
    border: 1px solid oklch(1 0 0 / 0.42);
    border-radius: 999px;
    background: linear-gradient(155deg,
                              oklch(0.3 0.03 232 / 0.5),
                              oklch(0.16 0.03 232 / 0.68));
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    backdrop-filter: blur(16px) saturate(140%);
    box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.4);
    color: oklch(1 0 0);
}

.theme-card__caption p {
    margin: 0;
    color: inherit;
    text-shadow: 0 1px 2px oklch(0.2 0.03 232 / 0.35);
}

/* An arched card, so the grid echoes the cave mouth below it. */
.theme-card--arch .theme-card__media {
    aspect-ratio: 1 / 1;
    margin: 0.85rem 0.85rem 0;
    border-radius: 50% 50% 0 0 / 38% 38% 0 0;
}

/* The only card with no photograph: a clear way to book. */
.theme-card--cta {
    justify-content: center;
    gap: 0.85rem;
    padding: clamp(1.3rem, 2.4vw, 1.8rem);
    background:
        radial-gradient(120% 90% at 8% 0%,
                        oklch(1 0 0 / 0.95),
                        transparent 62%),
        linear-gradient(150deg,
                        oklch(0.97 0.015 205 / 0.92),
                        oklch(0.91 0.03 214 / 0.86));
}

.theme-card--cta .card-head {
    margin-bottom: 0;
}

.theme-card--cta a {
    align-self: flex-start;
}

@media (max-width: 960px) {
    .theme-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .theme-card--feature {
        grid-template-columns: minmax(0, 1fr);
    }

    .theme-card--feature .theme-card__media {
        aspect-ratio: 16 / 9;
        height: auto;
        min-height: 0;
    }
}

@media (max-width: 640px) {
    .theme-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .theme-card--feature {
        grid-column: auto;
    }

    .theme-card--tall .theme-card__media {
        min-height: 17rem;
    }
}

/* ====== Carousel ====== */

/* Every gallery slide shows the same window, so the row stays level whatever
   the photographs' own shapes are. */
.carousel-glass .photo-frame {
    aspect-ratio: 4 / 3;
}

.carousel-glass .carousel-list-item {
    scroll-snap-align: start;
    cursor: zoom-in;
}

.carousel-glass .carousel-list-item:focus-visible {
    outline: 2px solid var(--brass);
    outline-offset: 4px;
    border-radius: 18px;
}

.carousel-glass .photo-frame img {
    height: 100%;
    object-fit: cover;
}

.carousel-glass {
    border-radius: 30px;
    background:
        linear-gradient(155deg,
                        oklch(1 0 0 / 0.84),
                        oklch(1 0 0 / 0.55) 60%,
                        oklch(0.97 0.012 208 / 0.6));
    border: 1px solid var(--glass-line);
    box-shadow:
        inset 0 1px 0 oklch(1 0 0 / 0.95),
        var(--glass-shadow);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    backdrop-filter: blur(22px) saturate(160%);
    scroll-behavior: smooth;
    /* Snap each slide to the same inset the strip starts with, so a dot and
       the photograph it names always line up. */
    scroll-snap-type: x mandatory;
    scroll-padding-left: 1.12rem;
    /* The dots, the arrows and the drag are the controls; a native scrollbar
       under the glass only ever read as a stray grey rule. */
    scrollbar-width: none;
    -ms-overflow-style: none;
    transition: box-shadow 700ms var(--ease-lux);
}

.carousel-glass:hover {
    box-shadow:
        inset 0 1px 0 oklch(1 0 0 / 0.9),
        var(--glass-shadow-lifted);
}

.carousel-glass::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.carousel-glass button {
    transition: transform 450ms var(--ease-lux),
        background-color 450ms var(--ease-lux),
        box-shadow 450ms var(--ease-lux);
}

.carousel-glass button:hover {
    transform: scale(1.08);
    box-shadow: 0 16px 30px -18px oklch(0.28 0.04 240 / 0.55);
}

/* ====== Gallery controls ====== */

.carousel-glass {
    cursor: grab;
}

.carousel-glass.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
    scroll-snap-type: none;
}

.carousel-glass.is-dragging img {
    pointer-events: none;
}

.carousel-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: center;
    margin: -0.35rem 0 0.65rem;
}

.carousel-dot {
    width: 0.5rem;
    height: 0.5rem;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 999px;
    background: color-mix(in oklab, var(--sea-ink) 22%, white);
    cursor: pointer;
    transition: width 520ms var(--ease-lux),
        background 520ms var(--ease-lux),
        box-shadow 520ms var(--ease-lux);
}

.carousel-dot:hover {
    background: color-mix(in oklab, var(--sea-ink) 45%, white);
}

.carousel-dot.is-active {
    width: 1.5rem;
    background: linear-gradient(90deg, var(--brass), var(--sea-mid));
    box-shadow: 0 2px 8px -2px oklch(0.55 0.08 74 / 0.6);
}

/* ====== Lightbox ====== */

/* The dialog sits in the browser's top layer; only its contents are styled. */
.lightbox {
    display: none;
    width: min(92vw, 56rem);
    max-width: none;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    overflow: visible;
}

.lightbox[open] {
    display: grid;
    place-items: center;
    animation: lightbox-in 380ms var(--ease-lux) both;
}

.lightbox::backdrop {
    background: oklch(0.18 0.03 235 / 0.74);
    -webkit-backdrop-filter: blur(14px) saturate(120%);
    backdrop-filter: blur(14px) saturate(120%);
}

.lightbox__frame {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    padding: clamp(0.4rem, 1.2vw, 0.85rem);
    border: 1px solid oklch(1 0 0 / 0.32);
    border-radius: 24px;
    background: oklch(1 0 0 / 0.08);
    box-shadow: 0 50px 110px -50px oklch(0.1 0.02 240 / 0.85);
}

/* A tall photograph gets a frame of its own width, not a wide matte. */
.lightbox__frame.is-portrait {
    width: fit-content;
}

.lightbox__img {
    display: block;
    max-width: 100%;
    max-height: min(78vh, 46rem);
    border-radius: 18px;
    box-shadow: 0 30px 60px -34px oklch(0.08 0.02 240 / 0.8);
}

.lightbox__close,
.lightbox__nav {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.85rem;
    height: 2.85rem;
    padding: 0;
    border: 1px solid oklch(1 0 0 / 0.38);
    border-radius: 999px;
    background: oklch(0.3 0.03 232 / 0.5);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    backdrop-filter: blur(16px) saturate(140%);
    color: oklch(1 0 0);
    cursor: pointer;
    transition: background 400ms var(--ease-lux),
        transform 400ms var(--ease-lux);
}

.lightbox__close:hover,
.lightbox__nav:hover {
    background: oklch(0.24 0.03 232 / 0.72);
    transform: scale(1.06);
}

.lightbox__close {
    top: 1rem;
    right: 1rem;
}

.lightbox__nav {
    top: 50%;
    margin-top: -1.42rem;
}

.lightbox__nav--prev {
    left: 0.85rem;
}

.lightbox__nav--next {
    right: 0.85rem;
}

.lightbox__count {
    position: absolute;
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%);
    margin: 0;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: oklch(0.22 0.03 232 / 0.55);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: oklch(1 0 0 / 0.92);
    font-family: 'Lora', ui-serif, serif;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
}

html.is-lightbox,
html.is-lightbox body {
    overflow: hidden;
}

@keyframes lightbox-in {
    from {
        opacity: 0;
        transform: scale(0.985);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* ====== The panorama ====== */

.panorama {
    padding-bottom: clamp(1.1rem, 2.4vw, 1.6rem);
}

.panorama-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.1rem 0 0.9rem;
}

.panorama-tab {
    padding: 0.45rem 1rem;
    border: 1px solid color-mix(in oklab, var(--sea-ink) 16%, transparent);
    border-radius: 999px;
    background: oklch(1 0 0 / 0.62);
    color: color-mix(in oklab, var(--sea-ink) 82%, white);
    font-family: 'Lora', ui-serif, serif;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 500ms var(--ease-lux),
        border-color 500ms var(--ease-lux),
        box-shadow 500ms var(--ease-lux);
}

.panorama-tab:hover {
    border-color: color-mix(in oklab, var(--sea-ink) 30%, transparent);
    background: oklch(1 0 0 / 0.9);
}

.panorama-tab.is-active {
    border-color: color-mix(in oklab, var(--brass) 62%, white);
    background: linear-gradient(155deg,
                              oklch(0.99 0.012 84 / 0.98),
                              oklch(0.94 0.03 84 / 0.94));
    color: var(--brass-deep);
    box-shadow:
        inset 0 1px 0 oklch(1 0 0 / 1),
        0 0 0 1px color-mix(in oklab, var(--brass) 28%, transparent),
        0 10px 20px -16px oklch(0.36 0.03 232 / 0.5);
}

.panorama-stage {
    position: relative;
    overflow: hidden;
    aspect-ratio: 21 / 9;
    border: 1px solid var(--glass-line);
    border-radius: 26px;
    background: linear-gradient(160deg,
                              oklch(0.9 0.02 210),
                              oklch(0.76 0.045 222));
    box-shadow:
        inset 0 1px 0 oklch(1 0 0 / 0.9),
        0 30px 60px -46px oklch(0.36 0.03 232 / 0.6);
    cursor: grab;
    touch-action: pan-y;
    user-select: none;
}

.panorama-stage.is-dragging {
    cursor: grabbing;
}

.panorama-surface {
    position: absolute;
    inset: 0;
    background-repeat: no-repeat;
    background-position: 0 center;
    background-size: auto 165%;
    transition: background-position 260ms linear,
        opacity 320ms var(--ease-lux);
    will-change: background-position;
}

/* Changing scene dips the photograph rather than snapping it. */
.panorama-surface.is-swapping {
    opacity: 0.15;
}

.panorama-stage.is-dragging .panorama-surface {
    transition: none;
}

/* A soft vignette so the photograph sits inside the glass. */
.panorama-stage::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(120% 95% at 50% 42%,
                                transparent 52%,
                                oklch(0.2 0.03 232 / 0.3));
}

.panorama-hint {
    position: absolute;
    left: 1rem;
    bottom: 1.6rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.8rem;
    border: 1px solid oklch(1 0 0 / 0.38);
    border-radius: 999px;
    background: linear-gradient(155deg,
                              oklch(0.3 0.03 232 / 0.48),
                              oklch(0.16 0.03 232 / 0.66));
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
    color: oklch(1 0 0);
    font-size: 0.8rem;
    transition: opacity 600ms var(--ease-lux),
        transform 600ms var(--ease-lux);
}

.panorama-stage.is-used .panorama-hint {
    opacity: 0;
    transform: translateY(4px);
}

/* The rail is a scrubber, not furniture: it appears when the view is held. */
.panorama-rail {
    position: absolute;
    left: 1.1rem;
    right: 1.1rem;
    bottom: 0.9rem;
    z-index: 2;
    height: 3px;
    border-radius: 999px;
    background: oklch(0.16 0.03 232 / 0.5);
    box-shadow: inset 0 0 0 1px oklch(1 0 0 / 0.3),
        0 1px 3px oklch(0.16 0.03 232 / 0.35);
    overflow: hidden;
    opacity: 0;
    transition: opacity 480ms var(--ease-lux);
}

.panorama-stage:hover .panorama-rail,
.panorama-stage:focus-visible .panorama-rail,
.panorama-stage.is-used .panorama-rail,
.panorama-stage.is-dragging .panorama-rail {
    opacity: 1;
}

.panorama-rail__thumb {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 30%;
    border-radius: inherit;
    background: linear-gradient(90deg, oklch(1 0 0 / 0.96), var(--brass));
    box-shadow: 0 0 8px oklch(0.2 0.03 232 / 0.45);
    transition: width 200ms linear, left 200ms linear;
}

@media (max-width: 760px) {
    .panorama-stage {
        aspect-ratio: 4 / 3;
        border-radius: 20px;
    }

    .panorama-surface {
        background-size: auto 138%;
    }
}

/* ====== Details and links ====== */

/* The review QR code is a stamp: small, and on a wide card set to the right. */
.review-qr {
    width: min(100%, 9.5rem);
}

.review-card {
    position: relative;
}

@media (min-width: 720px) {
    .review-card {
        padding-right: 11.5rem;
    }

    .review-card .review-qr {
        position: absolute;
        top: 0;
        right: 0;
        width: 9.5rem;
    }
}

/* A panel that only sets the breathing room around a section. */
.section-shell {
    margin: clamp(1rem, 2.5vw, 2rem) clamp(1rem, 4vw, 2.5rem);
}

/* Term/definition pairs read as a small spec sheet. */
.spec-list dl {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.35rem 1.25rem;
    align-items: baseline;
}

.spec-list dt {
    font-family: 'Lora', ui-serif, serif;
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--brass-deep);
    white-space: nowrap;
}

.spec-list dd {
    margin: 0 0 0.75rem;
}

/* In a narrow column the value needs the whole width, so the term sits above
   it rather than beside it. */
.spec-list--stacked dl {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.3rem;
}

.spec-list--stacked dt {
    white-space: normal;
}

.spec-list--stacked dd {
    margin-bottom: 1.15rem;
}

.spec-list--stacked dd:last-child {
    margin-bottom: 0;
}

.link-lux {
    background-image: linear-gradient(90deg,
                                      var(--brass-deep),
                                      var(--sea-mid));
    background-position: 0 100%;
    background-repeat: no-repeat;
    background-size: 0% 1px;
    transition: background-size 600ms var(--ease-lux),
        color 450ms var(--ease-lux);
}

.link-lux:hover,
.link-lux:focus-visible {
    background-size: 100% 1px;
}

.hover-lift {
    transition: transform 450ms var(--ease-lux),
        box-shadow 450ms var(--ease-lux),
        background-color 450ms var(--ease-lux);
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px -18px oklch(0.28 0.04 240 / 0.6);
}

/* ====== Map ====== */

.map-shell {
    padding: 6px;
    border-radius: 26px;
}

.map-shell iframe {
    display: block;
    border-radius: 20px;
    filter: saturate(0.95) contrast(1.02);
    transition: filter 800ms var(--ease-lux);
}

.map-shell:hover iframe {
    filter: saturate(1.08) contrast(1.05);
}

/* ====== Footer ====== */

.footer-glass {
    position: relative;
    margin-top: clamp(2rem, 5vw, 3.5rem);
    padding: clamp(2.25rem, 5vw, 3.5rem) clamp(1.25rem, 6vw, 3.5rem)
        clamp(1.25rem, 3vw, 1.9rem);
    background:
        linear-gradient(180deg,
                        oklch(1 0 0 / 0.78),
                        oklch(0.965 0.012 210 / 0.7));
    border-top: 1px solid color-mix(in oklab, var(--brass) 30%, transparent);
    -webkit-backdrop-filter: blur(26px) saturate(150%);
    backdrop-filter: blur(26px) saturate(150%);
}

.footer-glass::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg,
                              transparent,
                              var(--brass) 50%,
                              transparent);
    opacity: 0.7;
}

/* Three quiet columns: who we are, where to go, how to reach us. */
.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.75fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: start;
    max-width: 72rem;
    margin-inline: auto;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    max-width: 24rem;
}

.footer-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.9rem;
    height: 2.9rem;
    margin-bottom: 0.15rem;
    border: 1px solid color-mix(in oklab, var(--brass) 38%, white);
    border-radius: 999px;
    color: var(--sea-deep);
    background: linear-gradient(160deg,
                              oklch(1 0 0 / 0.95),
                              oklch(1 0 0 / 0.6));
    box-shadow:
        inset 0 1px 0 oklch(1 0 0 / 1),
        0 10px 22px -16px oklch(0.36 0.03 232 / 0.45);
}

.footer-name {
    font-family: 'Lora', ui-serif, serif;
    font-size: clamp(1.2rem, 2vw, 1.45rem);
    letter-spacing: 0.01em;
    color: var(--sea-ink);
}

.footer-col__title {
    margin-bottom: 0.35rem;
    font-family: 'Lora', ui-serif, serif;
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--brass-deep);
}

.footer-nav,
.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 0.42rem;
}

.footer-contact__row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-nav a,
.footer-contact a,
.footer-legal a {
    color: inherit;
    font-weight: 400;
    text-decoration: none;
}

.footer-nav a,
.footer-contact a {
    font-size: 0.95rem;
}

.footer-legal a {
    color: var(--sea-ink);
}

.footer-nav a:hover,
.footer-contact a:hover,
.footer-legal a:hover {
    color: var(--sea-deep);
}

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.5rem;
    align-items: center;
    justify-content: space-between;
    max-width: 72rem;
    margin: clamp(1.75rem, 3.5vw, 2.5rem) auto 0;
    padding-top: 1rem;
    border-top: 1px solid oklch(1 0 0 / 0.55);
    color: color-mix(in oklab, var(--sea-ink) 72%, white);
}

.footer-legal p {
    margin: 0;
}

.footer-legal__links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.footer-legal__dot {
    opacity: 0.5;
}

/* A single line of attribution, quiet at the very end of the page. */
.footer-credit {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    max-width: 72rem;
    margin: 0.55rem auto 0;
    color: color-mix(in oklab, var(--sea-ink) 62%, white);
}

.footer-credit p {
    margin: 0;
}

.footer-credit a {
    color: inherit;
    font-weight: 400;
    text-decoration: none;
}

.footer-credit a:hover {
    color: var(--sea-deep);
}

@media (max-width: 760px) {
    .footer-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.6rem;
    }

    .footer-legal {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 0.4rem;
    }

    .footer-legal__links {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.15rem;
    }

    /* The legal links stack, so their separators go; the colophon still needs
       its dots to tell authors from licences. */
    .footer-legal .footer-legal__dot {
        display: none;
    }

    .footer-legal__links a:last-child::before {
        content: "· ";
        opacity: 0.5;
    }
}

/* ====== Scroll reveal (only hidden when the script can reveal it) ====== */

.js [data-reveal] {
    opacity: 0;
    transform: translateY(26px) scale(0.995);
    filter: blur(6px);
    transition: opacity 1000ms var(--ease-lux) var(--reveal-delay, 0ms),
        transform 1100ms var(--ease-lux) var(--reveal-delay, 0ms),
        filter 900ms var(--ease-lux) var(--reveal-delay, 0ms);
}

.js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
    filter: none;
}

/* ====== Focus and fallbacks ====== */

:where(a, button, input, select, textarea, iframe):focus-visible {
    outline: 2px solid var(--brass);
    outline-offset: 3px;
    border-radius: 6px;
}

@supports not ((-webkit-backdrop-filter: blur(2px)) or (backdrop-filter: blur(2px))) {
    .glass,
    .carousel-glass,
    .footer-glass {
        background: oklch(0.98 0.008 205 / 0.95);
    }
}

/* ====== Keyframes ====== */

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.99);
        filter: blur(8px);
    }
    to {
        opacity: 1;
        transform: none;
        filter: none;
    }
}

@keyframes anchor-bob {
    0%,
    100% {
        transform: translateY(0) rotate(-3deg);
    }
    50% {
        transform: translateY(-7px) rotate(3deg);
    }
}

@keyframes shimmer-drift {
    0%,
    100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes glint-breathe {
    from {
        opacity: 0.45;
        transform: translate3d(-2%, 0, 0) scale(1);
    }
    to {
        opacity: 0.8;
        transform: translate3d(2%, 1%, 0) scale(1.06);
    }
}

@keyframes caustics {
    from {
        transform: translate3d(-4%, 0, 0);
    }
    to {
        transform: translate3d(4%, 0, 0);
    }
}

@keyframes tide-drift {
    from {
        transform: translate3d(-3%, 1%, 0) scaleX(1);
    }
    to {
        transform: translate3d(3%, -1%, 0) scaleX(1.06);
    }
}

/* ====== Less motion, same page ====== */

@media (prefers-reduced-motion: reduce) {
    .sea-canvas::before,
    .sea-canvas::after,
    .tide,
    .anchor-bob,
    .shimmer,
    .hero-title-row,
    .hero-content,
    .lightbox[open] {
        animation: none;
    }

    .shimmer {
        background: none;
        color: var(--sea-deep);
        -webkit-text-fill-color: currentColor;
    }

    .js [data-reveal],
    .js [data-reveal].is-visible {
        opacity: 1;
        transform: none;
        filter: none;
    }

    .glass--card:hover,
    .photo-frame:hover img,
    .carousel-glass button:hover,
    .hero-actions a:hover,
    .hover-lift:hover {
        transform: none;
    }
}

@media (max-width: 640px) {
    .spec-list dl {
        grid-template-columns: 1fr;
    }

    .hero {
        border-radius: 22px;
    }

    /* Tighter gutters, so a phone shows the content rather than the margin. */
    .hero-shell {
        padding: 0.7rem 0.7rem 0;
    }

    .section-shell {
        margin: 0.7rem;
    }

    .glass--panel {
        padding: 1.05rem;
    }

    .glass--card:not(.theme-card) {
        border-radius: 22px;
        padding: 1rem;
    }

    .card-row,
    .theme-grid {
        gap: 0.7rem;
    }

    .card-head {
        gap: 0.6rem;
        margin-bottom: 0.6rem;
    }

    .medallion {
        width: 2.3rem;
        height: 2.3rem;
    }

    .theme-card__body {
        padding: 0.95rem;
    }

    .theme-card--cta {
        padding: 1.05rem;
    }

    .gold-rule {
        margin: 1.1rem auto;
    }

    .footer-glass {
        padding: 1.8rem 0.9rem 1.1rem;
    }

    /* One photograph fills the phone, the next one only peeks in. */
    .carousel-list {
        gap: 0.85rem;
        padding: 0.7rem;
        scroll-padding-left: 0.7rem;
    }

    .carousel-list-item {
        width: min(74vw, 18rem);
    }

    .carousel-frame button {
        width: 2.55rem;
        height: 2.55rem;
        font-size: 1.35rem;
    }

    /* Twenty dots have to stay on one line. */
    .carousel-dots {
        gap: 0.28rem;
        margin: -0.1rem 0 0.6rem;
    }

    .carousel-dot,
    .carousel-dot.is-active {
        height: 0.36rem;
    }

    .carousel-dot {
        width: 0.36rem;
    }

    .carousel-dot.is-active {
        width: 1rem;
    }

    .panorama-rail {
        left: 0.7rem;
        right: 0.7rem;
    }

    .lightbox {
        width: 96vw;
    }

    .lightbox__img {
        max-height: 72vh;
    }

    .lightbox__close,
    .lightbox__nav {
        width: 2.4rem;
        height: 2.4rem;
    }

    .lightbox__nav {
        margin-top: -1.2rem;
    }
}
