/* ==========================================================================
   CNVFC — Public landing design system (Bootstrap 5.3 layer)
   Brand: deep indigo navy (logo) + amber CTA + crater-lagoon teal.
   Signature motif: the ring — the Ilhéu is a circular crater lagoon open
   to the sea, echoed in the availability badge and the booking step nodes.
   ========================================================================== */

:root {
    --navy:        #221C55;
    --navy-700:    #2E2A6B;
    --navy-900:    #171243;
    --amber:       #FCAC45;
    --amber-600:   #F0961B;
    --teal:        #159B8F;
    --teal-050:    #E7F4F2;
    --charcoal:    #1B1A2E;
    --surface:     #F3F6FB;
    --surface-2:   #E9EFF7;
    --ink:         #1C2230;
    --muted:       #667085;
    --line:        #E3E9F1;
    --white:       #ffffff;

    --shadow-sm: 0 1px 2px rgba(23, 18, 67, .06), 0 2px 8px rgba(23, 18, 67, .06);
    --shadow-md: 0 8px 24px rgba(23, 18, 67, .10);
    --shadow-lg: 0 18px 48px rgba(23, 18, 67, .18);

    --radius:    .85rem;
    --radius-lg: 1.25rem;

    --font-display: "Bricolage Grotesque", "Nunito", system-ui, sans-serif;
    --font-body:    "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- Base -------------------------------------------------------- */
body {
    font-family: var(--font-body);
    color: var(--ink);
    background-color: var(--surface);
    -webkit-font-smoothing: antialiased;
    /* fixed navbar clearance */
    padding-top: 4.75rem;
}

h1, h2, h3, h4, .display-font {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--navy);
}

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--navy); }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-family: var(--font-body);
    font-weight: 800;
    font-size: .74rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--teal);
}
.eyebrow::before {
    content: "";
    width: 1.75rem; height: 2px;
    background: var(--amber);
    display: inline-block;
}

.text-navy  { color: var(--navy)  !important; }
.text-amber { color: var(--amber-600) !important; }
.text-teal  { color: var(--teal)  !important; }
.text-muted-2 { color: var(--muted) !important; }
.bg-navy    { background: var(--navy) !important; color: #fff; }
.bg-surface { background: var(--surface) !important; }

.section { padding-block: clamp(2.75rem, 6vw, 5rem); }
.section-tight { padding-block: clamp(2rem, 4vw, 3rem); }

/* keyboard focus — visible everywhere */
a:focus-visible, button:focus-visible,
.btn:focus-visible, .form-control:focus-visible,
.form-select:focus-visible, .nav-link:focus-visible {
    outline: 3px solid rgba(21, 155, 143, .45);
    outline-offset: 2px;
}

/* ---------- Buttons (brand variants via BS5 button CSS vars) ------------ */
.btn { font-weight: 700; border-radius: 999px; padding-inline: 1.4rem; }
.btn-lg { padding: .8rem 1.9rem; font-size: 1.05rem; }

.btn-amber {
    --bs-btn-color: #241c05;
    --bs-btn-bg: var(--amber);
    --bs-btn-border-color: var(--amber);
    --bs-btn-hover-color: #241c05;
    --bs-btn-hover-bg: var(--amber-600);
    --bs-btn-hover-border-color: var(--amber-600);
    --bs-btn-active-color: #241c05;
    --bs-btn-active-bg: var(--amber-600);
    --bs-btn-active-border-color: var(--amber-600);
    --bs-btn-disabled-color: #241c05;
    --bs-btn-disabled-bg: var(--amber);
    --bs-btn-disabled-border-color: var(--amber);
    --bs-btn-focus-shadow-rgb: 252, 172, 69;
    box-shadow: 0 8px 20px rgba(240, 150, 27, .32);
}
.btn-navy {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--navy);
    --bs-btn-border-color: var(--navy);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--navy-700);
    --bs-btn-hover-border-color: var(--navy-700);
    --bs-btn-active-bg: var(--navy-900);
    --bs-btn-active-border-color: var(--navy-900);
    --bs-btn-focus-shadow-rgb: 46, 42, 107;
}
.btn-outline-navy {
    --bs-btn-color: var(--navy);
    --bs-btn-border-color: rgba(34, 28, 85, .28);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--navy);
    --bs-btn-hover-border-color: var(--navy);
    --bs-btn-active-bg: var(--navy);
    --bs-btn-active-border-color: var(--navy);
    --bs-btn-focus-shadow-rgb: 46, 42, 107;
}

/* ---------- Navbar ------------------------------------------------------ */
.brandbar {
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    min-height: 4.75rem;
}
.brandbar .navbar-brand { display: inline-flex; align-items: center; gap: .6rem; padding: 0; }
.brandbar .navbar-brand img { height: 44px; width: auto; }
.brandbar .nav-link {
    font-weight: 700;
    color: var(--navy);
    padding: .55rem .9rem;
    border-radius: 999px;
    position: relative;
}
.brandbar .nav-link:hover { color: var(--teal); }
.brandbar .nav-link.active { color: var(--teal); }
.brandbar .nav-link.active::after {
    content: "";
    position: absolute; left: .9rem; right: .9rem; bottom: .28rem;
    height: 2px; border-radius: 2px; background: var(--amber);
}
.brandbar .lang-toggle {
    display: inline-flex; align-items: center; gap: .4rem;
    border: 1px solid var(--line); border-radius: 999px;
    padding: .35rem .7rem; background: #fff; font-weight: 700; color: var(--navy);
}
.brandbar .lang-toggle img { height: 18px; border-radius: 2px; }
.brandbar .dropdown-menu { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-md); }
.brandbar .dropdown-item { font-weight: 600; display: flex; align-items: center; gap: .5rem; }
.brandbar .dropdown-item img { height: 18px; border-radius: 2px; }

/* ---------- Hero -------------------------------------------------------- */
.hero {
    position: relative;
    margin-top: -4.75rem;              /* sit under the fixed navbar */
    padding-top: 8.5rem;
    padding-bottom: clamp(3.5rem, 8vw, 6rem);
    color: #fff;
    background:
        linear-gradient(180deg, rgba(23, 18, 67, .72) 0%, rgba(23, 18, 67, .86) 100%),
        var(--navy);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}
.hero::after {  /* soft wave fade into the page */
    content: "";
    position: absolute; left: 0; right: 0; bottom: -1px; height: 90px;
    background: radial-gradient(120% 100% at 50% 100%, var(--surface) 60%, transparent 61%);
}
.hero .container { position: relative; z-index: 2; }
.hero h1 {
    color: #fff;
    font-size: clamp(2.1rem, 5.4vw, 3.6rem);
    line-height: 1.04;
    max-width: 16ch;
}
.hero .eyebrow { color: var(--amber); }
.hero .eyebrow::before { background: var(--amber); }
.hero .lead { color: rgba(255,255,255,.86); font-size: 1.12rem; max-width: 46ch; }

/* ---------- Ring: availability badge (the crater motif) ----------------- */
.ring {
    --size: 168px;
    position: relative;
    width: var(--size); height: var(--size);
    border-radius: 50%;
    display: grid; place-content: center; text-align: center;
    background:
        radial-gradient(circle at 50% 42%, rgba(21,155,143,.22), transparent 62%),
        #fff;
    box-shadow: var(--shadow-lg);
    border: 6px solid rgba(255,255,255,.35);
}
.ring::before {
    content: "";
    position: absolute; inset: -6px; border-radius: 50%;
    border: 2px dashed rgba(252, 172, 69, .8);
    animation: ring-spin 40s linear infinite;
}
.ring .ring-num {
    font-family: var(--font-display);
    font-weight: 800; font-size: 2.9rem; line-height: 1; color: var(--navy);
}
.ring .ring-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ring.ring-sold .ring-num { color: var(--amber-600); font-size: 1.5rem; }
@keyframes ring-spin { to { transform: rotate(360deg); } }

/* ---------- Cards ------------------------------------------------------- */
.brand-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform .18s ease, box-shadow .18s ease;
}
.brand-card.is-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.brand-card .card-body { padding: clamp(1.25rem, 3vw, 2rem); }

.section-title { font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
.section-intro { color: var(--muted); max-width: 60ch; }

/* ---------- How it works (subject sequence: booking flow) --------------- */
.howto-step { position: relative; padding: 1.5rem 1.25rem; }
.howto-icon {
    width: 64px; height: 64px; border-radius: 50%;
    display: grid; place-content: center;
    background: var(--teal-050); color: var(--teal);
    font-size: 1.5rem; margin-bottom: 1rem;
    border: 1px solid rgba(21,155,143,.25);
}
.howto-step .step-index {
    font-family: var(--font-display);
    font-weight: 800; color: var(--amber-600); font-size: .95rem; letter-spacing: .04em;
}

/* ---------- Stepper (box office; numbers = real booking sequence) ------- */
.stepper { display: flex; gap: 0; margin: 0 auto 2rem; max-width: 720px; }
.stepper .step { flex: 1; text-align: center; position: relative; }
.stepper .step::before {  /* connecting route line */
    content: ""; position: absolute; top: 22px; left: -50%; width: 100%; height: 3px;
    background: var(--line);
}
.stepper .step:first-child::before { display: none; }
.stepper .step.done::before,
.stepper .step.current::before { background: var(--teal); }
.stepper .node {
    position: relative; z-index: 1;
    width: 46px; height: 46px; border-radius: 50%;
    margin: 0 auto .5rem;
    display: grid; place-content: center;
    background: #fff; border: 3px solid var(--line);
    color: var(--muted); font-weight: 800; font-family: var(--font-display);
    transition: all .2s ease;
}
.stepper .step.current .node { border-color: var(--teal); color: var(--navy); box-shadow: 0 0 0 5px rgba(21,155,143,.14); }
.stepper .step.done .node { background: var(--teal); border-color: var(--teal); color: #fff; }
.stepper .step-label { font-size: .82rem; font-weight: 700; color: var(--muted); }
.stepper .step.current .step-label { color: var(--navy); }
.stepper .step.done .step-label { color: var(--teal); }

/* ---------- Forms ------------------------------------------------------- */
.form-control, .form-select {
    border-radius: .7rem;
    border-color: var(--line);
    padding: .7rem .9rem;
    font-size: 1.02rem;
}
.form-control-lg, .form-select-lg { font-size: 1.08rem; padding: .85rem 1rem; }
.form-control:focus, .form-select:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 .2rem rgba(21, 155, 143, .18);
}
.form-label { font-weight: 700; color: var(--navy); }
.form-check-input:checked { background-color: var(--teal); border-color: var(--teal); }
.form-check-input:focus { border-color: var(--teal); box-shadow: 0 0 0 .2rem rgba(21,155,143,.18); }

/* payment / choice tiles (replaces icheck radios) */
.choice-tile { cursor: pointer; }
.choice-tile input { position: absolute; opacity: 0; pointer-events: none; }
.choice-tile .tile {
    border: 2px solid var(--line); border-radius: var(--radius);
    padding: .85rem 1rem; text-align: center; font-weight: 700; color: var(--navy);
    background: #fff; transition: all .15s ease; height: 100%;
    display: flex; align-items: center; justify-content: center; gap: .5rem;
}
.choice-tile:hover .tile { border-color: rgba(21,155,143,.5); }
.choice-tile input:checked + .tile {
    border-color: var(--teal); background: var(--teal-050); color: var(--navy);
    box-shadow: 0 0 0 3px rgba(21,155,143,.12);
}
.choice-tile input:focus-visible + .tile { outline: 3px solid rgba(21,155,143,.45); outline-offset: 2px; }

/* number spinner */
.qty-spinner { display: inline-flex; align-items: stretch; border: 2px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.qty-spinner button {
    border: 0; background: #fff; width: 3rem; color: var(--navy); font-size: 1.2rem;
    display: grid; place-content: center; transition: background .15s ease;
}
.qty-spinner button:hover { background: var(--teal-050); color: var(--teal); }
.qty-spinner input { border: 0; width: 3.5rem; text-align: center; font-weight: 800; font-size: 1.25rem; color: var(--navy); }
.qty-spinner input:focus { outline: none; }

/* date-step availability badge (red / yellow / green by stock) */
.date-availability {
    display: flex; align-items: center; justify-content: center; gap: .75rem;
    text-align: center;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
}
.date-availability .da-icon { font-size: 1.6rem; }
.date-availability .da-body { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.date-availability .da-num { font-family: var(--font-display); font-weight: 800; font-size: 1.9rem; }
.date-availability .da-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }

.date-availability.is-ok   { background: #E9F7EF; border-color: rgba(47, 141, 91, .35); }
.date-availability.is-ok   .da-icon,
.date-availability.is-ok   .da-num { color: #2F8D5B; }

.date-availability.is-low  { background: #FFF6E3; border-color: rgba(201, 128, 15, .40); }
.date-availability.is-low  .da-icon,
.date-availability.is-low  .da-num { color: #C9800F; }

.date-availability.is-none { background: #FDECEC; border-color: rgba(228, 87, 46, .35); }
.date-availability.is-none .da-icon,
.date-availability.is-none .da-num { color: #E4572E; }
.date-availability.is-none .da-num { font-size: 1.4rem; }

/* totals table */
.totals-row { display: flex; justify-content: space-between; padding: .5rem 0; border-bottom: 1px dashed var(--line); }
.totals-row.grand { border-bottom: 0; padding-top: 1rem; }
.totals-row.grand .amt { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; color: var(--navy); }

/* ---------- Headlines / notices ---------------------------------------- */
.headline-note {
    border-radius: var(--radius);
    border-left: 6px solid var(--muted);
    background: #fff; box-shadow: var(--shadow-sm);
    padding: 1.1rem 1.25rem;
}
.headline-note > strong { display: block; margin-bottom: .35rem; font-family: var(--font-display); }
.headline-note.n-success { border-left-color: #4CAF7D; }
.headline-note.n-success > strong { color: #2f8d5b; }
.headline-note.n-info    { border-left-color: var(--teal); }
.headline-note.n-info    > strong { color: var(--teal); }
.headline-note.n-warning { border-left-color: var(--amber-600); }
.headline-note.n-warning > strong { color: var(--amber-600); }
.headline-note.n-danger  { border-left-color: #E4572E; }
.headline-note.n-danger  > strong { color: #E4572E; }

/* CMS rich content (Summernote): keep arbitrary HTML inside the card.
   Editors often wrap content in wide layout tables — constrain and, on
   small screens, linearize the outer layout table while leaving real
   (nested) data tables intact but horizontally scrollable. */
.headline-note { overflow-wrap: anywhere; }
.headline-note img,
.headline-note iframe,
.headline-note video,
.headline-note embed { max-width: 100%; height: auto; }
.headline-note > table { width: 100%; }

@media (max-width: 767.98px) {
    .headline-note { padding: 1rem 1.1rem; font-size: .95rem; }

    /* stack the columns of the outermost WYSIWYG layout table */
    .headline-note > table,
    .headline-note > table > tbody,
    .headline-note > table > tbody > tr { display: block; width: 100%; }
    .headline-note > table > tbody > tr > td,
    .headline-note > table > tbody > tr > th {
        display: block; width: 100% !important; box-sizing: border-box; padding: 0 !important; border: 0 !important;
    }

    /* real nested data tables: keep tabular, scroll if wider than the card */
    .headline-note table table {
        display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
        margin: .5rem 0;
    }
}

/* ---------- Season info + timetable ------------------------------------ */
.season-info .prose { font-size: 1rem; line-height: 1.65; }
.season-info .prose :where(img, table) { max-width: 100%; }
.season-timetable { border: 1px solid var(--line); border-radius: .7rem; overflow: hidden; }
.season-timetable thead th {
    background: var(--navy); color: #fff; border: 0;
    text-align: center; font-weight: 700; padding: .6rem .75rem;
}
.season-timetable tbody td {
    text-align: center; font-weight: 600; color: var(--ink);
    border-color: var(--line); padding: .5rem .75rem;
}
.season-timetable tbody tr:nth-child(odd) { background: var(--surface); }

/* ---------- Prose (islet / terms static pages) ------------------------- */
.prose { color: var(--ink); font-size: 1.05rem; line-height: 1.75; }
.prose h1, .prose h2, .prose h3 { margin-top: 1.6rem; }
.prose ol, .prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: .4rem; }

/* ---------- Footer ------------------------------------------------------ */
.site-footer { background: var(--charcoal); color: rgba(255,255,255,.72); padding-block: 3rem 1.5rem; }
.site-footer h3 { color: #fff; font-size: 1.05rem; letter-spacing: .02em; margin-bottom: 1rem; }
.site-footer a { color: rgba(255,255,255,.72); }
.site-footer a:hover { color: var(--amber); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .5rem; }
.site-footer .contact-line { display: flex; align-items: center; gap: .6rem; color: #fff; margin-bottom: .75rem; }
.site-footer .contact-line i { color: var(--amber); width: 1.2rem; text-align: center; }
.site-footer .footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2rem; padding-top: 1.25rem; font-size: .9rem; }

/* ---------- Responsive -------------------------------------------------- */
@media (max-width: 575.98px) {
    .stepper .step-label { display: none; }
    .stepper { max-width: 320px; }
    .ring { --size: 138px; }
    .hero { padding-top: 7rem; }
}

/* ---------- Motion preferences ----------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
