/* ==========================================================================
   Winky — shared site styles
   Palette + type pulled 1:1 from the iOS app (AuthTheme.swift / ChatTheme.swift):
     accent   #B200FF
     bg       #000000 -> accent gradient
     text     #FFFFFF / rgba(255,255,255,.7) secondary
     destructive #FF5A52
   Font: TikTok Sans (self-hosted, same files bundled in the app)
   ========================================================================== */

@font-face {
  font-family: "TikTok Sans";
  src: url("../fonts/TikTokSans-Light.ttf") format("truetype");
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: "TikTok Sans";
  src: url("../fonts/TikTokSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "TikTok Sans";
  src: url("../fonts/TikTokSans-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "TikTok Sans";
  src: url("../fonts/TikTokSans-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "TikTok Sans";
  src: url("../fonts/TikTokSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "TikTok Sans";
  src: url("../fonts/TikTokSans-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "TikTok Sans";
  src: url("../fonts/TikTokSans-Black.ttf") format("truetype");
  font-weight: 900;
  font-display: swap;
}

:root {
  --accent: #B200FF;
  --accent-soft: rgba(178, 0, 255, 0.16);
  --bg: #000000;
  --bg-elevated: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.12);
  --border-soft: rgba(255, 255, 255, 0.06);
  --text: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-tertiary: rgba(255, 255, 255, 0.5);
  --destructive: #FF5A52;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-pill: 999px;
  --max-width: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
#download { scroll-margin-top: 160px; }

body {
  margin: 0;
  font-family: "TikTok Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* Full-bleed gradient background — same black -> purple blend as the app,
   black holding past the halfway mark before purple takes over. */
.bg-gradient {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    to bottom,
    #000000 0%,
    #000000 45%,
    var(--accent) 130%
  );
}

a { color: inherit; text-decoration: none; }

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

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

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(0, 0, 0, 0.55);
  border-bottom: 1px solid var(--border-soft);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-secondary);
  transition: color .15s, background .15s;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text);
  background: var(--bg-elevated);
}

.nav-cta {
  color: #fff !important;
  background: var(--accent) !important;
}

.nav-toggle {
  display: none;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 28px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  border: none;
  transition: transform .15s, opacity .15s;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 30px -8px rgba(178, 0, 255, 0.65);
}

.btn-primary:hover { opacity: 0.92; }

.btn-secondary {
  background: linear-gradient(to top, rgba(255,255,255,0.16), rgba(255,255,255,0.48));
  color: #fff;
  border: 0.5px solid rgba(255,255,255,0.35);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 64px 0 56px;
  text-align: center;
  overflow: hidden;
}

/* Same static map-tile background used behind the Discover tab in the app,
   faded top-to-bottom so it sits behind the hero copy without competing. */
.hero-map-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: url("../img/map-bg.png");
  background-size: cover;
  background-position: center top;
  opacity: 0.45;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 70%, transparent 100%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  border: 1px solid rgba(178, 0, 255, 0.35);
  color: #E3B3FF;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(28px, 4.5vw, 46px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
}

.hero p.lead {
  font-size: 19px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.store-badges {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.store-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 20px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-weight: 600;
}

/* Official-style "Download on the App Store" badge */
.appstore-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 18px;
  border-radius: 12px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: opacity .15s, transform .15s;
}

.appstore-badge:hover { opacity: 0.85; }
.appstore-badge:active { transform: scale(0.97); }

.appstore-badge.is-disabled {
  cursor: default;
  pointer-events: none;
  opacity: 0.6;
}

.appstore-badge.is-disabled:hover { opacity: 0.6; }

.appstore-badge svg {
  width: 26px;
  height: 26px;
  fill: #fff;
  flex: 0 0 auto;
}

.appstore-badge .label {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-align: left;
}

.appstore-badge .label small {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
}

.appstore-badge .label strong {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
}

/* ---------- Sections / Cards ---------- */

section { padding: 64px 0; }

.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 48px;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

.h2-lead-in {
  font-size: 0.55em;
  font-weight: 400;
  display: block;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.section-head p {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
}

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

.card {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 0.7px solid transparent;
  border-image: linear-gradient(to bottom, rgba(255,255,255,0.28), rgba(255,255,255,0.06)) 1;
}

.card .icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 16px;
}

.card h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
}

.card p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

/* Circled trademark mark, matching the in-app "TM" badge */
.tm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  top: -0.65em;
  margin-left: -0.24em;
  width: 2.15em;
  height: 2.15em;
  padding-right: 0.1em;
  border: 0.14em solid currentColor;
  border-radius: 50%;
  box-sizing: border-box;
  font-size: 0.34em;
  font-weight: 700;
  letter-spacing: -0.1em;
  line-height: 1;
}

.tm-text {
  display: inline-block;
  transform: scale(0.78);
}

.hero h1 .tm,
.tm-lg {
  top: -1.7em;
  margin-left: 0.4em;
  width: 1.8em;
  height: 1.8em;
  border-width: 0.14em;
  font-size: 0.26em;
}

/* ---------- Legal / doc pages ---------- */

.doc-hero {
  padding: 64px 0 32px;
  text-align: center;
}

.doc-hero h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

.doc-hero .updated {
  color: var(--text-tertiary);
  font-size: 14px;
}

.doc-body {
  max-width: 760px;
  margin: 0 auto;
  padding-bottom: 96px;
}

.doc-section {
  padding: 28px 0;
  border-bottom: 1px solid var(--border-soft);
}

.doc-section:last-child { border-bottom: none; }

.doc-section h2 {
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 12px;
  display: flex;
  gap: 10px;
}

.doc-section h2 .num {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.doc-section p {
  color: var(--text-secondary);
  font-size: 15.5px;
  line-height: 1.75;
  margin: 0;
  white-space: pre-line;
}

.doc-section p + p,
.doc-section ul + p,
.doc-section ol + p { margin-top: 12px; }

.doc-section h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 22px 0 10px;
}

.doc-section ul,
.doc-section ol {
  color: var(--text-secondary);
  font-size: 15.5px;
  line-height: 1.75;
  margin: 10px 0 0;
  padding-left: 22px;
}

.doc-section li::marker { color: var(--accent); }

.doc-section strong { color: var(--text); font-weight: 700; }

.doc-section a,
.faq-item p a { color: var(--accent); }

.doc-section a:hover,
.faq-item p a:hover { text-decoration: underline; }

/* ---------- FAQ ---------- */

.faq-category {
  margin-bottom: 40px;
}

.faq-category h2 {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
}

.faq-item {
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  margin-bottom: 10px;
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 20px;
  font-weight: 600;
  font-size: 15.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  flex: 0 0 auto;
  font-size: 20px;
  font-weight: 400;
  color: var(--text-tertiary);
  transition: transform .15s;
}

.faq-item[open] summary::after {
  content: "\2212"; /* minus */
  color: var(--accent);
}

.faq-item p {
  margin: 0;
  padding: 0 20px 20px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
}

/* ---------- Winky Rules ---------- */

.rules-tagline {
  text-align: center;
  color: var(--text-secondary);
  font-size: 17px;
  max-width: 480px;
  margin: 0 auto 48px;
}

.rule-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 0.7px solid var(--border);
}

.rule-card .icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 18px;
}

.rule-card .icon.pink   { background: rgba(255, 82, 165, 0.18); }
.rule-card .icon.orange { background: rgba(255, 159, 10, 0.18); }
.rule-card .icon.blue   { background: rgba(64, 156, 255, 0.18); }
.rule-card .icon.red    { background: rgba(255, 90, 82, 0.18); }
.rule-card .icon.green  { background: rgba(70, 209, 128, 0.18); }

.rule-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 12px;
}

.rule-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rule-card li {
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.6;
  padding-left: 18px;
  position: relative;
  margin-bottom: 8px;
}

.rule-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- Contact form ---------- */

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  padding-bottom: 96px;
}

.contact-info .card { margin-bottom: 16px; }

.contact-info-solo {
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: 96px;
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color .15s;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
}

.field textarea {
  resize: vertical;
  min-height: 140px;
}

.form-status {
  margin-top: 16px;
  font-size: 14px;
  min-height: 20px;
}

.form-status.ok { color: #6EE7B7; }
.form-status.err { color: var(--destructive); }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 40px 0;
}

.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-tertiary);
  font-size: 14px;
  font-weight: 600;
}

.footer-links a:hover { color: var(--text); }

.copyright {
  color: var(--text-tertiary);
  font-size: 13px;
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
