/* The public Corsica SBK site: hand-written, no framework, no script.
 * The CMS's plugins write neutral markup (cms-row, cms-col with --span,
 * cms-langs); the site's own plugins (plugins.go) theirs; this sheet
 * styles both. Also loaded by the editor's preview.
 *
 * Mobile first: the base rules are a phone's, wider screens add to them. */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

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

:root {
  --deep: #0a3a5c;      /* night sea */
  --sea: #0b6fb8;       /* the logo's blue */
  --lagoon: #22b8d6;    /* Palombaggia's water */
  --foam: #e6f6fb;
  --sun: #f59e0b;       /* Porto-Vecchio's orange */
  --sun-deep: #d97706;
  --sand: #fbf7f0;
  --sand-deep: #f1e7d6;
  --ink: #102233;
  --muted: #5b6b7a;
  --line: #e6ddcd;
  --card: #ffffff;
  --radius: 18px;
  --shadow: 0 1px 2px rgb(16 34 51 / .06), 0 8px 24px rgb(16 34 51 / .08);
  --gutter: 1.25rem;
  --wide: 1160px;
  --header-h: 64px;
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 1rem/1.65 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--sand);
  overflow-x: clip;
}
a { color: var(--sea); text-underline-offset: .18em; }
a:hover { color: var(--deep); }
img { max-width: 100%; height: auto; display: block; }
strong { font-weight: 700; }
::selection { background: var(--lagoon); color: #fff; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; color: var(--deep); text-wrap: balance; }
h1 { font-size: clamp(2rem, 6vw, 3.1rem); font-weight: 850; margin: 0 0 1rem; }
h2 { font-size: clamp(1.45rem, 3.6vw, 2rem); font-weight: 800; margin: 2.25rem 0 .75rem; }
h3 { font-size: 1.15rem; font-weight: 750; margin: 1.5rem 0 .5rem; }
p, ul, ol { margin: 0 0 1rem; }
ul, ol { padding-left: 1.25rem; }
li + li { margin-top: .25rem; }
hr { border: 0; height: 1px; background: var(--line); margin: 2.5rem 0; }

table { border-collapse: collapse; width: 100%; margin: 1.25rem 0; background: var(--card); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); font-size: .95rem; }
th, td { padding: .7rem .9rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--deep); color: #fff; font-weight: 650; }
tr:last-child td { border-bottom: 0; }
/* A wide table scrolls on its own on a phone, never the page. */
@media (max-width: 640px) {
  table { display: block; overflow-x: auto; white-space: nowrap; }
}

blockquote { margin: 1.5rem 0; padding: 1rem 1.25rem; border-left: 4px solid var(--sun); background: #fff8eb; border-radius: 0 12px 12px 0; color: var(--ink); }
blockquote > :last-child { margin-bottom: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgb(10 58 92 / .92);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  backdrop-filter: saturate(160%) blur(10px);
  color: #fff;
  box-shadow: 0 1px 0 rgb(255 255 255 / .08);
}
.site-header-inner {
  max-width: var(--wide); margin: 0 auto; min-height: var(--header-h);
  padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.site-brand { display: inline-flex; align-items: center; gap: .45rem; text-decoration: none; font-weight: 850; font-size: 1.2rem; letter-spacing: -.01em; color: #fff; }
.site-brand:hover { color: #fff; }
.site-brand-name { background: linear-gradient(90deg, #fff, #bfe9f5); -webkit-background-clip: text; background-clip: text; color: transparent; }
.site-brand-tag { background: var(--sun); color: var(--ink); border-radius: 8px; padding: .05rem .45rem; font-size: .95rem; letter-spacing: .04em; }

/* The phone's menu: a toggle opens it below the bar. */
.site-menu-toggle { position: absolute; opacity: 0; pointer-events: none; }
.site-menu-button {
  margin-left: auto; display: inline-flex; align-items: center; gap: .55rem; cursor: pointer;
  padding: .5rem .8rem; border-radius: 999px; border: 1px solid rgb(255 255 255 / .25);
  font-size: .9rem; font-weight: 600; user-select: none;
}
.site-menu-toggle:focus-visible + .site-menu-button { outline: 2px solid var(--sun); outline-offset: 2px; }
.site-menu-icon, .site-menu-icon::before, .site-menu-icon::after {
  display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s, opacity .2s;
}
.site-menu-icon { position: relative; }
.site-menu-icon::before, .site-menu-icon::after { content: ""; position: absolute; left: 0; }
.site-menu-icon::before { top: -6px; }
.site-menu-icon::after { top: 6px; }
.site-menu-toggle:checked + .site-menu-button .site-menu-icon { background: transparent; }
.site-menu-toggle:checked + .site-menu-button .site-menu-icon::before { transform: translateY(6px) rotate(45deg); }
.site-menu-toggle:checked + .site-menu-button .site-menu-icon::after { transform: translateY(-6px) rotate(-45deg); }

.site-menu { display: none; width: 100%; padding: .5rem 0 1.25rem; }
.site-menu-toggle:checked ~ .site-menu { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav li { margin: 0; }
.site-nav a { display: block; padding: .7rem .25rem; color: #e3f4fb; text-decoration: none; font-weight: 600; border-bottom: 1px solid rgb(255 255 255 / .08); }
.site-nav a:hover, .site-nav a.active { color: #fff; }
.site-nav a.active { color: var(--sun); }
.site-nav li ul a { padding-left: 1.25rem; font-weight: 500; font-size: .95rem; }

.cms-langs { display: flex; gap: .4rem; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.cms-langs a, .cms-langs span { display: inline-block; padding: .3rem .6rem; border-radius: 999px; text-decoration: none; }
.cms-langs span { background: var(--sun); color: var(--ink); }
.site-header .cms-langs { margin-top: 1rem; }
.site-header .cms-langs a { color: #e3f4fb; border: 1px solid rgb(255 255 255 / .25); }
.site-header .cms-langs a:hover { background: rgb(255 255 255 / .12); }

@media (min-width: 900px) {
  .site-menu-button { display: none; }
  .site-menu { display: flex !important; align-items: center; gap: 1.5rem; width: auto; margin-left: auto; padding: 0; }
  .site-nav > ul { display: flex; gap: .25rem; }
  .site-nav li { position: relative; }
  .site-nav a { border: 0; padding: .45rem .8rem; border-radius: 999px; font-size: .95rem; }
  .site-nav a:hover { background: rgb(255 255 255 / .1); }
  .site-nav a.active { color: var(--ink); background: var(--sun); }
  .site-nav li ul {
    display: none; position: absolute; top: 100%; left: 0; min-width: 13rem; padding: .5rem;
    background: var(--deep); border-radius: 14px; box-shadow: var(--shadow);
  }
  .site-nav li ul a { padding: .5rem .8rem; }
  .site-nav li:hover > ul, .site-nav li:focus-within > ul { display: block; }
  .site-header .cms-langs { margin: 0; }
}

/* ---------- The photo strip under the header (inner pages) ---------- */
.site-strip {
  height: clamp(90px, 16vw, 180px);
  background: url("palombaggia.jpg") center 60% / cover no-repeat, var(--sea);
  position: relative;
}
.site-strip::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgb(10 58 92 / .25), transparent 40%, rgb(251 247 240 / .0) 70%, var(--sand));
}

/* ---------- Page ---------- */
.site-main { --main-pb: 3rem; max-width: var(--wide); margin: 0 auto; padding: 2rem var(--gutter) var(--main-pb); }
.site-content { min-width: 0; }
.site-content > :first-child { margin-top: 0; }
.tpl-standard .site-content, .tpl-sidebar .site-content { max-width: 760px; }
.tpl-standard .site-content { margin: 0 auto; }
.site-main.with-sidebar { display: grid; gap: 2rem; }
.site-sidebar {
  background: var(--card); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow);
  align-self: start; border-top: 4px solid var(--lagoon);
}
.site-sidebar > :first-child { margin-top: 0; }
.site-sidebar > :last-child { margin-bottom: 0; }
.site-sidebar h2 { font-size: 1.15rem; margin-top: 1.5rem; }
@media (min-width: 900px) {
  .site-main { --main-pb: 4rem; padding-top: 2.5rem; }
  .site-main.with-sidebar { grid-template-columns: minmax(0, 1fr) 320px; gap: 3rem; }
  .site-sidebar { position: sticky; top: calc(var(--header-h) + 1.5rem); }
}

/* ---------- Landing banner and hero ---------- */
.site-banner {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgb(34 184 214 / .55), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgb(245 158 11 / .28), transparent 60%),
    linear-gradient(160deg, #0b6fb8 0%, #0a3a5c 70%);
  padding: 2.5rem var(--gutter) 4.5rem;
}
.site-banner::after { /* a wave into the page */
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 48px;
  background: var(--sand);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 48' preserveAspectRatio='none'%3E%3Cpath d='M0 48h1440V18c-120 16-240 24-360 20S840 14 720 12 480 26 360 32 120 34 0 22z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 48' preserveAspectRatio='none'%3E%3Cpath d='M0 48h1440V18c-120 16-240 24-360 20S840 14 720 12 480 26 360 32 120 34 0 22z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.site-banner > * { max-width: var(--wide); margin-left: auto; margin-right: auto; }
.site-banner h1, .site-banner h2, .site-banner h3 { color: #fff; }
.site-banner a:not(.cms-button) { color: #fff; }

.cms-hero { display: grid; gap: 2rem; align-items: center; }
.cms-hero-eyebrow {
  display: inline-block; margin: 0 0 1rem; padding: .35rem .8rem; border-radius: 999px;
  background: rgb(255 255 255 / .14); border: 1px solid rgb(255 255 255 / .25);
  font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}
.cms-hero h1 { font-size: clamp(2.4rem, 9vw, 4.6rem); line-height: 1; letter-spacing: -.035em; margin-bottom: 1.25rem; }
.cms-hero-body { font-size: 1.1rem; color: #e3f4fb; }
.cms-hero-body strong { color: #fff; }
.cms-hero-body > :last-child { margin-bottom: 0; }
.cms-hero-buttons { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.cms-hero-visual img {
  width: 100%; border-radius: 22px; transform: rotate(1.5deg);
  box-shadow: 0 30px 60px -20px rgb(0 0 0 / .55), 0 0 0 6px rgb(255 255 255 / .9);
}
@media (min-width: 900px) {
  .site-banner { padding: 4.5rem var(--gutter) 6.5rem; }
  .cms-hero-with-image { grid-template-columns: 1.05fr 1fr; gap: 3.5rem; }
}

/* ---------- Buttons ---------- */
.cms-button {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .75rem 1.4rem; border-radius: 999px;
  font-weight: 750; font-size: 1rem; line-height: 1.2; text-decoration: none; text-align: center;
  transition: transform .15s ease, box-shadow .15s ease, background .15s;
}
.cms-button:hover { transform: translateY(-2px); }
.cms-button-primary { background: var(--sun); color: var(--ink); box-shadow: 0 10px 24px -10px rgb(245 158 11 / .9); }
.cms-button-primary:hover { background: #fbb030; color: var(--ink); }
.cms-button-secondary { background: transparent; color: inherit; border: 2px solid currentColor; }
.site-content .cms-button-secondary, .site-sidebar .cms-button-secondary { color: var(--sea); }
.site-banner .cms-button-secondary, .cms-section-sea .cms-button-secondary, .cms-actionbox-dark .cms-button-secondary { color: #fff; }
.site-banner .cms-button-secondary:hover { background: rgb(255 255 255 / .12); }
/* A button alone in a paragraph's place keeps some air. */
:is(.site-content, .site-sidebar, .cms-section-inner, .cms-col) > .cms-button { margin: .25rem .5rem 1rem 0; }

/* ---------- Sections: full-width bands inside the content ---------- */
.cms-section { position: relative; margin: 3rem 0; padding: .5rem 0; }
.cms-section-inner > :first-child { margin-top: 0; }
.cms-section-inner > :last-child { margin-bottom: 0; }
.cms-section-title { text-align: center; margin: 0 auto 1.75rem; }
.cms-section-title::after { content: ""; display: block; width: 56px; height: 4px; margin: .8rem auto 0; border-radius: 4px; background: linear-gradient(90deg, var(--lagoon), var(--sun)); }
/* The band reaches the screen's edges without widening the page. */
.cms-section-sand, .cms-section-sea, .cms-section-photo { padding: 3rem 0; }
.cms-section-sand { background: var(--sand-deep); box-shadow: 0 0 0 100vmax var(--sand-deep); clip-path: inset(0 -100vmax); }
.cms-section-sea { background: var(--deep); box-shadow: 0 0 0 100vmax var(--deep); clip-path: inset(0 -100vmax); color: #e3f4fb; }
.cms-section-sea h2, .cms-section-sea h3 { color: #fff; }
.cms-section-sea a:not(.cms-button) { color: #fff; }
.cms-section-photo { color: #fff; isolation: isolate; clip-path: inset(0 -100vmax); }
.cms-section-photo::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); z-index: -1;
  background: linear-gradient(rgb(10 58 92 / .78), rgb(10 58 92 / .9)), url("palombaggia.jpg") center / cover no-repeat;
}
.cms-section-photo h2, .cms-section-photo h3, .cms-section-photo a:not(.cms-button) { color: #fff; }
.cms-section-photo .cms-section-title::after { background: var(--sun); }
@media (min-width: 900px) { .cms-section-sand, .cms-section-sea, .cms-section-photo { padding: 4.5rem 0; } }
/* A band ending the page runs into the footer. */
.site-content > :is(.cms-section-sand, .cms-section-sea, .cms-section-photo):last-child { margin-bottom: calc(-1 * var(--main-pb)); }

/* ---------- Columns (generic plugin) ---------- */
.cms-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1.5rem; margin: 1.5rem 0; }
.cms-col { grid-column: span 12; min-width: 0; }
.cms-col > :first-child { margin-top: 0; }
.cms-col > :last-child { margin-bottom: 0; }
@media (min-width: 720px) { .cms-col { grid-column: span var(--span, 12); } }

/* ---------- Feature cards ---------- */
.cms-features { display: grid; gap: 1rem; margin: 1.5rem 0; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.cms-feature {
  background: var(--card); border-radius: var(--radius); padding: 1.4rem 1.4rem 1.2rem; box-shadow: var(--shadow);
  border: 1px solid rgb(16 34 51 / .04); transition: transform .2s ease, box-shadow .2s ease;
}
.cms-feature:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgb(16 34 51 / .06), 0 16px 32px rgb(16 34 51 / .12); }
.cms-feature-icon {
  display: inline-grid; place-items: center; width: 52px; height: 52px; margin-bottom: .9rem;
  border-radius: 14px; font-size: 1.6rem; background: linear-gradient(135deg, var(--foam), #fff3dc);
}
.cms-feature h3 { margin: 0 0 .4rem; }
.cms-feature p { color: var(--muted); }
.cms-feature > :last-child { margin-bottom: 0; }
.cms-section-sea .cms-feature, .cms-section-photo .cms-feature { background: rgb(255 255 255 / .08); border-color: rgb(255 255 255 / .14); box-shadow: none; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.cms-section-sea .cms-feature p, .cms-section-photo .cms-feature p { color: #d5ecf5; }
.cms-section-sea .cms-feature-icon, .cms-section-photo .cms-feature-icon { background: rgb(255 255 255 / .14); }

/* ---------- Timeline ---------- */
.cms-timeline { list-style: none; margin: 1.5rem 0; padding: 0; position: relative; }
.cms-timeline::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--lagoon), var(--sun)); border-radius: 2px; }
.cms-day { position: relative; margin: 0; padding: 0 0 1.75rem 2.5rem; }
.cms-day + .cms-day { margin-top: 0; }
.cms-day::before { content: ""; position: absolute; left: 4px; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--sand); border: 4px solid var(--sea); }
.cms-day:nth-child(even)::before { border-color: var(--sun); }
.cms-day-date { margin: 0 0 .35rem; font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--sea); }
.cms-day-body { background: var(--card); border-radius: var(--radius); padding: 1.15rem 1.25rem; box-shadow: var(--shadow); }
.cms-day-body h3 { margin: 0 0 .6rem; }
.cms-day-body ul { list-style: none; padding: 0; }
.cms-day-body li { position: relative; padding-left: 1.1rem; }
.cms-day-body li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--lagoon); }
.cms-day-body > :last-child { margin-bottom: 0; }
.cms-section-sea .cms-day-body, .cms-section-photo .cms-day-body { color: var(--ink); }
@media (min-width: 720px) {
  .cms-day { padding-left: 3rem; display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 1.25rem; }
  .cms-day-date { padding-top: 1.2rem; }
}

/* ---------- Line-up ---------- */
.cms-lineup ul { list-style: none; padding: 0; margin: 1.25rem 0; display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
.cms-lineup li { margin: 0; padding: .55rem 1rem; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); font-weight: 650; font-size: .95rem; }
.cms-lineup li:nth-child(3n+1) { border-bottom: 3px solid var(--lagoon); }
.cms-lineup li:nth-child(3n+2) { border-bottom: 3px solid var(--sun); }
.cms-lineup li:nth-child(3n) { border-bottom: 3px solid var(--sea); }
.cms-section-sea .cms-lineup li, .cms-section-photo .cms-lineup li { background: rgb(255 255 255 / .1); color: #fff; box-shadow: none; }
.cms-lineup p { text-align: center; }

/* ---------- Action box ---------- */
.cms-actionbox {
  display: flex; gap: 1.25rem 2rem; align-items: center; justify-content: space-between; flex-wrap: wrap;
  margin: 2rem 0; padding: 1.5rem; border-radius: var(--radius);
}
.cms-actionbox-light { background: var(--card); box-shadow: var(--shadow); border-left: 5px solid var(--sun); }
.cms-actionbox-dark {
  color: #fff;
  background: radial-gradient(600px 200px at 100% 0, rgb(34 184 214 / .45), transparent 70%), linear-gradient(135deg, var(--sea), var(--deep));
  box-shadow: 0 20px 40px -20px rgb(10 58 92 / .7);
}
.site-banner .cms-actionbox-dark { background: rgb(255 255 255 / .1); border: 1px solid rgb(255 255 255 / .22); box-shadow: none; }
.cms-actionbox-dark h2, .cms-actionbox-dark a:not(.cms-button) { color: #fff; }
.cms-actionbox h2 { margin: 0 0 .4rem; font-size: 1.35rem; }
.cms-actionbox-body { flex: 1 1 280px; }
.cms-actionbox-body > :first-child { margin-top: 0; }
.cms-actionbox-body > :last-child { margin-bottom: 0; }
.cms-actionbox-buttons { display: flex; gap: .75rem; flex-wrap: wrap; }
@media (min-width: 720px) { .cms-actionbox { padding: 1.75rem 2rem; } }

/* ---------- Images ---------- */
.cms-figure { margin: 1.5rem 0; }
.cms-figure img { border-radius: 14px; box-shadow: var(--shadow); }
.cms-figure figcaption { color: var(--muted); font-size: .88rem; margin-top: .55rem; text-align: center; }
.cms-section-sea .cms-figure figcaption, .cms-section-photo .cms-figure figcaption { color: #d5ecf5; }

/* ---------- Footer ---------- */
.site-footer { background: var(--deep); color: #b9d6e6; margin-top: 0; font-size: .92rem; }
.site-footer-inner { max-width: var(--wide); margin: 0 auto; padding: 2.75rem var(--gutter) 2rem; display: grid; gap: 2rem; }
.site-footer .site-brand { margin-bottom: .75rem; }
.site-footer-note { margin: 0; line-height: 1.7; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 .45rem; }
.site-footer li ul { display: none; }
.site-footer a { color: #e3f4fb; text-decoration: none; }
.site-footer a:hover { color: var(--sun); }
.site-footer a.active { color: var(--sun); }
.site-footer-end { display: flex; flex-direction: column; gap: 1rem; }
.site-footer .cms-langs a { border: 1px solid rgb(255 255 255 / .25); }
@media (min-width: 720px) {
  .site-footer-inner { grid-template-columns: 2fr 1fr 1fr; }
}

/* Motion for those who want it only. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* ---------- The editor's preview frames ---------- */
body.cms-preview .site-main { padding: 1.25rem; }
body.cms-fragment { background: #fff; padding: .5rem .75rem; }
body.cms-fragment > :first-child { margin-top: 0; }
