/* PT. Berlyn Group Management - site styles (hand-written, no framework, no inline styles needed) */

:root {
    --brand-50: #eef2fa;
    --brand-100: #dbe4f4;
    --brand-600: #15367d;
    --brand-700: #0b2a6b;
    --brand-800: #082157;
    --brand-900: #061941;
    --gold-400: #e6c36a;
    --gold-500: #c9a24a;
    --gold-600: #a9812f;
    --text: #1e293b;
    --muted: #475569;
    --line: #e2e8f0;
    --radius: 0.75rem;
    --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .1);
    --shadow-lg: 0 12px 28px rgba(15, 23, 42, .16);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: #fff;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0; color: var(--brand-800); }
h1 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 600; color: #0f172a; }
p { margin: 0 0 1rem; }
ul { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 1rem; }
.container--narrow { max-width: 52rem; }
.section { padding-top: 4rem; padding-bottom: 4rem; }
.section--alt { background: var(--brand-50); }
.section__head { text-align: center; margin-bottom: 2.5rem; }
.text-center { text-align: center; }
.lead { color: var(--muted); font-size: 1.1rem; max-width: 42rem; }
.section__head .lead { margin-left: auto; margin-right: auto; }
.body-text { color: var(--muted); font-size: 1.05rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .2em; font-size: .85rem; font-weight: 700; color: var(--gold-400); margin-bottom: 1rem; }
.rule { width: 4rem; height: 4px; border-radius: 2px; background: var(--gold-500); margin: .75rem 0 1rem; }
.rule--center { margin-left: auto; margin-right: auto; }
.link { color: var(--brand-600); font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--brand-600); color: #fff; padding: .6rem 1rem; z-index: 100; border-radius: 0 0 .5rem 0; }
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block; border: 0; cursor: pointer; text-decoration: none; text-align: center;
    font: inherit; font-weight: 600; padding: .75rem 1.5rem; border-radius: .5rem;
    transition: background-color .2s, transform .2s, box-shadow .2s;
}
.btn--primary { background: var(--brand-600); color: #fff; }
.btn--primary:hover { background: var(--brand-700); }
.btn--gold { background: var(--gold-500); color: var(--brand-900); box-shadow: var(--shadow); }
.btn--gold:hover { background: var(--gold-400); }
.btn--ghost { border: 1px solid rgba(255, 255, 255, .7); color: #fff; background: transparent; }
.btn--ghost:hover { background: rgba(255, 255, 255, .12); }
.btn--wa { background: #16a34a; color: #fff; }
.btn--wa:hover { background: #15803d; }
.btn--block { display: block; width: 100%; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.btn--header { padding: .5rem 1rem; font-size: .9rem; }
:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 2px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .6rem; padding-bottom: .6rem; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.brand__mark { height: 2.6rem; width: auto; }
.brand__text { display: block; line-height: 1.15; }
.brand__line { display: block; font-size: .9rem; font-weight: 800; letter-spacing: .03em; color: var(--brand-700); }
.nav { display: none; align-items: center; gap: 1.5rem; }
.nav a { text-decoration: none; font-size: .92rem; color: var(--muted); padding: .25rem 0; }
.nav a:hover { color: var(--brand-600); }
.nav a.is-active { color: var(--brand-600); font-weight: 700; }
.site-header__actions { display: flex; align-items: center; gap: .5rem; }
.site-header__actions .btn--header { display: none; }
.nav-toggle { background: transparent; border: 0; padding: .5rem; border-radius: .5rem; cursor: pointer; color: #334155; }
.nav-toggle:hover { background: #f1f5f9; }
.mobile-menu { border-top: 1px solid var(--line); background: #fff; }
.mobile-menu ul { padding: .75rem 1rem 1rem; display: grid; gap: .25rem; }
.mobile-menu a { display: block; padding: .6rem .75rem; border-radius: .5rem; text-decoration: none; color: #334155; }
.mobile-menu a:hover { background: #f1f5f9; }
.mobile-menu a[aria-current="page"] { font-weight: 700; color: var(--brand-600); }
.mobile-menu .btn { color: #fff; }

@media (min-width: 768px) {
    .brand__line { font-size: 1rem; }
    .brand__mark { height: 2.8rem; }
    .nav { display: flex; }
    .site-header__actions .btn--header { display: inline-block; }
    .nav-toggle, .mobile-menu { display: none !important; }
}

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; background: var(--brand-800); color: #fff; }
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero__overlay { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(6, 25, 65, .96), rgba(8, 33, 87, .9) 55%, rgba(11, 42, 107, .72)); }
.hero__grid { display: grid; gap: 2.5rem; align-items: center; padding-top: 4rem; padding-bottom: 4rem; }
.hero h1 { color: #fff; }
.hero__subtitle { font-size: 1.15rem; color: var(--brand-100); margin: 1.25rem 0 0; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.logo-card { background: #fff; border-radius: 1rem; padding: 1.5rem; max-width: 24rem; width: 100%; margin: 0 auto; box-shadow: 0 25px 50px rgba(0, 0, 0, .35); }
.logo-card--small { display: inline-block; width: auto; padding: .75rem; border-radius: .6rem; max-width: none; box-shadow: none; margin: 0; }
.logo-card--small img { height: 5rem; width: auto; }
@media (min-width: 768px) {
    .hero__grid { grid-template-columns: 1fr 1fr; padding-top: 6rem; padding-bottom: 6rem; }
}

/* ---------- Page title band ---------- */
.page-title { background: var(--brand-50); padding: 3.5rem 0; }
.page-title .lead { margin: 1rem 0 0; }

/* Page title band with a seafarer photo that fades into the band colour */
.page-title--photo { position: relative; isolation: isolate; overflow: hidden; padding: 3rem 0 0; }
.page-title--photo .container { position: relative; z-index: 1; padding-bottom: 1.75rem; }
.page-title__photo {
    display: block; width: 100%; height: 12rem; object-fit: cover; object-position: center 25%;
    margin-top: 1rem;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 45%);
    mask-image: linear-gradient(180deg, transparent 0, #000 45%);
}
@media (min-width: 768px) {
    .page-title--photo { min-height: 15rem; display: flex; align-items: center; padding: 3.5rem 0; }
    .page-title--photo .container { padding-bottom: 0; }
    .page-title__photo {
        position: absolute; z-index: 0; top: 0; right: 0; bottom: 0;
        width: 62%; max-width: 58rem; height: 100%; margin: 0;
        object-position: 50% 22%;
        -webkit-mask-image: linear-gradient(90deg, transparent 0, rgba(0, 0, 0, .55) 16%, #000 42%);
        mask-image: linear-gradient(90deg, transparent 0, rgba(0, 0, 0, .55) 16%, #000 42%);
    }
    .page-title--photo::after {
        content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
        background: linear-gradient(90deg, rgba(238, 242, 250, 0) 55%, rgba(11, 42, 107, .10));
    }
}

/* ---------- Grids and cards ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid--spaced { margin-top: 2rem; }
.grid--3 { grid-template-columns: 1fr; }
.grid--5 { grid-template-columns: 1fr; }
@media (min-width: 640px) {
    .grid--3 { grid-template-columns: repeat(2, 1fr); }
    .grid--5 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
    .grid--3 { grid-template-columns: repeat(3, 1fr); }
    .grid--5 { grid-template-columns: repeat(5, 1fr); }
}
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.card p { color: var(--muted); font-size: .95rem; margin: .5rem 0 0; }
.card--lift { transition: transform .3s, box-shadow .3s; }
.card--lift:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card--service { display: flex; flex-direction: column; }
.card--service p { flex: 1; }
.card--service .link { margin-top: 1rem; }
.card--center { text-align: center; }
.card--wide { padding: 2rem; }
.card--wide h2 { font-size: 1.5rem; }
.card--wide .body-text { margin: .75rem 0 0; }
.card__num { display: inline-flex; width: 3rem; height: 3rem; align-items: center; justify-content: center; border-radius: 50%; background: var(--brand-700); color: var(--gold-400); font-weight: 700; font-size: 1.2rem; margin-bottom: 1rem; }
.card__check { display: inline-flex; width: 3rem; height: 3rem; align-items: center; justify-content: center; border-radius: 50%; background: rgba(230, 195, 106, .25); color: var(--gold-600); font-size: 1.2rem; margin-bottom: 1rem; }
.service-badge { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; width: 4rem; height: 4rem; border-radius: 50%; background: var(--brand-700); color: #fff; box-shadow: 0 4px 10px rgba(11, 42, 107, .25); }
.service-badge svg { width: 2.1rem; height: 2.1rem; }
.service-badge--gold { background: radial-gradient(circle at 30% 25%, var(--gold-400), var(--gold-500) 55%, var(--gold-600)); color: var(--brand-700); box-shadow: 0 4px 10px rgba(169, 129, 47, .35); }
.card--center .service-badge { margin-bottom: 1rem; }
.grid + .text-center { margin-top: 1.75rem; }

/* ---------- Standards logos ---------- */
.standards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; margin-top: 3rem; }
.standards__item { display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.standards__logo { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 16 / 9; background: #fff; border: 1px solid var(--line); border-radius: 1rem; box-shadow: var(--shadow); overflow: hidden; padding: .5rem; }
.standards__logo img { width: 100%; height: 100%; object-fit: contain; }
.standards__name { font-weight: 700; letter-spacing: .04em; color: var(--brand-700); text-align: center; font-size: .95rem; }
@media (min-width: 640px) { .standards { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .standards { grid-template-columns: repeat(6, 1fr); gap: 1rem; } .standards__name { font-size: .85rem; } }
.card--service .service-badge { margin-bottom: 1rem; }
.service-item { display: flex; gap: 1.25rem; align-items: flex-start; }
.service-item h2 { font-size: 1.35rem; color: var(--brand-700); }
.stack { display: grid; gap: 1.5rem; }
.stack .card { scroll-margin-top: 6rem; }

/* ---------- Vessels and crew ---------- */
.vessel { margin: 0; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--brand-100); background: #fff; box-shadow: var(--shadow); }
.vessel img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.vessel figcaption { background: var(--brand-700); color: #fff; font-weight: 600; text-align: center; padding: .75rem; }
.crew-card { overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); }
.crew-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.crew-card h3 { background: var(--brand-700); color: #fff; padding: .85rem 1.25rem; font-size: 1.1rem; }
.crew-card ul { padding: 1.25rem; display: grid; gap: .5rem; }
.crew-card li { display: flex; gap: .5rem; color: #334155; }
.crew-card li::before { content: "\25CF"; color: var(--gold-600); font-size: .7rem; line-height: 1.9; }

/* ---------- About ---------- */
.about-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 768px) { .about-grid { grid-template-columns: 1fr 1fr; } }
.about-grid h2 { margin-bottom: 1rem; }
.quote-card { background: linear-gradient(135deg, var(--brand-800), var(--brand-600)); color: #fff; border-radius: 1rem; padding: 2rem; box-shadow: var(--shadow-lg); }
.quote-card__mark { font-size: 3.5rem; line-height: 1; color: var(--gold-400); display: block; }
.quote-card__text { font-size: 1.3rem; font-style: italic; font-weight: 600; line-height: 1.35; margin: -.5rem 0 0; }
.quote-card__sub { font-size: .9rem; color: var(--brand-100); margin: 0; }
.commitment { background: var(--brand-800); color: #fff; padding: 4rem 0; }
.commitment h2 { color: #fff; }
.commitment__text { font-size: 1.1rem; color: var(--brand-100); margin-top: 1.25rem; }
.commitment__motto { font-size: clamp(1.4rem, 3vw, 1.9rem); font-style: italic; font-weight: 600; color: var(--gold-400); margin: 2.5rem 0 .5rem; }
.commitment__sub { font-size: .9rem; color: var(--brand-100); }

/* ---------- CTA ---------- */
.cta { background: var(--brand-700); color: #fff; text-align: center; border-radius: 1rem; padding: 3rem 1.5rem; }
.cta h2 { color: #fff; }
.cta p { color: var(--brand-100); max-width: 36rem; margin: .75rem auto 1.5rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 2.5rem; }
@media (min-width: 960px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.form { background: #fff; border: 1px solid var(--line); border-radius: 1rem; padding: 1.5rem; box-shadow: var(--shadow); display: grid; gap: 1rem; align-content: start; }
.field { display: grid; gap: .3rem; }
.field-row { display: grid; gap: 1rem; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field label { font-size: .9rem; font-weight: 600; color: #334155; }
.optional { font-weight: 400; color: #64748b; }
.field input, .field textarea { width: 100%; font: inherit; color: inherit; padding: .6rem .75rem; border: 1px solid #cbd5e1; border-radius: .5rem; background: #fff; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand-600); box-shadow: 0 0 0 2px rgba(21, 54, 125, .25); }
.field.has-error input, .field.has-error textarea { border-color: #dc2626; }
.field__error { color: #b91c1c; font-size: .85rem; }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: .8rem 1rem; border-radius: .5rem; font-size: .95rem; }
.alert--ok { background: #ecfdf3; color: #166534; border: 1px solid #bbf7d0; }
.alert--err { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.info { display: grid; gap: 1.5rem; align-content: start; }
.info__list { margin: 0; display: grid; gap: 1rem; }
.info__list dt { font-size: .85rem; font-weight: 700; color: var(--brand-600); }
.info__list dd { margin: 0; color: #334155; }
.info__list a { text-decoration: none; }
.info__list a:hover { text-decoration: underline; }
.map { width: 100%; height: 18rem; border: 1px solid var(--line); border-radius: var(--radius); }

/* ---------- Error page ---------- */
.error-page { padding-top: 6rem; padding-bottom: 6rem; }
.error-page__code { font-size: 4.5rem; font-weight: 800; color: var(--brand-600); margin: 0; }
.error-page .lead { margin: 1rem auto 2rem; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 4rem; border-top: 4px solid var(--gold-500); background: var(--brand-900); color: #cbd5e1; }
.site-footer__grid { display: grid; gap: 2rem; padding-top: 3rem; padding-bottom: 3rem; }
@media (min-width: 768px) { .site-footer__grid { grid-template-columns: repeat(3, 1fr); } }
.site-footer__title { font-weight: 700; color: #fff; margin-bottom: .75rem; }
.site-footer__text { margin-top: .75rem; font-size: .9rem; }
.site-footer__list { display: grid; gap: .5rem; font-size: .9rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer__bottom { border-top: 1px solid #0f2757; text-align: center; font-size: .8rem; color: #94a3b8; padding: 1rem; }

/* ---------- Motion ---------- */
.hero, .page-title { animation: page-in .5s cubic-bezier(.2, .7, .2, 1) both; }
.reveal { opacity: 0; transform: translateY(18px); }
.reveal.is-visible { animation: reveal-up .6s cubic-bezier(.2, .7, .2, 1) both; animation-delay: var(--d, 0ms); }
body.page-leaving main, body.page-leaving .site-footer { opacity: 0; transform: translateY(-6px); transition: opacity .18s ease, transform .18s ease; }
@keyframes page-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes reveal-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .hero, .page-title { animation: none; }
    .reveal { opacity: 1; transform: none; }
    .reveal.is-visible { animation: none; }
    body.page-leaving main, body.page-leaving .site-footer { opacity: 1; transform: none; transition: none; }
    .card--lift, .btn { transition: none; }
}
