/* catamarans-clone — main stylesheet
   Premium yacht-marketplace design. Editorial typography, generous whitespace,
   navy + sand palette, photo-led layouts. */

:root {
    --navy: #0a1f33;
    --navy-2: #0f2a44;
    --navy-3: #14375a;
    --ink: #0a1622;
    --paper: #fbfaf6;
    --sand: #f3ede0;
    --sand-2: #e8ddc4;
    --gold: #b9985a;
    --gold-2: #a48148;
    --rust: #b35a2c;
    --mute: #6c7785;
    --line: #d6d2c4;
    --line-2: #e7e2d4;
    --ok: #2a7e4f;
    --bad: #b53c3c;
    --max: 1320px;
    --gap: clamp(1rem, 2vw, 2rem);
    --radius: 4px;
    --shadow-sm: 0 1px 2px rgba(10, 22, 34, 0.05);
    --shadow: 0 6px 24px -10px rgba(10, 22, 34, 0.18);
    --shadow-lg: 0 22px 50px -20px rgba(10, 22, 34, 0.30);
    --transition: 200ms cubic-bezier(.4,0,.2,1);
    --font-serif: 'Cormorant Garamond', 'Times New Roman', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-3); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-2); }
button { font: inherit; cursor: pointer; }

h1, h2, h3, h4, h5 {
    font-family: var(--font-serif);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--navy);
    margin: 0 0 0.4em 0;
}
h1 { font-size: clamp(2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1em 0; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gap); }
.wrap-narrow { max-width: 880px; margin: 0 auto; padding: 0 var(--gap); }
.section { padding: clamp(3rem, 7vw, 6rem) 0; }
.section-tight { padding: clamp(2rem, 4vw, 3.5rem) 0; }

.eyebrow {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold-2);
}
.muted { color: var(--mute); }
.tnum { font-variant-numeric: tabular-nums; }

/* ============= header ============= */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(251, 250, 246, 0.92);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--line-2);
}
.site-header__inner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.9rem 0;
    gap: 1rem;
}
.brand {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 1.35rem;
    letter-spacing: 0.02em;
    color: var(--navy);
    display: flex; align-items: center; gap: 0.6rem;
}
.brand__mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    background: var(--navy);
    color: var(--paper);
    border-radius: 50%;
    font-size: 0.85rem;
    font-family: var(--font-sans);
    font-weight: 700;
    letter-spacing: 0.05em;
}
.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a {
    font-size: 0.92rem; font-weight: 500;
    color: var(--ink);
    padding: 0.5rem 0;
    position: relative;
}
.nav a:hover { color: var(--navy-3); }
.nav a.active::after {
    content: ''; position: absolute; bottom: -0.5rem; left: 0; right: 0;
    height: 2px; background: var(--gold);
}
.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--line);
    padding: 0.45rem 0.7rem;
    border-radius: var(--radius);
}

/* ============= buttons ============= */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.6rem;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: var(--radius);
    border: 1px solid transparent;
    transition: all var(--transition);
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
}
.btn--primary { background: var(--navy); color: var(--paper); }
.btn--primary:hover { background: var(--navy-2); color: var(--paper); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--ghost:hover { background: var(--navy); color: var(--paper); }
.btn--gold { background: var(--gold); color: var(--paper); }
.btn--gold:hover { background: var(--gold-2); color: var(--paper); }
.btn--sm { padding: 0.5rem 0.95rem; font-size: 0.82rem; }
.btn--block { width: 100%; }

/* ============= hero ============= */
.hero {
    position: relative;
    min-height: 78vh;
    display: flex; align-items: center;
    color: var(--paper);
    background: var(--navy);
    overflow: hidden;
}
.hero__bg {
    position: absolute; inset: 0; z-index: 0;
    background-size: cover; background-position: center;
    filter: brightness(0.55) saturate(110%);
}
.hero__overlay {
    position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(180deg, rgba(10,22,34,0.15) 0%, rgba(10,22,34,0.55) 100%);
}
.hero__inner {
    position: relative; z-index: 2;
    padding: 6rem 0 4rem 0;
    width: 100%;
}
.hero h1 {
    color: var(--paper);
    font-size: clamp(2.5rem, 6vw, 5rem);
    max-width: 18ch;
    margin-bottom: 0.4em;
}
.hero p.lead {
    font-size: clamp(1.05rem, 1.4vw, 1.25rem);
    max-width: 56ch;
    color: rgba(251, 250, 246, 0.88);
    margin-bottom: 2.2rem;
}
.hero .eyebrow { color: var(--sand-2); }

/* ============= search box ============= */
.search-bar {
    background: var(--paper);
    color: var(--ink);
    border-radius: var(--radius);
    padding: 1.1rem;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr auto;
    gap: 0.8rem;
    box-shadow: var(--shadow-lg);
    align-items: end;
}
.search-bar label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--mute);
    display: block;
    margin-bottom: 0.35rem;
}
.search-bar input, .search-bar select {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 0.1rem;
    font-size: 0.95rem;
    color: var(--ink);
    outline: none;
    font-family: inherit;
}
.search-bar input:focus, .search-bar select:focus { border-bottom-color: var(--navy); }
.search-bar .field { min-width: 0; }
.search-bar .btn { height: 44px; align-self: end; }

/* ============= vessel grid / cards ============= */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: clamp(1.2rem, 2vw, 2rem);
}
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid--3, .grid--2 { grid-template-columns: 1fr; } }

.card {
    background: var(--paper);
    border: 1px solid var(--line-2);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line); }

.card__media {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--sand);
    overflow: hidden;
}
.card__media img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 600ms cubic-bezier(.2,.7,.2,1);
}
.card:hover .card__media img { transform: scale(1.04); }
.card__badge {
    position: absolute; top: 0.9rem; left: 0.9rem;
    padding: 0.35rem 0.7rem;
    background: rgba(10, 22, 34, 0.85);
    color: var(--paper);
    font-size: 0.7rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.12em;
    border-radius: 2px;
}
.card__badge--sold { background: var(--rust); }
.card__badge--featured { background: var(--gold); }

.card__body {
    padding: 1.1rem 1.2rem 1.4rem 1.2rem;
    display: flex; flex-direction: column;
    flex: 1;
}
.card__title {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--navy);
    margin: 0 0 0.4rem 0;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card__meta {
    color: var(--mute);
    font-size: 0.85rem;
    margin-bottom: 0.85rem;
    display: flex; flex-wrap: wrap; gap: 0.4rem 1rem;
}
.card__price {
    font-family: var(--font-serif);
    font-size: 1.45rem;
    font-weight: 600;
    color: var(--navy);
    margin-top: auto;
    font-variant-numeric: tabular-nums;
}
.card__price--poa { color: var(--gold-2); font-size: 1.1rem; }

/* ============= vessel detail ============= */
.vd-hero {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 0.5rem;
    aspect-ratio: 16 / 8;
    margin: 0 auto;
    max-width: var(--max);
    padding: 0 var(--gap);
}
@media (max-width: 900px) { .vd-hero { grid-template-columns: 1fr; aspect-ratio: 4 / 3; } }
.vd-hero__main, .vd-hero__side {
    background: var(--sand);
    overflow: hidden;
    position: relative;
}
.vd-hero__main img, .vd-hero__side img { width: 100%; height: 100%; object-fit: cover; }
.vd-hero__side {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 0.5rem;
}
.vd-hero__side .tile { position: relative; overflow: hidden; background: var(--sand); }
.vd-hero__more {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(10,22,34,0.6); color: var(--paper);
    font-family: var(--font-serif);
    font-size: 1.5rem;
    cursor: pointer;
}

.vd-title {
    padding: 2rem 0 1rem 0;
}
.vd-title h1 {
    margin: 0;
    font-size: clamp(2rem, 4.5vw, 3.5rem);
}
.vd-title__meta {
    margin-top: 0.7rem;
    color: var(--mute);
    display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem;
    font-size: 0.95rem;
}
.vd-price {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 3.6vw, 2.8rem);
    color: var(--navy);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    margin: 0.6rem 0 0 0;
}

.vd-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: clamp(2rem, 4vw, 4rem);
    padding-bottom: 4rem;
    align-items: start;
}
@media (max-width: 900px) { .vd-layout { grid-template-columns: 1fr; } }

.specs-card {
    background: var(--sand);
    border-radius: var(--radius);
    padding: 1.6rem;
    position: sticky;
    top: 90px;
}
.specs-card h3 {
    font-size: 0.85rem;
    font-family: var(--font-sans);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--mute);
    margin: 0 0 1rem 0;
}
.specs-list { list-style: none; padding: 0; margin: 0; }
.specs-list li {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.92rem;
}
.specs-list li:last-child { border-bottom: 0; }
.specs-list li dt, .specs-list li .k { color: var(--mute); }
.specs-list li .v { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }

.spec-section {
    margin: 1.6rem 0 0 0;
    padding: 1.6rem 0 0 0;
    border-top: 1px solid var(--line-2);
}
.spec-section:first-child { margin: 0; padding: 0; border: 0; }
.spec-section h3 {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    color: var(--navy);
    margin: 0 0 0.6rem 0;
}
.spec-section .content {
    color: var(--ink);
    font-size: 1rem;
    line-height: 1.7;
    white-space: pre-wrap;
}
.spec-section .content p { margin: 0 0 0.9em 0; }

/* ============= filters / listings ============= */
.listings-hero {
    background: var(--sand);
    padding: 2.5rem 0 2rem 0;
    border-bottom: 1px solid var(--line-2);
}
.listings-hero h1 { margin: 0 0 0.4rem 0; }
.filter-form {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.7rem;
    align-items: end;
    margin-top: 1.6rem;
    padding: 1.1rem;
    background: var(--paper);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
@media (max-width: 900px) { .filter-form { grid-template-columns: 1fr 1fr; } }
.filter-form label { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--mute); display: block; margin-bottom: 0.3rem; }
.filter-form input, .filter-form select { width: 100%; padding: 0.55rem 0.4rem; border: 1px solid var(--line); border-radius: 3px; background: var(--paper); font-size: 0.92rem; font-family: inherit; }
.filter-form .btn { height: 40px; }

.results-bar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.4rem 0 1rem 0;
    color: var(--mute);
}
.results-bar .count { font-weight: 600; color: var(--ink); }

/* ============= news / blog ============= */
.post-hero {
    aspect-ratio: 21 / 9;
    background: var(--sand);
    overflow: hidden;
    margin-bottom: -3rem;
}
.post-hero img { width: 100%; height: 100%; object-fit: cover; }
.post-article {
    background: var(--paper);
    position: relative;
    padding: 3rem clamp(1rem, 3vw, 3rem) 4rem;
    max-width: 760px;
    margin: 0 auto;
    z-index: 1;
}
.post-article h1 { margin-bottom: 0.6rem; }
.post-article .meta {
    color: var(--mute);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--line-2);
}
.post-article p, .post-article li {
    font-size: 1.08rem;
    line-height: 1.75;
    color: #1a2434;
}
.post-article h2 { font-size: 1.85rem; margin: 2rem 0 0.6rem 0; }
.post-article h3 { font-size: 1.4rem; margin: 1.6rem 0 0.5rem 0; }
.post-article img { border-radius: var(--radius); margin: 1.6rem auto; }
.post-article blockquote {
    border-left: 3px solid var(--gold);
    padding: 0.4rem 0 0.4rem 1.4rem;
    margin: 1.6rem 0;
    font-family: var(--font-serif);
    font-size: 1.25rem;
    color: var(--navy);
}

/* ============= page (static) ============= */
.page-article {
    padding: 3rem clamp(1rem, 3vw, 3rem) 5rem;
    max-width: 880px;
    margin: 0 auto;
}
.page-article h1 { margin-bottom: 0.5rem; }
.page-article .lead { color: var(--mute); font-size: 1.15rem; margin-bottom: 2rem; }
.page-article p, .page-article li { font-size: 1.05rem; line-height: 1.75; }

/* ============= footer ============= */
.site-footer {
    background: var(--navy);
    color: rgba(251,250,246,0.78);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}
.site-footer h4 { color: var(--paper); font-family: var(--font-sans); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 1rem; }
.site-footer__cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 3rem; }
@media (max-width: 800px) { .site-footer__cols { grid-template-columns: 1fr 1fr; } }
.site-footer__cols ul { list-style: none; padding: 0; margin: 0; }
.site-footer__cols li { margin-bottom: 0.5rem; }
.site-footer a { color: rgba(251,250,246,0.78); font-size: 0.92rem; }
.site-footer a:hover { color: var(--gold); }
.site-footer .brand { color: var(--paper); }
.site-footer .brand__mark { background: var(--paper); color: var(--navy); }
.site-footer__base {
    padding-top: 2rem;
    border-top: 1px solid rgba(251,250,246,0.12);
    display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    font-size: 0.82rem;
    color: rgba(251,250,246,0.55);
}

/* ============= sections ============= */
.section-head {
    display: flex; justify-content: space-between; align-items: end;
    margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem;
}
.section-head h2 { margin: 0; }
.section-head .link { font-weight: 600; color: var(--navy); }
.section-head .link:hover { color: var(--gold-2); }

.section--sand { background: var(--sand); }
.section--navy { background: var(--navy); color: var(--paper); }
.section--navy h2 { color: var(--paper); }
.section--navy .eyebrow { color: var(--sand-2); }

/* ============= categories / chips ============= */
.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chip {
    display: inline-flex; align-items: center;
    padding: 0.45rem 0.95rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.85rem;
    color: var(--ink);
    background: var(--paper);
    transition: all var(--transition);
}
.chip:hover, .chip.active { border-color: var(--navy); background: var(--navy); color: var(--paper); }

/* ============= utilities ============= */
.flex { display: flex; }
.gap { gap: 1rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.text-center { text-align: center; }

/* ============= lightbox ============= */
.lightbox {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(10, 22, 34, 0.95);
    display: none; align-items: center; justify-content: center;
    padding: 2rem;
}
.lightbox.open { display: flex; }
.lightbox__img { max-width: 95vw; max-height: 90vh; object-fit: contain; }
.lightbox__close {
    position: absolute; top: 1.4rem; right: 1.4rem;
    background: transparent; border: 1px solid rgba(251,250,246,0.4);
    color: var(--paper);
    width: 44px; height: 44px; border-radius: 50%;
    font-size: 1.4rem;
}
.lightbox__nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: transparent; border: 1px solid rgba(251,250,246,0.4);
    color: var(--paper);
    width: 52px; height: 52px; border-radius: 50%;
    font-size: 1.6rem;
}
.lightbox__nav--prev { left: 1.4rem; }
.lightbox__nav--next { right: 1.4rem; }

/* ============= thumbs strip (vessel) ============= */
.thumb-strip {
    margin-top: 0.8rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.5rem;
    max-width: var(--max);
    padding: 0 var(--gap);
    margin-left: auto; margin-right: auto;
}
.thumb {
    aspect-ratio: 4 / 3;
    background: var(--sand);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color var(--transition);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb:hover, .thumb.active { border-color: var(--gold); }

/* ============= mobile ============= */
@media (max-width: 800px) {
    .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--paper); border-bottom: 1px solid var(--line-2); padding: 1rem var(--gap); gap: 0; }
    .nav.open { display: flex; }
    .nav a { padding: 0.7rem 0; border-bottom: 1px solid var(--line-2); }
    .nav-toggle { display: inline-flex; }
    .search-bar { grid-template-columns: 1fr 1fr; }
    .search-bar .btn { grid-column: 1 / -1; }
    .vd-title__meta { font-size: 0.85rem; }
}
