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

:root {
  --text-primary: #111827;
  --text-secondary: #4B5563;
  --text-muted: #6B7280;
  --bg-white: #FFFFFF;
  --bg-light: #F9FAFB;
  --border: #E5E7EB;
  --accent: #4F46E5;
  --accent-light: #EEF2FF;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-primary);
  background: var(--bg-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 0 0 auto;
}

footer {
  flex-shrink: 0;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Top Bar */
.topbar {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.topbar .container {
  display: flex;
  align-items: center;
}

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

.topbar-logo {
  width: 36px;
  height: auto;
}

/* Hero / Header */
.hero {
  padding: 48px 0 40px;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.hero .tagline {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
}

/* About */
.about {
  padding: 48px 0;
  border-bottom: 1px solid var(--border);
}

.about p {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  line-height: 1.8;
}

/* Features */
.features {
  padding: 40px 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.feature-card {
  padding: 24px 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-white);
  transition: box-shadow 0.2s ease;
}

.feature-card:hover {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.feature-icon {
  margin-bottom: 20px;
}

.feature-card h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.feature-card p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Contact */
.contact {
  padding: 32px 0;
  text-align: center;
}

.contact h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.contact p {
  font-size: 1rem;
  color: var(--text-secondary);
}

.contact a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.contact a:hover {
  text-decoration: underline;
}

/* Footer — flex-shrink:0 is set above in the layout block */
footer {
  margin-top: auto;
  overflow: hidden;
  position: relative;
}

.footer-bottom {
  background: #1E3A5F;
  padding: 20px 0 16px;
  text-align: center;
  position: relative;
  z-index: 3;
}

.footer-links {
  margin-bottom: 8px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.8125rem;
  margin: 0 12px;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: rgba(255, 255, 255, 0.9);
}

.footer-bottom p {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Ocean & Waves */
.ocean {
  position: relative;
  height: 120px;
  background: linear-gradient(180deg, var(--bg-white) 0%, #d4e6f1 40%, #7fb3d3 100%);
  overflow: hidden;
}

.wave {
  position: absolute;
  bottom: 0;
  left: -100%;
  width: 400%;
  height: 80px;
  background-repeat: repeat-x;
  background-size: 25% 100%;
}

.wave-1 {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,50 Q300,110 600,50 Q900,-10 1200,50 L1200,120 L0,120 Z' fill='%231E3A5F' opacity='0.3'/%3E%3C/svg%3E");
  animation: wave-drift 8s linear infinite;
  z-index: 1;
}

.wave-2 {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,40 Q300,100 600,40 Q900,-20 1200,40 L1200,120 L0,120 Z' fill='%231E3A5F' opacity='0.5'/%3E%3C/svg%3E");
  animation: wave-drift 6s linear infinite reverse;
  z-index: 2;
  bottom: -5px;
}

.wave-3 {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,55 Q300,105 600,55 Q900,5 1200,55 L1200,120 L0,120 Z' fill='%231E3A5F'/%3E%3C/svg%3E");
  animation: wave-drift 10s linear infinite;
  z-index: 3;
  bottom: -10px;
}

@keyframes wave-drift {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Boat */
.boat {
  position: absolute;
  z-index: 4;
  top: 10px;
  animation: sail 25s linear infinite, bob 3s ease-in-out infinite;
}

.boat-logo {
  width: 32px;
  height: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

@keyframes sail {
  0% { left: -50px; }
  100% { left: calc(100% + 50px); }
}

@keyframes bob {
  0%, 100% { margin-top: 0; }
  50% { margin-top: 6px; }
}

/* Legal Pages */
.legal {
  padding: 56px 0 72px;
}

.legal h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.legal-date {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.legal h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.legal p, .legal li {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.legal ul {
  padding-left: 24px;
  margin: 8px 0;
}

.legal li {
  margin-bottom: 6px;
}

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

.legal a:hover {
  text-decoration: underline;
}

/* Sound Toggle */
.sound-toggle {
  position: fixed;
  bottom: 56px;
  right: 20px;
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: background 0.2s, box-shadow 0.2s;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
}

.sound-toggle:hover {
  background: var(--accent-light);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.sound-toggle.active {
  background: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent);
}

/* Responsive */
@media (max-width: 768px) {
  .hero {
    padding: 32px 0 24px;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .hero .tagline {
    font-size: 1rem;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .features {
    padding: 24px 0;
  }

  .feature-card {
    padding: 20px 20px;
  }

  .feature-card p {
    font-size: 0.875rem;
  }

  .contact {
    padding: 24px 0;
  }

  .contact h2 {
    font-size: 1.25rem;
  }

  .ocean {
    height: 80px;
  }

  .wave {
    height: 50px;
  }
}
