:root {
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Source Sans 3', sans-serif;
  --bg-gradient: radial-gradient(circle at 10% 20%, #fbe8d3 0%, #f0f7fb 55%, #e1ecf6 100%);
  --navy-900: #1f2c3d;
  --navy-700: #2c3e55;
  --navy-500: #3f526b;
  --seafoam-500: #3aa7a3;
  --copper-600: #b86434;
  --copper-500: #c37a47;
  --copper-300: #dba676;
  --copper-200: #f0d9c6;
  --surface: #ffffff;
  --surface-soft: rgba(255, 255, 255, 0.82);
  --text-muted: #5a6c7f;
  --shadow-soft: 0 25px 55px rgba(31, 44, 61, 0.12);
  --shadow-elevated: 0 35px 65px rgba(31, 44, 61, 0.18);
  --focus-ring: 0 0 0 3px rgba(219, 166, 118, 0.5);
}

html {
  height: 100%;
  background: var(--bg-gradient);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--navy-900);
  background: var(--bg-gradient);
  display: flex;
  justify-content: center;
  align-items: stretch;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1.5rem, 4vw, 3rem);
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
}

body.fade-in {
  opacity: 1;
}

body.fade-out {
  opacity: 0;
}

.page-shell {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  flex: 1;
  min-height: 100%;
  position: relative;
  z-index: 1;
}

body::before,
body::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.55;
  z-index: 0;
}

body::before {
  width: 420px;
  height: 420px;
  background: rgba(58, 167, 163, 0.35);
  top: -160px;
  right: -140px;
}

body::after {
  width: 360px;
  height: 360px;
  background: rgba(195, 122, 71, 0.4);
  bottom: -120px;
  left: -150px;
}

header {
  background: linear-gradient(130deg, rgba(214, 231, 236, 0.97) 0%, rgba(191, 226, 223, 0.96) 48%, rgba(242, 206, 164, 0.96) 100%);
  color: var(--navy-900);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem clamp(1.25rem, 3vw, 2rem);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  z-index: 5;
}

header .logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  font-family: var(--font-heading);
  color: #17263a;
  text-shadow: 0 6px 18px rgba(23, 38, 58, 0.28);
}

nav {
  position: relative;
}

.nav-links {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
  align-items: center;
  gap: 0.25rem;
}

.nav-links li {
  position: relative;
}

.nav-links > li > a,
.submenu-header > a {
  display: block;
  padding: 0.65em 1.2em;
  border-radius: 999px;
  color: var(--navy-900);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  transition: color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
  background: rgba(255, 255, 255, 0.85);
}

.nav-links > li > a:hover,
.nav-links > li > a:focus-visible,
.submenu-header > a:hover,
.submenu-header > a:focus-visible,
.submenu-toggle:hover,
.submenu-toggle:focus-visible {
  color: var(--navy-900);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(235, 245, 249, 0.95));
  outline: none;
  box-shadow: 0 12px 22px rgba(31, 44, 61, 0.18);
}

.submenu-header {
  display: flex;
  align-items: center;
}

.submenu-header > a {
  flex: 1;
}

.submenu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.6);
  border: none;
  color: var(--navy-900);
  padding: 0.6em 0.75em;
  margin-left: 0.25rem;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.submenu-toggle .chevron {
  font-size: 0.75rem;
  transition: transform 0.3s ease;
}

.submenu-toggle[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 6px;
}

.hamburger span {
  height: 3px;
  width: 26px;
  border-radius: 999px;
  background: var(--navy-900);
}

.submenu {
  position: absolute;
  left: 0;
  top: 100%;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(235, 245, 249, 0.95));
  list-style: none;
  padding: 0.5em;
  margin: 0;
  min-width: 230px;
  border-radius: 18px;
  border: 1px solid rgba(195, 122, 71, 0.25);
  box-shadow: 0 18px 32px rgba(58, 78, 105, 0.18);
  display: none;
  backdrop-filter: blur(6px);
  z-index: 20;
}

.submenu li a {
  display: block;
  padding: 0.55em 1.1em;
  border-radius: 12px;
  color: var(--navy-700);
  text-decoration: none;
  font-size: 0.95rem;
  transition: background 0.3s ease, color 0.3s ease;
}

.submenu li a:hover,
.submenu li a:focus-visible {
  background: rgba(58, 167, 163, 0.16);
  color: var(--navy-900);
  outline: none;
}

.submenu.show {
  display: block;
}

@media (min-width: 701px) {
  .has-submenu:hover .submenu {
    display: block;
  }
}

@media (max-width: 700px) {
  header {
    align-items: flex-start;
  }

  nav {
    width: 100%;
  }

  .nav-links {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    background: linear-gradient(165deg, rgba(227, 245, 243, 0.98), rgba(242, 206, 164, 0.96));
    flex-direction: column;
    width: min(260px, 90vw);
    display: none;
    border-radius: 20px;
    padding: 0.75rem;
    border: 1px solid rgba(195, 122, 71, 0.3);
    box-shadow: 0 18px 32px rgba(58, 78, 105, 0.22);
  }

  .nav-links.show {
    display: flex;
  }

  .nav-links > li > a,
  .submenu-header > a {
    width: 100%;
    text-align: left;
  }

  .submenu {
    position: static;
    width: 100%;
    padding: 0.4rem;
    margin-top: 0.25rem;
    border-radius: 14px;
    border: 1px solid rgba(195, 122, 71, 0.2);
    box-shadow: none;
  }

  .submenu li a {
    padding-left: 2.1em;
  }

  .submenu-toggle {
    margin-left: auto;
    color: var(--navy-900);
  }

  .hamburger {
    display: flex;
    margin-top: 0.5rem;
  }
}

main {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(235, 245, 249, 0.88));
  border-radius: 32px;
  box-shadow: 0 35px 60px rgba(31, 44, 61, 0.14);
  padding: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 4vw, 4rem);
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 4vw, 3rem);
  position: relative;
  overflow: hidden;
}

footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: auto;
  padding: 0.75rem 0 0.25rem;
}

footer a {
  color: var(--navy-700);
  text-decoration: none;
  font-weight: 600;
}

footer a:hover,
footer a:focus-visible {
  color: var(--copper-500);
  outline: none;
}
