:root {
  --bg: #dceefe;
  --surface: #f7fcff;
  --surface-soft: #dfedf8;
  --text: #173248;
  --muted: #3f6178;
  --accent: #1e5f8f;
  --accent-soft: #7db2d9;
  --border: #b8d6eb;
  --sand: #e6f3ff;
  --max-width: 1080px;
  --radius: 16px;
  --shadow: 0 12px 24px rgba(26, 66, 72, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Lora", "Georgia", serif;
  background-color: var(--bg);
  background-image: radial-gradient(circle at 10% 10%, rgba(151, 194, 228, 0.28) 0%, rgba(151, 194, 228, 0) 40%),
    radial-gradient(circle at 85% 15%, rgba(95, 154, 205, 0.2) 0%, rgba(95, 154, 205, 0) 35%),
    linear-gradient(180deg, #e7f3ff 0%, #d5e9fb 50%, #e5f2ff 100%);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(230, 243, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.8rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.brand {
  font-size: 1.1rem;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: var(--text);
}

.menu-toggle {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  color: var(--text);
  padding: 0.5rem 0.8rem;
  font-size: 0.9rem;
  display: none;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

.main-nav a {
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  padding: 0.3rem 0.5rem;
  border-radius: 8px;
}

.main-nav a[aria-current="page"] {
  background: var(--surface-soft);
  color: #1c4f55;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.2rem 1rem 2rem;
  position: relative;
}

.container::before {
  content: "";
  display: block;
  width: 100%;
  height: 14px;
  margin-bottom: 1.1rem;
  border-radius: 999px;
  background: linear-gradient(
      90deg,
      rgba(125, 178, 217, 0.55) 0%,
      rgba(30, 95, 143, 0.25) 28%,
      rgba(125, 178, 217, 0.6) 52%,
      rgba(30, 95, 143, 0.25) 75%,
      rgba(125, 178, 217, 0.55) 100%
    )
    0 0 / 220% 100%;
  animation: waveShift 11s ease-in-out infinite;
}

.hero {
  background: linear-gradient(160deg, #e7f4ff 0%, #f7fcff 45%, #dceefe 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.6rem, 2.8vw, 3rem);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -65px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(125, 178, 217, 0.32) 0%, rgba(125, 178, 217, 0) 65%);
  pointer-events: none;
}

h1,
h2,
h3 {
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  letter-spacing: 0.01em;
  line-height: 1.25;
  margin-top: 0;
}

h1 {
  font-size: clamp(1.7rem, 5vw, 2.8rem);
}

h2 {
  font-size: clamp(1.3rem, 3vw, 2rem);
  margin-bottom: 0.8rem;
}

.lead {
  font-size: 1.08rem;
  color: var(--muted);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.btn {
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  display: inline-block;
  position: relative;
  overflow: hidden;
  border-radius: 999px;
  padding: 0.62rem 1rem;
  border: 1px solid var(--accent);
  transition: transform 180ms ease, box-shadow 220ms ease;
}

.btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  pointer-events: none;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(22, 70, 106, 0.16);
}

.btn:hover::after,
.btn:focus-visible::after {
  animation: ripplePulse 700ms ease-out;
}

.btn.primary {
  background: var(--accent);
  color: #fff;
}

.btn.secondary {
  background: transparent;
}

.section {
  margin-top: 2rem;
}

.section-hero-image {
  margin-top: 0;
}

.hero-photo {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: block;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
}

.card {
  grid-column: span 4;
  background: linear-gradient(180deg, #fbfeff 0%, #f1f8ff 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

a.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: border-color 180ms ease, box-shadow 220ms ease;
}

a.card-link:hover,
a.card-link:focus-visible {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.schedule-notice {
  margin-top: 0;
  background: linear-gradient(180deg, #e8f4fc 0%, #dff0fb 100%);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 0.98rem;
}

.schedule-notice p {
  margin: 0;
}

.section.stack h2 a {
  color: inherit;
  text-decoration: none;
}

.section.stack h2 a:hover,
.section.stack h2 a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

.card h3 {
  margin-bottom: 0.2rem;
}

.quote {
  padding: 1rem;
  border-left: 4px solid var(--accent-soft);
  background: var(--sand);
  border-radius: 0 12px 12px 0;
}

.stack > * + * {
  margin-top: 0.8rem;
}

.todo {
  border: 1px dashed var(--accent-soft);
  border-radius: 12px;
  padding: 0.75rem;
  background: #eef7ff;
  color: #2f5878;
  font-size: 0.95rem;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #f7fcff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

th,
td {
  text-align: left;
  padding: 0.7rem;
  border-bottom: 1px solid #e4efef;
}

thead {
  background: #e8f3fc;
}

.list-clean {
  margin: 0;
  padding-left: 1.1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field.full {
  grid-column: span 2;
}

label {
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 0.94rem;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  border: 1px solid var(--border);
  background: #fcfeff;
  border-radius: 10px;
  padding: 0.62rem 0.72rem;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(30, 95, 143, 0.2);
  border-color: var(--accent);
}

textarea {
  min-height: 130px;
  resize: vertical;
}

.form-note {
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.success-banner {
  background: linear-gradient(180deg, #e7f7ff 0%, #dbf1ff 100%);
  border-color: #8bb9d9;
  color: #184462;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
}

.site-footer {
  margin-top: 2rem;
  border-top: 1px solid var(--border);
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  background: rgba(231, 244, 255, 0.7);
}

@keyframes waveShift {
  0% {
    background-position: 0% 0%;
  }
  50% {
    background-position: 100% 0%;
  }
  100% {
    background-position: 0% 0%;
  }
}

@keyframes ripplePulse {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0.5;
  }
  100% {
    transform: translate(-50%, -50%) scale(18);
    opacity: 0;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #081a2a;
    --surface: #11283b;
    --surface-soft: #1a3850;
    --text: #d8e8f5;
    --muted: #a6bfd3;
    --accent: #6bb2e6;
    --accent-soft: #4f94c5;
    --border: #2b4e67;
    --sand: #163046;
    --shadow: 0 12px 24px rgba(0, 0, 0, 0.28);
  }

  body {
    background-image: radial-gradient(circle at 12% 8%, rgba(58, 107, 148, 0.34) 0%, rgba(58, 107, 148, 0) 43%),
      radial-gradient(circle at 84% 15%, rgba(40, 84, 120, 0.35) 0%, rgba(40, 84, 120, 0) 37%),
      linear-gradient(180deg, #092034 0%, #081a2a 48%, #0d2438 100%);
  }

  .site-header {
    background: rgba(10, 30, 46, 0.88);
  }

  .hero {
    background: linear-gradient(155deg, #18374e 0%, #122d42 50%, #0f2538 100%);
  }

  .card {
    background: linear-gradient(180deg, #17344b 0%, #112a3f 100%);
  }

  .todo {
    background: #17344b;
    color: #b8d3e8;
  }

  table {
    background: #112a3f;
  }

  thead {
    background: #1c3e57;
  }

  input,
  select,
  textarea {
    background: #0f2538;
    color: var(--text);
  }

  .site-footer {
    background: rgba(11, 34, 52, 0.8);
  }

  .success-banner {
    background: linear-gradient(180deg, #1d4663 0%, #173c56 100%);
    border-color: #376789;
    color: #d9edfb;
  }

  .schedule-notice {
    background: linear-gradient(180deg, #1a3a52 0%, #153246 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .container::before {
    animation: none;
  }

  .btn:hover,
  .btn:focus-visible {
    transform: none;
    box-shadow: none;
  }

  .btn:hover::after,
  .btn:focus-visible::after {
    animation: none;
  }
}

@media (max-width: 880px) {
  .card {
    grid-column: span 6;
  }
}

@media (max-width: 700px) {
  .menu-toggle {
    display: inline-block;
  }

  .main-nav {
    display: none;
    width: 100%;
  }

  .main-nav.open {
    display: block;
  }

  .nav-wrap {
    flex-wrap: wrap;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0.4rem;
    padding-top: 0.3rem;
  }

  .card {
    grid-column: span 12;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .field.full {
    grid-column: span 1;
  }
}
