/* Ancient Fish Traps — shared web styles (matches app Theme.swift palette) */

:root {
  --abyss: #08222A;
  --deep-sea: #0C303A;
  --tide: #134A56;
  --lagoon: #2C8B92;
  --shallow: #5FB6AE;
  --foam: #BFE6DF;
  --sand: #E8D9BC;
  --parchment: #F4ECDA;
  --parchment-bottom: #EADEC4;
  --stone: #9A9282;
  --driftwood: #7C5636;
  --bamboo: #8AA23F;
  --ember: #E0965A;
  --ember-deep: #C5713B;
  --ink: #1E1B15;
  --ink-soft: rgba(59, 55, 46, 0.72);
  --card: rgba(255, 255, 255, 0.65);
  --card-stroke: rgba(124, 86, 54, 0.18);
  --radius: 22px;
  --radius-sm: 14px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--parchment) 0%, var(--parchment-bottom) 100%);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ── Water hero background ── */

.sea-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--tide) 0%, var(--deep-sea) 45%, var(--abyss) 100%);
  color: #fff;
}

.sea-hero::before,
.sea-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.sea-hero::before {
  background:
    radial-gradient(ellipse 80% 50% at 20% 80%, rgba(95, 182, 174, 0.25) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(44, 139, 146, 0.2) 0%, transparent 55%);
}

.waves {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  height: 80px;
  pointer-events: none;
}

.wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 80' preserveAspectRatio='none'%3E%3Cpath d='M0,40 C150,80 350,0 600,40 C850,80 1050,0 1200,40 L1200,80 L0,80 Z' fill='rgba(191,230,223,0.08)'/%3E%3C/svg%3E") repeat-x;
  background-size: 600px 80px;
  animation: drift 12s linear infinite;
}

.wave:nth-child(2) {
  bottom: 8px;
  opacity: 0.6;
  animation-duration: 18s;
  animation-direction: reverse;
}

@keyframes drift {
  from { transform: translateX(0); }
  to { transform: translateX(-600px); }
}

/* ── Layout ── */

.wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Nav ── */

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  max-width: 920px;
  margin: 0 auto;
}

.site-nav a {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--ink-soft);
  padding: 8px 14px;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}

.site-nav a:hover,
.site-nav a.active {
  background: rgba(255, 255, 255, 0.55);
  color: var(--ember-deep);
}

.site-nav .brand {
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  letter-spacing: 0;
  padding-left: 0;
}

.site-nav .brand:hover {
  background: none;
  color: var(--ember-deep);
}

.nav-links {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ── Hero content ── */

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 48px 20px 72px;
}

.hero-label {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.65em;
  color: rgba(191, 230, 223, 0.85);
  margin-bottom: 12px;
}

.hero-title {
  font-size: clamp(2.2rem, 6vw, 3.2rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 10px;
}

.hero-sub {
  font-size: 1.05rem;
  color: rgba(191, 230, 223, 0.92);
  margin-bottom: 28px;
}

.hero-tagline {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ember);
}

/* ── Trap emblem (CSS-only, like app) ── */

.emblem {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 28px;
}

.emblem-ring {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(191, 230, 223, 0.25);
  border-radius: 50%;
}

.emblem-ring-dashed {
  position: absolute;
  inset: 16px;
  border: 2px dashed rgba(191, 230, 223, 0.4);
  border-radius: 50%;
  animation: spin 40s linear infinite;
}

.emblem-weave {
  position: absolute;
  inset: 20px;
}

.emblem-weave span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80px;
  height: 34px;
  margin: -17px 0 0 -40px;
  border: 2px solid rgba(191, 230, 223, 0.8);
  border-radius: 999px;
}

.emblem-weave span:nth-child(1) { transform: rotate(0deg); }
.emblem-weave span:nth-child(2) { transform: rotate(30deg); }
.emblem-weave span:nth-child(3) { transform: rotate(60deg); }
.emblem-weave span:nth-child(4) { transform: rotate(90deg); }
.emblem-weave span:nth-child(5) { transform: rotate(120deg); }
.emblem-weave span:nth-child(6) { transform: rotate(150deg); }

.emblem-fish {
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: 1.6rem;
  transform: translate(-50%, -50%);
  animation: swim 3.2s ease-in-out infinite alternate;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes swim {
  from { transform: translate(calc(-50% - 18px), calc(-50% - 4px)); }
  to   { transform: translate(calc(-50% + 18px), calc(-50% + 4px)); }
}

/* ── Cards ── */

main {
  padding: 36px 0 64px;
}

.card {
  background: var(--card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-stroke);
  border-radius: var(--radius);
  box-shadow: 0 8px 14px rgba(124, 86, 54, 0.1);
  padding: 22px 24px;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 4px;
  border-radius: 999px;
  background: var(--accent-bar, var(--lagoon));
}

.card-inner {
  padding-left: 12px;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.card-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-bar, var(--lagoon));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.section-label {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ember-deep);
  margin-bottom: 16px;
}

p { margin-bottom: 0.85em; }
p:last-child { margin-bottom: 0; }

.muted { color: var(--ink-soft); font-size: 0.95rem; }

/* ── Feature grid ── */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 8px;
}

.feature-item {
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--card-stroke);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}

.feature-item h3 {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--ink);
}

.feature-item p {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin: 0;
}

/* ── Tags ── */

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(44, 139, 146, 0.14);
  color: var(--lagoon);
}

.tag.filled {
  background: var(--lagoon);
  color: #fff;
}

/* ── Trap list ── */

.trap-list {
  list-style: none;
  display: grid;
  gap: 8px;
}

.trap-list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 0.92rem;
  padding: 8px 0;
  border-bottom: 1px solid rgba(124, 86, 54, 0.1);
}

.trap-list li:last-child { border-bottom: none; }

.trap-emoji { font-size: 1.1rem; flex-shrink: 0; }

.trap-meta {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

/* ── Stats row ── */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin: 20px 0 8px;
}

.stat {
  text-align: center;
  padding: 16px 10px;
  background: rgba(255, 255, 255, 0.45);
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-stroke);
}

.stat-num {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--ember-deep);
  line-height: 1;
}

.stat-label {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-top: 6px;
}

/* ── Contact ── */

.contact-box {
  text-align: center;
  padding: 32px 24px;
}

.contact-email {
  display: inline-block;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ember-deep);
  text-decoration: none;
  padding: 14px 28px;
  background: rgba(197, 113, 59, 0.1);
  border-radius: 999px;
  border: 1px solid rgba(197, 113, 59, 0.25);
  margin: 16px 0;
  transition: background 0.2s;
}

.contact-email:hover {
  background: rgba(197, 113, 59, 0.18);
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid rgba(124, 86, 54, 0.12);
  font-size: 0.92rem;
}

.info-row:last-child { border-bottom: none; }

.info-row dt {
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: 600;
  color: var(--ink-soft);
}

.info-row dd {
  text-align: right;
  margin: 0;
}

/* ── Page sections (single-page anchors) ── */

.page-section {
  scroll-margin-top: 20px;
  padding-top: 48px;
  margin-top: 12px;
  border-top: 1px solid rgba(124, 86, 54, 0.15);
}

.page-section-title {
  font-size: clamp(1.6rem, 4vw, 2rem);
  font-weight: 700;
  margin-bottom: 6px;
}

.page-section-sub {
  font-size: 0.95rem;
  margin-bottom: 4px;
}

/* ── Privacy sections ── */

.privacy-section h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--ink);
}

.privacy-section ul {
  margin: 0 0 12px 1.2em;
  color: var(--ink-soft);
  font-size: 0.93rem;
}

.privacy-section li { margin-bottom: 4px; }

/* ── Warning box ── */

.warning {
  --accent-bar: var(--ember-deep);
  background: rgba(197, 113, 59, 0.06);
}

/* ── Footer ── */

.site-footer {
  text-align: center;
  padding: 28px 20px 40px;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-soft);
  border-top: 1px solid rgba(124, 86, 54, 0.12);
}

.site-footer strong {
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--ink-soft);
}

.site-footer nav {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer nav a {
  color: var(--ember-deep);
  text-decoration: none;
  font-weight: 600;
}

.site-footer nav a:hover { text-decoration: underline; }

/* ── Page header (inner pages) ── */

.page-hero {
  padding: 40px 20px 48px;
  text-align: center;
}

.page-hero .hero-title {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}

.page-hero .hero-sub {
  font-size: 0.95rem;
  max-width: 520px;
  margin: 0 auto;
}

/* ── Responsive ── */

@media (max-width: 600px) {
  .site-nav {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
    text-align: center;
  }

  .nav-links { justify-content: center; }

  .info-row {
    flex-direction: column;
    gap: 2px;
  }

  .info-row dd { text-align: left; }
}
