/* ============================================================
   Sailing Companion — sailing-companion.com
   Static landing page styles
   ============================================================ */

:root {
  --navy: #0F3B62;
  --navy-dark: #08243F;
  --navy-light: #1E5687;
  --accent: #4D9EE3;
  --ink: #0F1A2A;
  --muted: #5A6B82;
  --hairline: #E2E8EF;
  --surface: #FFFFFF;
  --surface-tint: #F5F8FB;
  --max-width: 1140px;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(15, 26, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 26, 42, 0.08);
  --shadow-lg: 0 24px 60px rgba(15, 26, 42, 0.14);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ECF1F8;
    --muted: #9AAAC0;
    --hairline: #1B2A3D;
    --surface: #0A1422;
    --surface-tint: #0F1E33;
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

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

h1, h2, h3 { color: var(--ink); margin: 0; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.4rem, 4.8vw, 3.6rem); line-height: 1.3; }
h2 { font-size: clamp(1.6rem, 2.5vw, 2.1rem); line-height: 1.15; }
h3 { font-size: 1.18rem; line-height: 1.3; }

p { margin: 0; }

/* ─── Header ─────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
}
@media (prefers-color-scheme: dark) {
  .site-header { background: rgba(10, 20, 34, 0.8); }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}
.brand:hover { text-decoration: none; }
.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  box-shadow: var(--shadow-sm);
}
.brand-name { font-size: 1.2rem; letter-spacing: -0.01em; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}
.nav-links a.btn {
  color: #FFFFFF;
}
.nav-links a:hover { color: var(--ink); text-decoration: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-ghost {
  background: var(--navy);
  color: #FFFFFF;
}
.btn-ghost:hover { background: var(--accent); }
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--hairline);
}
.btn-secondary:hover { background: var(--surface-tint); }

/* ─── Hero ──────────────────────────────────────── */

.hero {
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(77,158,227,0.18), transparent 60%),
    radial-gradient(ellipse 60% 50% at 100% 30%, rgba(15,59,98,0.10), transparent 60%),
    linear-gradient(180deg, var(--surface), var(--surface));
  padding: 80px 0 100px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.hero-lead {
  margin-top: 22px;
  color: var(--muted);
  font-size: 1.18rem;
  max-width: 540px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 36px;
  flex-wrap: wrap;
  align-items: center;
}

.app-store-badge {
  display: inline-block;
  line-height: 0;
  border-radius: 9px;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.app-store-badge:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.app-store-badge--large img { width: 220px; height: auto; }

.hero-meta {
  margin-top: 22px;
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-visual {
  display: flex;
  justify-content: center;
}
.hero-logo {
  width: min(360px, 100%);
  height: auto;
  transition: transform 0.4s ease;
}
.hero-logo:hover { transform: scale(1.02) rotate(-1deg); }

/* ─── Section common ─────────────────────────────── */

section { padding: 90px 0; }

.section-title {
  text-align: center;
  margin-bottom: 12px;
}
.section-lead {
  text-align: center;
  color: var(--muted);
  font-size: 1.08rem;
  margin-bottom: 56px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* ─── Features ──────────────────────────────────── */

.features { background: var(--surface-tint); }

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

.feature-card {
  background: var(--surface);
  padding: 28px 26px;
  border-radius: var(--radius);
  border: 1px solid var(--hairline);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(77,158,227,0.16), rgba(15,59,98,0.10));
  color: var(--navy);
  margin-bottom: 18px;
}
@media (prefers-color-scheme: dark) {
  .feature-icon { color: var(--accent); }
}

.feature-card p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.97rem;
}

.screenshots {
  background: linear-gradient(rgba(15,59,98,0.40), rgba(15,59,98,0.40)), url('assets/cockpit_landscape.jpg') center/cover no-repeat;
  color: #fff;
}
.screenshots .section-title,
.screenshots .section-lead { color: #fff; }
.screenshot-row { filter: brightness(1.05); }
.phone figcaption { color: #fff; }

/* ─── Screenshots ────────────────────────────────── */

.screenshot-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  align-items: end;
}

.phone {
  margin: 0;
  text-align: center;
}
.phone img:not(.phone-frame img) {
  filter: drop-shadow(0 16px 32px rgba(15,26,42,0.18));
}
.phone--featured img {
  max-width: 320px;
  transform: translateY(-12px);
}
.phone figcaption {
  margin-top: 18px;
  color: #fff;
  font-weight: 500;
}

/* ─── Social Video ──────────────────────────────── */
.social-video {
  background: var(--surface-tint);
}
.social-video .container {
  width: 100%;
}
.video-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 0;
}

/* ─── Phone Frame ───────────────────────────────── */
.phone-frame {
  position: relative;
  display: inline-block;
  border-radius: 52px;
  border: 2px solid #0d0d0d;
  background: #000;
  padding: 14px 14px 14px 14px;
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.4),
    0 24px 64px rgba(15,26,42,0.28);
  overflow: hidden;
}
.phone-frame img {
  display: block;
  width: 100%;
  max-width: none;
  border-radius: 0;
  filter: drop-shadow(none);
}
.phone-dynamic-island {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 126px;
  height: 37px;
  background: #000;
  border-radius: 18px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.phone-camera {
  width: 14px;
  height: 14px;
  background: #111;
  border-radius: 50%;
  border: 1px solid #2a2a2a;
  box-shadow: inset 0 0 2px rgba(0,0,0,0.8);
}

/* ─── Languages ──────────────────────────────────── */

#languages {
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(77,158,227,0.15), transparent 60%),
    radial-gradient(ellipse 60% 50% at 100% 30%, rgba(15,59,98,0.10), transparent 60%),
    var(--surface-tint);
}

.language-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.language-list li {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.flag-img {
  width: 28px;
  height: 18px;
  border-radius: 3px;
  object-fit: cover;
  flex-shrink: 0;
}

/* ─── CTA ───────────────────────────────────────── */

.cta {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: #fff;
  padding: 90px 0;
}
.cta h2 { color: #fff; font-size: clamp(1.8rem, 3vw, 2.4rem); }
.cta-inner { text-align: center; }
.cta p { color: rgba(255,255,255,0.85); margin: 12px 0 28px; }
.cta-note { font-size: 0.88rem; opacity: 0.7; margin-top: 18px; }

/* ─── Footer ────────────────────────────────────── */

.site-footer {
  background: var(--navy-dark);
  color: rgba(255, 255, 255, 0.75);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}
.footer-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.footer-links a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.95rem;
}
.footer-links a:hover { color: #fff; text-decoration: none; }

/* ─── Legal pages ────────────────────────────────── */

.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 32px 120px;
}
.legal h1 { font-size: 2rem; margin-bottom: 8px; }
.legal .legal-eyebrow {
  color: var(--muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 18px;
}
.legal h2 { font-size: 1.25rem; margin-top: 36px; margin-bottom: 12px; }
.legal p { margin-bottom: 14px; color: var(--ink); }
.legal address {
  font-style: normal;
  background: var(--surface-tint);
  border-radius: 10px;
  padding: 16px 18px;
  margin: 18px 0 24px;
  border: 1px solid var(--hairline);
}
.legal a.back {
  display: inline-block;
  margin-top: 32px;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ─── Responsive ────────────────────────────────── */

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .hero-visual { order: -1; }
  .hero-logo { width: 220px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .screenshot-row { grid-template-columns: 1fr; gap: 40px; }
  .phone { text-align: center; }
  .phone img { width: 100% !important; max-width: 340px; height: auto; }
  .phone--featured img { transform: none; }
  .nav-links { gap: 14px; }
  .nav-links a:not(.btn) { display: none; }
}

@media (max-width: 560px) {
  section { padding: 64px 0; }
  .hero { padding: 56px 0 72px; }
  .feature-grid { grid-template-columns: 1fr; }
  .container { padding: 0 20px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .nav-links .btn { padding: 5px 12px; font-size: 0.82rem; }
  .header-inner { padding-top: 22px; padding-bottom: 22px; }
}
