:root {
  --bg: #f7f3f1;
  --surface: rgba(255, 255, 255, 0.72);
  --ink: #12202a;
  --muted: rgba(18, 32, 42, 0.72);
  --accent: #4f7a92;
  --footer: #223642;
  --border: rgba(0, 0, 0, 0.08);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Playfair Display", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}

p { margin: 0 0 1rem; color: var(--muted); }

a { color: inherit; text-decoration: none; }

a:hover { text-decoration: none; }

.page-shell {
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 72px 24px;
}

.section-stack { display: grid; gap: 32px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 24px;
  height: 68px;
  position: relative;
}

.brand { display: inline-flex; align-items: center; }

.brand img { height: 44px; width: auto; display: block; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  opacity: 0.86;
}

.nav-links a { position: relative; padding: 6px 0; }

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.nav-links a:hover { opacity: 1; }
.nav-links a:hover::after { transform: scaleX(1); }

/* Mobile navigation */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  margin-left: auto;
  border: none;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
  cursor: pointer;
  transition: transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.nav-toggle:active { transform: translateY(1px); }

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 999px;
  opacity: 0.85;
  transition: transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
  transform-origin: center;
}

.nav-toggle:hover .nav-toggle-bar { opacity: 1; }

.nav-toggle.is-open .nav-toggle-bar:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle.is-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle.is-open .nav-toggle-bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

.nav-panel { display: none; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; height: 64px; }

  .nav-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: grid;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 25;
  }

  .nav-panel.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-panel a {
    padding: 16px 24px;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    color: var(--ink);
  }

  .nav-panel a:last-child { border-bottom: none; }
}

.nav-scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.10);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 20;
}

.nav-scrim.visible {
  opacity: 1;
  pointer-events: auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
}

.btn-primary:hover { transform: translateY(-1px); background: #456b81; }
.btn-primary:active { transform: translateY(0); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14); }

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border-color: rgba(79, 122, 146, 0.4);
  box-shadow: none;
}

.btn-secondary:hover { background: rgba(79, 122, 146, 0.08); border-color: var(--accent); }
.btn-secondary:active { transform: translateY(0); box-shadow: none; }

.btn-ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--border);
  box-shadow: none;
}

/* Forms */
label { color: var(--ink); font-weight: 600; }

input, select, textarea {
  font: inherit;
  color: var(--ink);
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(79, 122, 146, 0.7);
  box-shadow: 0 0 0 3px rgba(79, 122, 146, 0.18);
}

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

/* Footer */
.footer {
  background: var(--footer);
  color: rgba(255, 255, 255, 0.86);
  padding: 0 0 calc(44px + env(safe-area-inset-bottom));
  margin-top: 0;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 44px 24px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-details {
  display: grid;
  gap: 10px;
  text-align: right;
  font-weight: 600;
  line-height: 1.4;
}

.footer img { height: 48px; width: auto; display: block; }

@media (max-width: 900px) {
  .header-inner { padding: 10px 18px; height: 64px; }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 18px;
  }

  .footer-details { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .nav-panel { transition: none !important; }
}
