/* TennisNear — official marketing site
   Brand palette aligned to the app (src/constants/theme.ts) */

:root {
  --green:       #1B5E20;
  --green-dark:  #14401a;
  --green-mid:   #2E7D32;
  --green-soft:  #E8F5EE;
  --lime:        #CDDC39;
  --gold:        #E29A35;
  --gold-soft:   #FBEFD9;
  --ink:         #1A1A1A;
  --muted:       #5f6b62;
  --bg:          #ffffff;
  --bg-soft:     #F5F7F4;
  --border:      #E3E8E3;
  --radius:      16px;
  --radius-lg:   28px;
  --maxw:        1120px;
  --shadow-sm:   0 1px 3px rgba(20,64,26,.08), 0 1px 2px rgba(20,64,26,.06);
  --shadow-md:   0 10px 30px rgba(20,64,26,.12);
  --shadow-lg:   0 24px 60px rgba(20,64,26,.18);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang TC", "PingFang SC", "Hiragino Sans", "Microsoft JhengHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 26px;
  border-radius: 999px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--green); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--green-mid); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--green); border-color: var(--green); }
.btn-ghost:hover { background: var(--green-soft); }

/* App Store badge */
.badge-link { display: inline-block; transition: transform .15s ease; }
.badge-link:hover { transform: translateY(-1px); }
.badge-link img { height: 56px; width: auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
  gap: 16px;
}
.brand img { height: 52px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  text-decoration: none;
  font-weight: 500;
  color: var(--ink);
  font-size: .95rem;
  transition: color .15s ease;
}
.nav-links a:hover { color: var(--green); }

.lang-switch {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--border);
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235f6b62' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>") no-repeat right 10px center;
  border-radius: 999px;
  padding: 8px 32px 8px 14px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}
.lang-switch:focus { outline: none; border-color: var(--green); }

.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1200px 500px at 85% -10%, var(--gold-soft), transparent 60%),
    linear-gradient(180deg, var(--bg-soft), #fff 70%);
}
.hero .container {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 48px;
  align-items: center;
  padding-top: 72px;
  padding-bottom: 72px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .78rem;
  color: var(--gold);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--gold);
  display: inline-block;
}
.hero h1 {
  font-size: clamp(2.1rem, 4.5vw, 3.3rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--ink);
}
.hero h1 .accent { color: var(--green); }
.hero p.lead {
  margin-top: 18px;
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 30ch;
}
.hero-cta {
  margin-top: 30px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

/* Phone mockup */
.hero-art { position: relative; display: flex; justify-content: center; }
.hero-art::before {
  content: "";
  position: absolute;
  inset: -10% -6% -6% -6%;
  background: radial-gradient(closest-side, rgba(205,220,57,.30), transparent 70%);
  z-index: 0;
}
.phone {
  position: relative;
  z-index: 1;
  width: 300px;
  max-width: 78vw;
  border-radius: 44px;
  padding: 10px;
  background: #1d2420;
  box-shadow: var(--shadow-lg);
}
.phone img { border-radius: 34px; width: 100%; }

/* ---------- Sections ---------- */
section { padding: 84px 0; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 52px; }
.section-head h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -.02em;
}
.section-head p { margin-top: 12px; color: var(--muted); font-size: 1.1rem; }

/* ---------- Features ---------- */
.features { background: var(--bg-soft); }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.feature-icon {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--green-soft);
  font-size: 1.7rem;
  margin-bottom: 18px;
}
.feature-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.feature-card p { color: var(--muted); font-size: .98rem; }

/* ---------- Screenshots ---------- */
.shots-scroller {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  padding: 8px 4px 28px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.shot {
  scroll-snap-align: center;
  flex: 0 0 auto;
  width: 248px;
  text-align: center;
}
.shot .phone { width: 248px; margin: 0 auto 16px; }
.shot p { color: var(--muted); font-size: .95rem; }
.shots-scroller::-webkit-scrollbar { height: 8px; }
.shots-scroller::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }

/* ---------- Download ---------- */
.download { background: var(--bg-soft); }
.download-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: stretch;
}
.dl-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.dl-card .platform {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1.25rem; margin-bottom: 8px;
}
.dl-card .platform .dot { width: 10px; height: 10px; border-radius: 999px; }
.dl-card .ios-dot { background: var(--green); }
.dl-card .android-dot { background: var(--gold); }
.dl-card p.note { color: var(--muted); margin-bottom: 24px; }
.dl-card .spacer { flex: 1; }

/* Form */
.signup { display: flex; flex-direction: column; gap: 12px; }
/* honeypot — kept in the layout but hidden from sighted users & AT */
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.signup-row { display: flex; gap: 10px; }
.signup input[type="email"] {
  flex: 1;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  min-width: 0;
}
.signup input[type="email"]:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.form-msg { font-size: .92rem; min-height: 1.2em; }
.form-msg.ok { color: var(--green-mid); }
.form-msg.err { color: #C62828; }
.form-msg.info { color: var(--muted); }
.btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--green-dark);
  color: #d7e3da;
  padding: 56px 0 40px;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.footer-brand strong { display: block; font-size: 1.4rem; color: #fff; letter-spacing: -.01em; }
.footer-brand span { color: #a9bcae; font-size: .95rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 28px; }
.footer-links a { color: #d7e3da; text-decoration: none; font-size: .95rem; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { padding-top: 24px; font-size: .85rem; color: #91a596; }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .hero .container { grid-template-columns: 1fr; text-align: center; padding-top: 56px; padding-bottom: 56px; }
  .hero p.lead { max-width: none; margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .hero-art { order: -1; margin-bottom: 12px; }
  .feature-grid { grid-template-columns: 1fr; }
  .download-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}

@media (max-width: 480px) {
  .container { padding: 0 18px; }
  section { padding: 60px 0; }
  .signup-row { flex-direction: column; }
  .badge-link img { height: 50px; }
}
