/* BerthDesk — public site.
   Direction: a nautical chart at dusk. Deep harbour navy paper, fine chart
   rules, brass fittings for the one accent, and shallow-water aqua kept for
   the berth plan only. The display face is the high-contrast serif you find on
   a yacht's transom; everything operational is set in the condensed sans used
   on berth signage. */

:root {
    --ink: #0b1c2c;
    --ink-2: #12293d;
    --ink-3: #17344b;
    --chart: #1d4a63;
    --brass: #c8a24a;
    --brass-soft: rgba(200, 162, 74, .16);
    --foam: #7fd3c4;
    --bone: #efe8da;
    --bone-dim: rgba(239, 232, 218, .62);
    --rule: rgba(239, 232, 218, .12);

    --display: 'Bodoni Moda', Georgia, 'Times New Roman', serif;
    --text: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --data: 'Barlow Condensed', 'Barlow', system-ui, sans-serif;

    --measure: 1180px;
}

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

body {
    margin: 0;
    background: var(--ink);
    color: var(--bone);
    font-family: var(--text);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

/* The chart grid: faint soundings paper behind everything. */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(var(--rule) 1px, transparent 1px),
        linear-gradient(90deg, var(--rule) 1px, transparent 1px);
    background-size: 96px 96px;
    opacity: .5;
    mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 78%);
}

.wrap { position: relative; z-index: 1; max-width: var(--measure); margin: 0 auto; padding: 0 24px; }

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

/* ---------------------------------------------------------------- header */
.site-head {
    position: relative; z-index: 2;
    display: flex; align-items: center; justify-content: space-between;
    gap: 24px; padding: 22px 0;
}
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; }
.brand-mark {
    font-family: var(--display); font-size: 1.45rem; letter-spacing: -.01em;
}
.brand-mark em { font-style: italic; color: var(--brass); }
.brand-sub {
    font-family: var(--data); font-size: .72rem; letter-spacing: .28em;
    text-transform: uppercase; color: var(--bone-dim);
}
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a {
    font-family: var(--data); font-size: .95rem; letter-spacing: .1em;
    text-transform: uppercase; text-decoration: none; color: var(--bone-dim);
    transition: color .2s;
}
.site-nav a:hover, .site-nav a:focus-visible { color: var(--bone); }
.site-nav .signin { color: var(--brass); }

/* On a phone the header has room for the wordmark and two links, not for the
   strapline and the in-page anchors as well — those sections are a scroll
   away regardless. */
@media (max-width: 760px) {
    .site-head { padding: 16px 0; gap: 14px; }
    .brand-sub { display: none; }
    .site-nav { gap: 18px; }
    .site-nav a.anchor { display: none; }
}

/* ------------------------------------------------------------------ hero */
.hero { padding: 56px 0 40px; display: grid; gap: 44px; grid-template-columns: 1fr; }
@media (min-width: 940px) { .hero { grid-template-columns: 1.05fr .95fr; align-items: center; padding: 84px 0 64px; } }

.eyebrow {
    font-family: var(--data); font-size: .84rem; letter-spacing: .3em;
    text-transform: uppercase; color: var(--brass); margin: 0 0 18px;
}
.hero h1 {
    font-family: var(--display); font-weight: 400; font-style: italic;
    font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 1.02;
    letter-spacing: -.02em; margin: 0 0 20px;
}
.hero p.lead { font-size: 1.12rem; color: var(--bone-dim); margin: 0 0 30px; max-width: 34em; }

.actions { display: flex; flex-wrap: wrap; gap: 14px; }
.btn {
    display: inline-flex; align-items: center; gap: 10px;
    font-family: var(--data); font-size: 1rem; letter-spacing: .12em; text-transform: uppercase;
    padding: 13px 26px; border-radius: 2px; text-decoration: none; border: 1px solid transparent;
    transition: background .2s, border-color .2s, color .2s;
}
.btn-primary { background: var(--brass); color: var(--ink); }
.btn-primary:hover, .btn-primary:focus-visible { background: #d9b45e; }
.btn-ghost { border-color: var(--rule); color: var(--bone); }
.btn-ghost:hover, .btn-ghost:focus-visible { border-color: var(--brass); color: var(--brass); }

/* --------------------------------------------------- signature: the berth plan
   The one thing the page should be remembered by. A pontoon with numbered
   berths, which is the product's core object and the artefact every marina
   manager reads all day. */
.plan {
    border: 1px solid var(--rule); background: linear-gradient(180deg, var(--ink-2), var(--ink));
    padding: 22px 20px 18px; border-radius: 3px;
}
.plan-head {
    display: flex; justify-content: space-between; align-items: baseline;
    font-family: var(--data); font-size: .8rem; letter-spacing: .22em;
    text-transform: uppercase; color: var(--bone-dim); margin-bottom: 16px;
}
.pontoon { position: relative; }
.berth-row { display: grid; gap: 6px; grid-template-columns: repeat(5, 1fr); }

/* The pontoon itself. The cleats are the small marks a plan actually shows. */
.pontoon-line {
    position: relative; height: 3px; margin: 10px -10px;
    background: linear-gradient(90deg, transparent, var(--chart) 4%, var(--chart) 96%, transparent);
}
.pontoon-line::before, .pontoon-line::after {
    content: ''; position: absolute; top: -3px; width: 9px; height: 9px;
    border: 1px solid var(--chart); border-radius: 50%; background: var(--ink-2);
}
.pontoon-line::before { left: 2%; }
.pontoon-line::after { right: 2%; }

.berth {
    position: relative; z-index: 1;
    aspect-ratio: 4 / 3; border: 1px solid var(--rule); border-radius: 2px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    font-family: var(--data); font-size: .84rem; letter-spacing: .06em;
    color: var(--bone-dim); background: rgba(29, 74, 99, .18);
    animation: berth-in .5s cubic-bezier(.16, 1, .3, 1) both;
}
/* Berths on the far side of the pontoon are read from the other direction. */
.berth-row.lower .berth { flex-direction: column-reverse; }
.berth.taken { background: var(--brass-soft); border-color: rgba(200, 162, 74, .5); color: var(--bone); }
.berth.transit { background: rgba(127, 211, 196, .14); border-color: rgba(127, 211, 196, .45); color: var(--foam); }
.berth .no { font-weight: 600; }
.berth .name {
    max-width: 100%; font-size: .72rem; letter-spacing: .02em; color: var(--bone-dim);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 4px;
}
@keyframes berth-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.legend {
    display: flex; flex-wrap: wrap; gap: 18px; margin-top: 16px;
    font-family: var(--data); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
    color: var(--bone-dim);
}
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.swatch { width: 11px; height: 11px; border: 1px solid var(--rule); border-radius: 2px; }
.swatch.free { background: rgba(29, 74, 99, .18); }
.swatch.taken { background: var(--brass-soft); border-color: rgba(200, 162, 74, .5); }
.swatch.transit { background: rgba(127, 211, 196, .14); border-color: rgba(127, 211, 196, .45); }

/* -------------------------------------------------------------- sections */
.section { padding: 64px 0; border-top: 1px solid var(--rule); }
.section h2 {
    font-family: var(--display); font-weight: 400; font-size: clamp(1.9rem, 3.4vw, 2.7rem);
    line-height: 1.1; letter-spacing: -.015em; margin: 0 0 10px;
}
.section .lead { color: var(--bone-dim); margin: 0 0 34px; max-width: 46em; }

/* The day runs in order, so the steps are numbered — the sequence is real. */
.flow { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
@media (min-width: 760px) { .flow { grid-template-columns: repeat(5, 1fr); } }
.step { background: var(--ink); padding: 24px 20px 26px; }
.step-no {
    font-family: var(--data); font-size: .78rem; letter-spacing: .24em;
    color: var(--brass); display: block; margin-bottom: 12px;
}
.step h3 { font-family: var(--text); font-size: 1.02rem; font-weight: 600; margin: 0 0 8px; }
.step p { margin: 0; font-size: .95rem; color: var(--bone-dim); }

.cards { display: grid; gap: 18px; }
@media (min-width: 760px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { border: 1px solid var(--rule); padding: 24px 22px; background: var(--ink-2); border-radius: 3px; }
.card h3 { font-family: var(--text); font-size: 1.05rem; font-weight: 600; margin: 0 0 8px; }
.card p { margin: 0; color: var(--bone-dim); font-size: .96rem; }

.posts { display: grid; gap: 18px; }
@media (min-width: 760px) { .posts { grid-template-columns: repeat(3, 1fr); } }
.post {
    border: 1px solid var(--rule); padding: 22px; border-radius: 3px;
    text-decoration: none; display: block; transition: border-color .2s, transform .2s;
}
.post:hover, .post:focus-visible { border-color: var(--brass); transform: translateY(-2px); }
.post .date {
    font-family: var(--data); font-size: .78rem; letter-spacing: .2em;
    text-transform: uppercase; color: var(--brass);
}
.post h3 { font-family: var(--text); font-size: 1.05rem; font-weight: 600; margin: 8px 0 6px; }
.post p { margin: 0; color: var(--bone-dim); font-size: .94rem; }

.cta {
    border: 1px solid var(--rule); background: var(--ink-2);
    padding: 40px 32px; border-radius: 3px; text-align: center;
}
.cta h2 { margin-bottom: 8px; }
.cta p { color: var(--bone-dim); margin: 0 auto 26px; max-width: 42em; }

/* --------------------------------------------------------------- footer */
.site-foot { border-top: 1px solid var(--rule); padding: 30px 0 44px; }
.foot-row {
    display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between;
    font-family: var(--data); font-size: .86rem; letter-spacing: .1em; text-transform: uppercase;
    color: var(--bone-dim);
}
.foot-row a { text-decoration: none; }
.foot-row a:hover, .foot-row a:focus-visible { color: var(--brass); }
.langs { display: flex; flex-wrap: wrap; gap: 12px; }
.langs a.active { color: var(--brass); }

/* --------------------------------------------------------- article pages */
.article { max-width: 44rem; margin: 0 auto; padding: 48px 0 72px; }
.article h1 {
    font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 4.4vw, 3rem);
    line-height: 1.1; margin: 12px 0 18px;
}
.article .body { font-size: 1.06rem; }
.article .body h2 { font-family: var(--text); font-size: 1.3rem; font-weight: 600; margin: 34px 0 10px; }
.article .body p { margin: 0 0 16px; color: var(--bone-dim); }
.article .body a { color: var(--brass); }

:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
