/* Ocean Sort Buddies — product site styles
   Design canvas: 1350×3160 (same family as the Ocean Sort: Fish Match site);
   colors sampled from ios官网.psd */

:root {
  --navy-pill: #004979;
  --card-navy: #024176;
  --form-navy: #004290;
  --input-blue: #569ddf;
  --cyan: #29e3ff;
  --body-cyan: #b2f5ff;
  --yellow: #fee304;
  --ink: #111318;
  --footer-ink: #0b1622;
  --divider: #a9c6d4;
  --consent-text: #c5cdde;
  --font: -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: #2b7ac5;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; }

section { scroll-margin-top: 120px; }

h1, h2, h3 { font-weight: 800; line-height: 1.1; }

a { color: inherit; }

/* ---------- header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 10px 9px 0;
}

.nav-pill {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 1331px;
  height: 83px;
  margin: 0 auto;
  padding: 0 14px 0 22px;
  border-radius: 18px;
  background: var(--navy-pill);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  margin-right: auto;
  text-decoration: none;
}

.brand-icon { width: 50px; height: 50px; border-radius: 10px; }

.brand-name {
  color: #fff;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.appstore-pill {
  flex: none;
  display: block;
  border-radius: 30px;
  overflow: hidden;
  transition: transform 0.2s;
}

.appstore-pill:hover { transform: scale(1.04); }

.appstore-pill img { display: block; width: 203px; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
}

.nav-link {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s;
}

.nav-link:hover, .nav-link.active { color: var(--cyan); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: 0;
  cursor: pointer;
}

.nav-toggle span {
  width: 26px;
  height: 3px;
  border-radius: 2px;
  background: #fff;
}

/* ---------- hero ---------- */

.hero {
  height: 876px;
  margin-top: -93px;
  background: #1b6cb0 url("../assets/hero-bg.jpg") top center / cover no-repeat;
}

.hero-inner {
  padding-top: 157px;
  text-align: center;
}

.hero-logo {
  display: block;
  width: 788px;
  margin: 0 auto;
}

.hero h1 {
  margin-top: 40px;
  color: #fff;
  font-size: 56px;
  letter-spacing: 1px;
}

.hero-sub {
  margin: 24px auto 0;
  max-width: 760px;
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.35;
}

/* ---------- shared lower page background ---------- */

.page-lower {
  background: #2b7ac5 url("../assets/page-bg.jpg") top center / cover no-repeat;
}

/* ---------- features ---------- */

.features {
  padding: 73px 40px 0;
  text-align: center;
}

.features h2 {
  color: #fff;
  font-size: 56px;
  text-shadow: 0 4px 0 rgba(42, 7, 62, 0.35);
}

.cards {
  display: flex;
  justify-content: center;
  gap: 33px;
  max-width: 1260px;
  margin: 68px auto 0;
}

.card {
  width: 394px;
  aspect-ratio: 394 / 255;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  text-align: left;
  transition: transform 0.25s;
}

.card:hover { transform: translateY(-6px); }

.card-1 { background-image: url("../assets/card-bg-1.png"); }
.card-2 { background-image: url("../assets/card-bg-2.png"); }
.card-3 { background-image: url("../assets/card-bg-3.png"); }

.card h3 {
  padding: 30px 0 0 24px;
  color: #fff;
  font-size: 34px;
}

.card p {
  margin: 14px 40px 0 24px;
  color: var(--body-cyan);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
}

/* ---------- download ---------- */

.download { padding: 220px 40px 0; }

.download-inner {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 74px;
  max-width: 1350px;
  margin: 0 auto;
}

.dl-art { flex: none; width: 533px; }

.gameplay { display: block; width: 533px; }

.download-text {
  min-width: 0;
  flex: 1;
  max-width: 495px;
  padding-top: 46px;
  text-align: center;
  color: #fff;
}

.download-text h2 { font-size: 60px; }

.dl-available {
  margin-top: 64px;
  font-size: 28px;
  font-weight: 700;
}

.dl-contact {
  margin-top: 13px;
  font-size: 24px;
  font-weight: 600;
}

.appstore-badge {
  display: block;
  width: 575px;
  max-width: 100%;
  margin: 44px auto 0;
  border-radius: 22px;
  overflow: hidden;
  transition: transform 0.2s;
}

.appstore-badge:hover { transform: scale(1.03); }

.appstore-badge img { display: block; width: 100%; }

/* ---------- contact ---------- */

.contact {
  padding: 156px 40px 0;
  text-align: center;
}

.contact h2 {
  color: #fff;
  font-size: 56px;
  text-shadow: 0 4px 0 rgba(42, 7, 62, 0.3);
}

.contact-card {
  width: min(1013px, 100%);
  margin: 33px auto 0;
  padding: 38px 69px 36px;
  border-radius: 30px;
  background: var(--form-navy);
  text-align: left;
}

.field-row {
  display: flex;
  gap: 45px;
}

.field { flex: 1; min-width: 0; }

.field label {
  display: block;
  margin-bottom: 22px;
  color: var(--cyan);
  font-size: 23px;
  font-weight: 700;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0 24px;
  border: 0;
  border-radius: 14px;
  background: var(--input-blue);
  color: #fff;
  font-family: var(--font);
  font-size: 24px;
  font-weight: 600;
}

.field input { height: 83px; }

.field textarea { height: 243px; padding: 22px 24px; resize: vertical; }

.field input::placeholder,
.field textarea::placeholder { color: rgba(255, 255, 255, 0.92); }

.field input:focus,
.field textarea:focus,
.consent input:focus-visible + .consent-dot {
  outline: 3px solid var(--cyan);
  outline-offset: 2px;
}

.field-row + .field { margin-top: 26px; }

.consent {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  cursor: pointer;
}

.consent input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.consent-dot {
  position: relative;
  flex: none;
  width: 25px;
  height: 25px;
  border: 3px solid #fff;
  border-radius: 50%;
}

.consent input:checked + .consent-dot::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: #fff;
}

.consent-text {
  color: var(--consent-text);
  font-size: 19px;
  font-weight: 500;
}

.consent-text a { color: var(--yellow); }

.form-error {
  margin-top: 18px;
  color: #ffd7d7;
  font-size: 17px;
  font-weight: 600;
}

.submit-row { margin-top: 45px; text-align: center; }

.btn-send {
  padding: 22px 56px;
  border: 0;
  border-radius: 24px;
  background: var(--yellow);
  color: #000;
  font-family: var(--font);
  font-size: 28px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-send:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(254, 227, 4, 0.4);
}

/* ---------- footer ---------- */

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 17px;
  padding: 72px 20px 0;
}

.footer-brand img { width: 82px; border-radius: 14px; }

.footer-brand span {
  color: var(--footer-ink);
  font-size: 46px;
  font-weight: 800;
}

.site-footer .footer-bar {
  margin-top: 17px;
  border-top: 3px solid var(--divider);
}

.footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1350px;
  margin: 0 auto;
  padding: 30px 16px 42px;
  font-size: 24px;
  font-weight: 700;
  color: var(--footer-ink);
}

.footer-links {
  display: flex;
  gap: 40px;
  list-style: none;
}

.footer-links a { text-decoration: none; }

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

/* ---------- privacy page ---------- */

.privacy {
  padding: 60px 40px 60px;
}

.privacy-card {
  width: min(1013px, 100%);
  margin: 24px auto 0;
  padding: 48px 69px 56px;
  border-radius: 30px;
  background: var(--form-navy);
  color: #fff;
  text-align: left;
}

.privacy-card h1 { font-size: 46px; }

.effective-date {
  margin-top: 16px;
  color: var(--yellow);
  font-size: 21px;
  font-weight: 700;
}

.privacy-card h2 {
  margin-top: 36px;
  color: var(--yellow-active, #ffe304);
  font-size: 26px;
}

.privacy-card h3 {
  margin-top: 22px;
  font-size: 20px;
}

.privacy-card p {
  margin-top: 14px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.7;
  color: #e8eef8;
}

.privacy-card ul {
  margin: 14px 0 0 24px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.7;
  color: #e8eef8;
}

.privacy-mail { color: var(--yellow); }

.privacy-email { margin-top: 20px; }

.privacy-email a { color: var(--yellow); }

/* ---------- reveal animation (visible by default: works without JS) ---------- */

.reveal.in { animation: reveal-in 0.6s ease both; }

@keyframes reveal-in {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal.in { animation: none; }
  .card, .appstore-badge, .btn-send { transition: none; }
}

/* ---------- tablet ≤1295px: scale typography + layout ---------- */

@media (max-width: 1295px) {
  .header-inner,
  .section-inner,
  .hero-stage,
  .footer-inner { width: calc(100% - 40px); }

  .hero { height: clamp(420px, 64.9vw, 876px); }

  .hero-inner { padding-top: calc(237px - (93px - 4vw)); }

  .hero-logo { width: min(788px, 58vw); }

  .hero h1 { font-size: min(56px, 4.4vw); margin-top: min(40px, 3vw); }

  .hero-sub { font-size: min(32px, 2.5vw); margin-top: min(24px, 1.9vw); max-width: 62vw; }

  .features h2, .contact h2 { font-size: min(56px, 4.4vw); }

  .cards {
    grid-auto-flow: initial;
    display: grid;
    grid-template-columns: repeat(2, min(394px, 42vw));
    gap: min(33px, 2.6vw);
    justify-content: center;
  }

  .card { width: 100%; }

  .card h3 { padding-top: min(30px, 2.4vw); font-size: min(34px, 2.7vw); }

  .card p { margin: min(14px, 1.1vw) min(40px, 3.2vw) 0 min(24px, 1.9vw); font-size: min(22px, 1.75vw); }

  .download { padding-top: min(220px, 17vw); }

  .download-inner { gap: min(74px, 5.8vw); }

  .dl-art { width: min(533px, 41vw); }

  .gameplay { width: 100%; }

  .download-text { padding-top: min(46px, 3.6vw); }

  .download-text h2 { font-size: min(60px, 4.7vw); }

  .dl-available { margin-top: min(74px, 5.8vw); font-size: min(34px, 2.7vw); }

  .dl-contact { font-size: min(24px, 1.9vw); }

  .appstore-badge { width: min(575px, 100%); margin-top: min(76px, 6vw); }

  .contact { padding-top: min(156px, 12vw); }

  .contact-card { padding: min(38px, 3vw) min(69px, 5.4vw) min(36px, 2.8vw); }

  .field label { font-size: min(23px, 1.8vw); }

  .field input { height: min(83px, 6.5vw); font-size: min(24px, 1.9vw); }

  .field textarea { height: min(243px, 19vw); font-size: min(24px, 1.9vw); }

  .btn-send { padding: min(22px, 1.7vw) min(56px, 4.4vw); font-size: min(28px, 2.2vw); }

  .footer-brand span { font-size: min(46px, 3.6vw); }

  .footer-brand img { width: min(82px, 6.4vw); }

  .footer-bar { font-size: min(24px, 1.9vw); flex-wrap: wrap; justify-content: center; }

  .footer-links { flex-wrap: wrap; gap: 8px 40px; justify-content: center; }

  .footer-links a { white-space: nowrap; }
}

/* ---------- ≤900px: hamburger + stacked layout ---------- */

@media (max-width: 900px) {
  .nav-toggle { display: flex; }

  .nav-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 4px;
    padding: 10px;
    border-radius: 24px;
    background: var(--navy-pill);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  }

  .nav-menu.open { display: flex; }

  .nav-menu li { width: 100%; }

  .nav-link {
    display: block;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 18px;
  }

  .nav-link:hover, .nav-link.active { background: rgba(255, 255, 255, 0.08); }

  .hero { height: auto; padding: 150px 20px 80px; }

  .hero-inner { padding-top: 0; }

  .hero-logo { width: min(88%, 460px); }

  .hero h1 { font-size: 40px; margin-top: 28px; }

  .hero-sub { max-width: 100%; font-size: 19px; margin-top: 16px; }

  .features { padding: 60px 18px 0; }

  .features h2, .contact h2 { font-size: 40px; }

  .cards {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
  }

  .card { width: min(394px, 100%); }

  .card h3 { padding: 16px 0 0 18px; font-size: 24px; }

  .card p { margin: 8px 20px 16px 18px; font-size: 16px; }

  .download { padding-top: 80px; }

  .download-inner {
    flex-direction: column;
    align-items: center;
    gap: 36px;
  }

  .dl-art { width: min(533px, 92vw); }

  .gameplay { width: 100%; }

  .download-text { width: 100%; max-width: 560px; padding-top: 0; }

  .download-text h2 { font-size: 44px; }

  .dl-available { margin-top: 24px; font-size: 20px; }

  .dl-contact { font-size: 16px; }

  .appstore-badge { margin-top: 20px; }

  .contact { padding-top: 80px; }

  .contact-card { margin-top: 28px; padding: 28px 22px 32px; }

  .field-row { flex-direction: column; gap: 0; }

  .field-row + .field { margin-top: 20px; }

  .field label { margin-bottom: 12px; font-size: 18px; }

  .field input { height: 56px; padding: 0 16px; font-size: 16px; }

  .field textarea { height: 160px; padding: 14px 16px; font-size: 16px; }

  .consent { align-items: flex-start; margin-top: 18px; gap: 12px; }

  .consent-dot { width: 22px; height: 22px; margin-top: 2px; }

  .consent-text { font-size: 14px; }

  .submit-row { margin-top: 28px; }

  .btn-send { padding: 16px 44px; font-size: 20px; }

  .footer-brand { padding-top: 40px; gap: 12px; }

  .footer-brand img { width: 56px; }

  .footer-brand span { font-size: 28px; }

  .site-footer .footer-bar { margin-top: 10px; }

  .footer-bar {
    flex-direction: column;
    gap: 14px;
    padding: 20px 0 30px;
    font-size: 15px;
    text-align: center;
  }

  .footer-links { gap: 10px 28px; font-size: 15px; }

  .privacy { padding: 30px 16px 60px; }

  .privacy-card { padding: 28px 22px 36px; border-radius: 28px; }

  .privacy-card h1 { font-size: 32px; }

  .privacy-card h2 { font-size: 22px; }

  .privacy-card p, .privacy-card ul { font-size: 15px; }
}

/* ---------- ≤540px: hide brand text so nav pill + App Store CTA fit ---------- */

@media (max-width: 540px) {
  .brand-name { display: none; }

  .appstore-pill img { width: 170px; }
}
