/* MatchYard — shared styles for the public Privacy / Terms / Support site.
   Dependency-free: no frameworks, no CDNs, no JS. Mobile-first & accessible.
   Dark-first brand (matches the brand sheet); light mode supported below. */

:root {
  /* Brand palette */
  --lime: #c6ff00;           /* primary accent — CTAs, active states */
  --teal: #00e5c3;           /* secondary accent — links, gradient end */
  --gradient: linear-gradient(135deg, #c6ff00, #00e5c3);

  /* Semantic tokens (dark mode — the hero) */
  --brand: var(--lime);      /* primary accent alias */
  --brand-dark: var(--teal); /* link / secondary accent alias */
  --brand-tint: #15351f;     /* muted lime-tinted surface for callouts */
  --ink: #f2f4f7;            /* primary text (off-white on dark) */
  --ink-soft: #9ba6b8;       /* secondary / muted text */
  --line: #2a3445;           /* hairline borders */
  --bg: #0a1120;             /* near-black navy background */
  --bg-alt: #1b2330;         /* elevated surfaces / cards */
  --on-accent: #0a1120;      /* ink-navy text on lime fills */

  --max-width: 760px;
  --radius: 14px;
}

/* Light mode — supported, kept polished. Dark remains the default/hero. */
@media (prefers-color-scheme: light) {
  :root {
    --brand-dark: #00b89b;   /* darker teal for legible links on white */
    --brand-tint: #effff5;   /* very light lime tint */
    --ink: #0a1120;          /* near-black text */
    --ink-soft: #5a6677;     /* secondary text */
    --line: #e2e6ec;         /* hairline borders */
    --bg: #f2f4f7;           /* off-white background */
    --bg-alt: #ffffff;       /* cards / sections */
  }
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, "Helvetica Neue", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Accessible focus ring for keyboard users */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 3px;
}

/* Skip link for screen-reader / keyboard users */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand);
  color: var(--on-accent);
  font-weight: 700;
  padding: 0.6rem 1rem;
  z-index: 100;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus {
  left: 0;
}

/* ---------- Layout container ---------- */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

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

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.25rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand:hover {
  color: var(--brand-dark);
}

/* Inline logo mark: lime→teal gradient rounded square (matches the brand mark) */
.brand .mark {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 0.45rem;
  background: var(--gradient);
  display: inline-block;
  flex: 0 0 auto;
}

/* When the brand uses the actual SVG logo, size it consistently */
.brand .logo-img {
  height: 1.7rem;
  width: auto;
  display: block;
  flex: 0 0 auto;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
}

.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.97rem;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover {
  color: var(--brand-dark);
}

.site-nav a[aria-current="page"] {
  color: var(--brand-dark);
  border-bottom-color: var(--brand);
}

/* ---------- Hero (landing) ---------- */

.hero {
  background: linear-gradient(180deg, var(--bg-alt), var(--bg));
  border-bottom: 1px solid var(--line);
  padding: 3.25rem 0 2.75rem;
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 2.8rem);
  line-height: 1.1;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.hero .tagline {
  font-size: clamp(1.1rem, 3.5vw, 1.35rem);
  font-weight: 600;
  margin: 0 0 1.25rem;
  /* lime→teal gradient text */
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  margin: 0 0 0.75rem;
  color: var(--ink-soft);
  max-width: 60ch;
}

/* ---------- Main content ---------- */

main {
  padding: 2.5rem 0 1rem;
}

.legal main {
  padding-top: 2rem;
}

h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

main h1 {
  font-size: clamp(1.7rem, 5vw, 2.2rem);
  margin: 0 0 0.35rem;
}

h2 {
  font-size: 1.35rem;
  margin: 2.25rem 0 0.6rem;
  padding-top: 0.25rem;
}

h3 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.4rem;
}

p {
  margin: 0 0 1rem;
}

ul,
ol {
  margin: 0 0 1rem;
  padding-left: 1.4rem;
}

li {
  margin: 0.3rem 0;
}

li > ul,
li > ol {
  margin-top: 0.3rem;
  margin-bottom: 0.3rem;
}

a {
  color: var(--brand-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--brand);
}

strong {
  color: var(--ink);
  font-weight: 700;
}

hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 2rem 0;
}

.last-updated {
  color: var(--ink-soft);
  font-style: italic;
  margin-top: 0;
}

.lede {
  font-size: 1.05rem;
  color: var(--ink-soft);
}

/* ---------- Cards / sections (support page) ---------- */

.section {
  margin: 2.5rem 0;
}

.card {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  margin: 1.25rem 0;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-list li {
  margin: 0.5rem 0;
}

.contact-list .label {
  display: inline-block;
  min-width: 7.5rem;
  font-weight: 700;
  color: var(--ink);
}

/* FAQ using native <details> — no JS required */
.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-alt);
  padding: 0.25rem 1.25rem;
  margin: 0.75rem 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
  padding: 0.85rem 0;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

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

.faq summary::after {
  content: "+";
  color: var(--brand-dark);
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1;
  flex: 0 0 auto;
}

.faq details[open] summary::after {
  content: "\2212"; /* minus sign */
}

.faq .answer {
  padding: 0 0 1rem;
  color: var(--ink-soft);
}

.faq .answer p:last-child {
  margin-bottom: 0;
}

/* Call-to-action buttons (link pair on landing) */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0 0;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
  border: 2px solid var(--brand);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--brand);
  color: var(--on-accent);
}

.btn-primary:hover {
  filter: brightness(1.08);
  color: var(--on-accent);
}

.btn-secondary {
  background: transparent;
  color: var(--teal);
  border-color: var(--teal);
}

.btn-secondary:hover {
  background: var(--brand-tint);
  color: var(--teal);
}

/* Safety callout */
.callout {
  border-left: 4px solid var(--brand);
  background: var(--brand-tint);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
}

.callout p:last-child {
  margin-bottom: 0;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
  margin-top: 3rem;
  padding: 2rem 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.site-footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 0 0 0.75rem;
}

.site-footer a {
  color: var(--ink-soft);
  font-weight: 600;
}

.site-footer a:hover {
  color: var(--brand-dark);
}

.site-footer .copyright {
  margin: 0;
}

/* ---------- App Store button ---------- */

.btn-appstore {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1.35rem;
  background: #000;
  color: #fff;
  border: 2px solid #000;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 700;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-appstore:hover {
  background: #222;
  border-color: #222;
  color: #fff;
}

.btn-appstore .appstore-icon {
  flex: 0 0 auto;
}

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

.btn-appstore .appstore-text small {
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* ---------- Features section ---------- */

.features {
  padding: 3rem 0 2.5rem;
  background: var(--bg);
}

.section-title {
  text-align: center;
  font-size: clamp(1.4rem, 4vw, 1.75rem);
  margin: 0 0 2rem;
  letter-spacing: -0.01em;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.feature-card {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}

.feature-icon {
  display: block;
  font-size: 2.2rem;
  margin-bottom: 0.75rem;
  line-height: 1;
}

.feature-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
}

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

/* ---------- App preview placeholder ---------- */

.app-preview {
  padding: 2.5rem 0 2rem;
  background: var(--bg);
}

.preview-placeholder {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 3rem 1.5rem;
  text-align: center;
  background: var(--bg-alt);
}

.preview-icon {
  display: block;
  font-size: 3rem;
  margin-bottom: 0.75rem;
  line-height: 1;
  opacity: 0.7;
}

.preview-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 0.35rem;
}

.preview-note {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin: 0;
  max-width: 42ch;
  margin-left: auto;
  margin-right: auto;
}

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

@media (min-width: 520px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .features .container,
  .app-preview .container {
    max-width: 960px;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 16px;
  }
  .site-header .container {
    flex-direction: column;
    align-items: flex-start;
  }
  .contact-list .label {
    min-width: 0;
    display: block;
  }
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .btn,
  .btn-appstore {
    transition: none;
  }
}
