:root {
  --sea-tyrrhenian-900: #0e3850;
  --sea-tyrrhenian-700: #1a5070;
  --sea-tyrrhenian-500: #2a7090;
  --sea-tyrrhenian-200: #88c4c0;
  --sea-ionian-900: #6e4c04;
  --sea-ionian-700: #9a6e08;
  --sea-ionian-600: #c49010;
  --sea-ionian-300: #eec840;
  --sand-050: #faf6eb;
  --sand-100: #f8f4e6;
  --sand-200: #efe8d7;
  --sand-300: #e5dcc6;
  --ink-900: #2c2622;
  --ink-700: rgba(44, 38, 34, 0.76);
  --ink-500: rgba(44, 38, 34, 0.58);
  --ink-300: rgba(44, 38, 34, 0.36);
  --line-soft: rgba(44, 38, 34, 0.08);
  --line-faint: rgba(44, 38, 34, 0.05);
  --shadow-soft: 0 20px 60px rgba(26, 80, 112, 0.08);
  --shadow-deep: 0 24px 80px rgba(14, 56, 80, 0.14);
  --radius-sm: 0.75rem;
  --radius-md: 1.2rem;
  --radius-lg: 1.8rem;
  --page-width: min(1180px, calc(100vw - 2rem));
}

html[data-theme="night"] {
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink-900);
  background:
    radial-gradient(circle at top, rgba(196, 144, 16, 0.12), transparent 30%),
    linear-gradient(180deg, #f8f4e6 0%, #efe8d7 100%);
  font-family: "Inter", sans-serif;
}

body.page.night {
  --sand-050: #0d123d;
  --sand-100: #10164a;
  --sand-200: #151d5e;
  --sand-300: #1e2a77;
  --ink-900: #f8f4ef;
  --ink-700: rgba(248, 244, 239, 0.8);
  --ink-500: rgba(248, 244, 239, 0.58);
  --ink-300: rgba(248, 244, 239, 0.34);
  --line-soft: rgba(255, 255, 255, 0.09);
  --line-faint: rgba(255, 255, 255, 0.06);
  --shadow-soft: 0 28px 80px rgba(0, 0, 0, 0.28);
  --shadow-deep: 0 30px 100px rgba(0, 0, 0, 0.4);
  background:
    radial-gradient(circle at top, rgba(106, 132, 224, 0.2), transparent 32%),
    linear-gradient(180deg, #0f1445 0%, #15195a 100%);
}

body.page {
  --cream: #2a2620;
  --cream-dim: rgba(42, 38, 32, 0.65);
  --cream-faint: rgba(42, 38, 32, 0.35);
  --border-subtle: rgba(0, 0, 0, 0.07);
  --footer-bg: #ede8d6;
  --footer-border: rgba(0, 0, 0, 0.05);
  --footer-text: rgba(44, 38, 34, 0.35);
  --footer-brand: rgba(44, 38, 34, 0.4);
  --footer-tagline: rgba(44, 38, 34, 0.38);
  --nav-bg: linear-gradient(to bottom, rgba(248, 244, 230, 0.94) 0%, rgba(248, 244, 230, 0.88) 100%);
  --nav-solid: rgba(248, 244, 230, 0.97);
  --chrome-cream: #2a2620;
  --chrome-cream-dim: rgba(42, 38, 32, 0.65);
  --chrome-cream-faint: rgba(42, 38, 32, 0.35);
  --chrome-border-subtle: rgba(0, 0, 0, 0.07);
  --chrome-footer-bg: #ede8d6;
  --chrome-footer-border: rgba(0, 0, 0, 0.05);
  --chrome-footer-text: rgba(44, 38, 34, 0.35);
  --chrome-footer-brand: rgba(44, 38, 34, 0.4);
  --chrome-footer-tagline: rgba(44, 38, 34, 0.38);
  --chrome-nav-bg: linear-gradient(to bottom, rgba(248, 244, 230, 0.94) 0%, rgba(248, 244, 230, 0.88) 100%);
  --chrome-nav-solid: rgba(248, 244, 230, 0.97);
  --chrome-pill-bg: rgba(248, 244, 230, 0.82);
  --chrome-popover-bg: rgba(248, 244, 230, 0.96);
  --chrome-pill-shadow: 0 14px 34px rgba(0, 0, 0, 0.08);
  --chrome-popover-shadow: 0 22px 56px rgba(0, 0, 0, 0.16);
}

body.page.night {
  --cream: #f8f4ef;
  --cream-dim: rgba(248, 244, 239, 0.8);
  --cream-faint: rgba(248, 244, 239, 0.62);
  --border-subtle: rgba(255, 255, 255, 0.1);
  --footer-bg: #0e123e;
  --footer-border: rgba(255, 255, 255, 0.05);
  --footer-text: rgba(248, 244, 239, 0.62);
  --footer-brand: rgba(248, 244, 239, 0.66);
  --footer-tagline: rgba(248, 244, 239, 0.38);
  --nav-bg: linear-gradient(to bottom, rgba(28, 40, 112, 0.9) 0%, rgba(28, 40, 112, 0.84) 100%);
  --nav-solid: rgba(28, 40, 112, 0.97);
  --chrome-cream: #f8f4ef;
  --chrome-cream-dim: rgba(248, 244, 239, 0.8);
  --chrome-cream-faint: rgba(248, 244, 239, 0.62);
  --chrome-border-subtle: rgba(255, 255, 255, 0.1);
  --chrome-footer-bg: #0e123e;
  --chrome-footer-border: rgba(255, 255, 255, 0.05);
  --chrome-footer-text: rgba(248, 244, 239, 0.62);
  --chrome-footer-brand: rgba(248, 244, 239, 0.66);
  --chrome-footer-tagline: rgba(248, 244, 239, 0.38);
  --chrome-nav-bg: linear-gradient(to bottom, rgba(28, 40, 112, 0.9) 0%, rgba(28, 40, 112, 0.84) 100%);
  --chrome-nav-solid: rgba(28, 40, 112, 0.97);
  --chrome-pill-bg: rgba(21, 25, 90, 0.94);
  --chrome-popover-bg: rgba(21, 25, 90, 0.94);
  --chrome-pill-shadow: 0 22px 56px rgba(0, 0, 0, 0.32);
  --chrome-popover-shadow: 0 22px 56px rgba(0, 0, 0, 0.32);
}

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

a {
  color: inherit;
}

button,
input,
textarea,
select {
  font: inherit;
}

.page-shell {
  width: var(--page-width);
  margin: 0 auto;
  padding: 0 0 4rem;
}

.page-main {
  padding-top: 7rem;
}

body.page #main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.4rem 3rem;
  background: var(--chrome-nav-bg);
  backdrop-filter: blur(4px);
  transition: background 0.4s;
}

body.page #main-nav.solid {
  background: var(--chrome-nav-solid);
}

body.page .nav-brand-group {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-shrink: 0;
}

body.page .nav-brand-link {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  color: inherit;
  text-decoration: none;
  flex-shrink: 0;
}

body.page .nav-brand-link:hover,
body.page .nav-brand-link:focus-visible {
  opacity: 0.95;
}

body.page .nav-logo {
  height: 40px;
  width: auto;
}

body.page .nav-brand-text {
  font-family: "Cormorant Garamond", serif;
  font-size: 0.95rem;
  font-weight: 300;
  letter-spacing: 0.32em;
  text-transform: lowercase;
  color: var(--chrome-cream);
}

body.page .nav-tools {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55rem;
}

body.page .nav-language-menu {
  position: relative;
  min-width: 0;
  width: fit-content;
  align-self: flex-end;
}

body.page .nav-language-menu summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--chrome-border-subtle);
  background: var(--chrome-pill-bg);
  color: var(--chrome-cream);
  cursor: pointer;
  box-shadow: var(--chrome-pill-shadow);
  -webkit-appearance: none;
  appearance: none;
  white-space: nowrap;
}

body.page .nav-language-menu summary::marker {
  content: "";
}

body.page .nav-language-menu summary::-webkit-details-marker {
  display: none;
}

body.page .nav-language-current {
  font-family: "Cormorant Garamond", serif;
  font-size: 0.98rem;
  font-style: italic;
  letter-spacing: 0.08em;
  line-height: 1;
}

body.page .nav-language-menu summary svg {
  width: 0.72rem;
  height: 0.72rem;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

body.page .nav-language-menu[open] summary svg {
  transform: rotate(180deg);
}

body.page .home-language-options {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  width: max-content;
  min-width: 4.8rem;
  max-width: calc(100vw - 2rem);
  padding: 0.5rem;
  border-radius: 1rem;
  border: 1px solid var(--chrome-border-subtle);
  background: var(--chrome-popover-bg);
  box-shadow: var(--chrome-popover-shadow);
  display: grid;
  gap: 0.2rem;
  backdrop-filter: blur(12px);
  z-index: 20;
}

body.page .home-language-options a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--chrome-cream);
  padding: 0.58rem 0.72rem;
  border-radius: 0.8rem;
  transition: background 0.25s ease, transform 0.25s ease, color 0.25s ease;
}

body.page .home-language-options a .nav-language-code {
  font-family: "Cormorant Garamond", serif;
  font-size: 0.94rem;
  letter-spacing: 0.08em;
  line-height: 1;
}

body.page .home-language-options a .nav-language-status {
  width: 0.34rem;
  height: 0.34rem;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.62;
  box-shadow: 0 0 0 0.12rem rgba(26, 80, 112, 0.1);
}

body.page .home-language-options a:hover,
body.page .home-language-options a.active {
  background: rgba(26, 80, 112, 0.1);
  color: var(--sea-tyrrhenian-900);
  transform: translateX(-2px);
}

body.page.night .nav-language-menu summary,
body.page.night .home-language-options {
  background: var(--chrome-pill-bg);
  border-color: var(--chrome-border-subtle);
  box-shadow: var(--chrome-popover-shadow);
}

body.page .home-footer {
  background: var(--chrome-footer-bg);
  border-top: 1px solid var(--chrome-footer-border);
  padding: 4rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
  margin-top: 1.5rem;
}

body.page .ft-left,
body.page .ft-right {
  font-size: 0.75rem;
  line-height: 2;
  color: var(--chrome-footer-text);
}

body.page .ft-mid {
  text-align: center;
}

body.page .ft-tagline {
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--chrome-footer-tagline);
  margin-top: 0.5rem;
}

body.page .ft-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.8rem;
}

body.page .ft-links a {
  font-family: "Cormorant Garamond", serif;
  font-size: 0.82rem;
  font-style: italic;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--chrome-footer-text);
  border-bottom: 1px solid transparent;
  padding-bottom: 0.2rem;
  transition: color 0.25s ease, border-color 0.25s ease;
}

body.page .ft-links a:hover,
body.page .ft-links a:focus-visible {
  color: var(--chrome-footer-brand);
  border-color: currentColor;
}

body.page .ft-right {
  text-align: right;
}

.site-chrome {
  border: 1px solid var(--line-soft);
  background: rgba(248, 244, 230, 0.9);
  box-shadow: var(--shadow-soft);
}

.site-header,
.site-footer {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
}

.site-header {
  position: sticky;
  top: 0.75rem;
  z-index: 40;
  margin-bottom: 2.5rem;
  backdrop-filter: blur(12px);
}

.site-brand {
  min-width: 0;
}

.site-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
}

.site-brand-logo {
  width: auto;
  height: 42px;
}

.brand-mark,
.display-serif,
h1,
h2,
h3,
h4 {
  font-family: "Cormorant Garamond", serif;
}

.brand-mark {
  font-size: clamp(1.8rem, 3vw, 2.45rem);
  font-weight: 600;
  text-decoration: none;
}

.brand-tagline,
.site-footer p {
  margin: 0;
  color: var(--ink-500);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  justify-content: flex-end;
}

.site-nav a {
  text-decoration: none;
  font-size: 0.94rem;
  padding-bottom: 0.15rem;
  border-bottom: 1px solid transparent;
}

.site-nav a.active,
.site-nav a:hover,
.site-nav a:focus-visible {
  border-color: var(--sea-ionian-600);
}

.site-tools {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-left: auto;
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sea-tyrrhenian-700);
}

.editorial-panel {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: rgba(248, 244, 230, 0.9);
  box-shadow: var(--shadow-soft);
}

.editorial-title {
  margin: 0;
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  line-height: 0.95;
}

.editorial-body {
  font-size: 1rem;
  line-height: 2;
  color: var(--ink-700);
}

.language-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.language-switch a {
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 0.38rem 0.7rem;
  font-size: 0.72rem;
  text-decoration: none;
  color: var(--ink-700);
  background: rgba(255, 255, 255, 0.4);
}

.language-switch a.active {
  border-color: rgba(26, 80, 112, 0.28);
  color: var(--sea-tyrrhenian-900);
  background: rgba(26, 80, 112, 0.08);
}

.night-toggle {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.28);
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.night-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.site-footer-links a {
  text-decoration: none;
  color: var(--ink-700);
  border-bottom: 1px solid transparent;
}

.site-footer-links a:hover,
.site-footer-links a:focus-visible {
  border-color: var(--sea-ionian-600);
}

.cookie-banner {
  position: sticky;
  bottom: 1rem;
  z-index: 50;
  margin-top: 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: rgba(248, 244, 230, 0.96);
  box-shadow: var(--shadow-deep);
  backdrop-filter: blur(14px);
}

.cookie-title {
  margin: 0 0 0.25rem;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.5rem;
}

.cookie-copy p:last-child {
  margin: 0;
  color: var(--ink-700);
  line-height: 1.6;
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  justify-content: flex-end;
}

.cookie-actions a,
.cookie-actions button {
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  padding: 0.55rem 0.9rem;
  background: rgba(255, 255, 255, 0.42);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.cookie-actions button[data-consent-action="accept"] {
  background: rgba(26, 80, 112, 0.12);
  border-color: rgba(26, 80, 112, 0.22);
}

/* ── Night-mode overrides for shared chrome & panels ── */
body.page.night .site-chrome {
  background: rgba(15, 20, 69, 0.9);
  border-color: rgba(255, 255, 255, 0.08);
}

body.page.night .editorial-panel {
  background: rgba(12, 18, 61, 0.52);
  border-color: rgba(255, 255, 255, 0.07);
}

body.page.night .cookie-banner {
  background: rgba(15, 20, 69, 0.96);
  border-color: rgba(255, 255, 255, 0.08);
}

body.page.night .cookie-actions a,
body.page.night .cookie-actions button {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

body.page.night .cookie-actions button[data-consent-action="accept"] {
  background: rgba(106, 132, 224, 0.22);
  border-color: rgba(106, 132, 224, 0.38);
}

body.page.night .language-switch a {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--ink-700);
}

body.page.night .language-switch a.active {
  background: rgba(106, 132, 224, 0.18);
  border-color: rgba(106, 132, 224, 0.38);
  color: var(--ink-900);
}

body.page.night .night-toggle {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100vw - 1rem, 1180px);
  }

  .page-main {
    padding-top: 6rem;
  }

  body.page #main-nav {
    padding: 1rem 1.5rem;
  }

  body.page .nav-tools {
    gap: 0.4rem;
  }

  body.page .nav-language-menu {
    min-width: auto;
  }

  body.page .nav-language-menu summary {
    padding: 0.4rem 0.65rem;
  }

  body.page .home-language-options {
    right: 0;
    max-width: calc(100vw - 3rem);
  }

  body.page .home-footer {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 3rem 2rem;
  }

  body.page .ft-right {
    text-align: center;
  }

  .site-header,
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .site-tools {
    width: 100%;
    justify-content: space-between;
  }

  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .cookie-actions {
    justify-content: flex-start;
  }
}
