/* ==========================================================================
   Swibid — Landing page styles
   Brand color is taken from the Flutter app (lib/cors/constants/appcolors.dart)
   ========================================================================== */

:root {
  --brand: #b32f94;
  --brand-dark: #8e2478;
  --brand-soft: rgba(179, 47, 148, 0.08);
  --ink: #1b1e2c;
  --muted: #5c6467;
  --line: #e9e6ef;
  --bg: #ffffff;
  --bg-alt: #faf8fc;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(27, 30, 44, 0.08);
  --container: 1120px;
  --header-h: 68px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  line-height: 1.2;
  margin: 0 0 0.5em;
  letter-spacing: -0.02em;
  font-weight: 800;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.35rem); }
h3 { font-size: 1.1rem; }

p { margin: 0 0 1em; }

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

.section { padding: 80px 0; }

.eyebrow {
  display: inline-block;
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
}

.accent { color: var(--brand); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 20px rgba(179, 47, 148, 0.28);
}

.btn-primary:hover { background: var(--brand-dark); transform: translateY(-2px); }
.btn:focus-visible,
.store-btn:focus-visible,
.site-nav a:focus-visible,
.footer-nav a:focus-visible,
.nav-toggle:focus-visible {
  outline: 3px solid rgba(179, 47, 148, 0.45);
  outline-offset: 3px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-header.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 20px rgba(27, 30, 44, 0.06);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand img { border-radius: 10px; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}

.site-nav a,
.footer-nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--muted);
  transition: color 0.2s ease;
}

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

.header-cta { padding: 10px 20px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 10px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1000px 480px at 85% -10%, rgba(179, 47, 148, 0.14), transparent 60%),
    radial-gradient(800px 420px at -10% 110%, rgba(179, 47, 148, 0.10), transparent 60%),
    var(--bg-alt);
  padding: 72px 0 88px;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 48px;
  align-items: center;
}

.hero-media { display: flex; justify-content: center; }

.hero-logo {
  width: min(300px, 70vw);
  height: auto;
  border-radius: 32px;
  box-shadow: 0 24px 60px rgba(179, 47, 148, 0.25);
}

.hero-content h1 { margin-bottom: 0.4em; }

.lead {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--muted);
  max-width: 56ch;
}

/* ---------- Store buttons ---------- */
.store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  border: 1px solid var(--ink);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.store-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(27, 30, 44, 0.22);
}

.store-btn svg { width: 26px; height: 26px; fill: currentColor; flex: none; }

.store-btn-text { display: flex; flex-direction: column; line-height: 1.15; }
.store-btn-text small { font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.8; }
.store-btn-text strong { font-size: 1.02rem; font-weight: 700; }

.store-btn-light { background: #fff; color: var(--ink); border-color: rgba(255, 255, 255, 0.6); }
.store-btn-light:hover { background: #fff; box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18); }

.store-buttons-center { justify-content: center; }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.88rem;
  color: var(--muted);
}

.hero-meta li { position: relative; padding-left: 18px; }
.hero-meta li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
}

/* ---------- Section head ---------- */
.section-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.section-sub { color: var(--muted); margin: 0; }

/* ---------- Features ---------- */
.features { background: var(--bg); }

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

.feature-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(179, 47, 148, 0.35);
  box-shadow: var(--shadow);
}

.feature-card p { margin: 0; color: var(--muted); font-size: 0.94rem; }

.feature-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 12px;
  background: var(--brand-soft);
}

.feature-icon svg { width: 24px; height: 24px; fill: var(--brand); }

/* ---------- About ---------- */
.about { background: var(--bg-alt); }

.about-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 56px;
  align-items: center;
}

.about-media { display: flex; justify-content: center; }

.about-media img {
  width: min(240px, 60vw);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.about-content p { color: var(--muted); }

.about-list {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.about-list li {
  position: relative;
  padding-left: 30px;
  font-weight: 600;
  font-size: 0.95rem;
}

.about-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 0.72rem;
  display: grid;
  place-items: center;
}

/* ---------- Download ---------- */
.download { background: var(--bg); }

.download-inner {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 56px 32px;
  border-radius: 24px;
  background:
    radial-gradient(700px 320px at 20% 0%, rgba(255, 255, 255, 0.16), transparent 60%),
    linear-gradient(135deg, var(--brand) 0%, #6f1f7d 55%, #43144f 100%);
  color: #fff;
  box-shadow: 0 24px 60px rgba(179, 47, 148, 0.28);
}

.download-inner h2 { color: #fff; }
.download-inner p { color: rgba(255, 255, 255, 0.86); max-width: 52ch; margin-inline: auto; }

.download-logo {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  margin: 0 auto 20px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

/* ---------- Meet the Developer ---------- */
.developer { background: var(--bg-alt); }

.dev-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  max-width: 860px;
  margin-inline: auto;
  padding: 52px 56px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.dev-avatar {
  width: 116px;
  height: 116px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand) 0%, #6f1f7d 100%);
  color: #fff;
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 16px 34px rgba(179, 47, 148, 0.28);
  flex: none;
}

.dev-name {
  font-size: clamp(1.7rem, 3.2vw, 2.3rem);
  margin-bottom: 0.25em;
}

.dev-title {
  margin: 0 0 18px;
  font-weight: 600;
  font-size: 1rem;
  color: var(--brand);
  letter-spacing: 0.01em;
}

.dev-title span { margin-inline: 6px; opacity: 0.5; }

.dev-bio {
  color: var(--muted);
  max-width: 62ch;
  margin-bottom: 26px;
}

.dev-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
}

.dev-btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 20px rgba(179, 47, 148, 0.26);
}

.dev-btn-primary:hover { background: var(--brand-dark); transform: translateY(-2px); }

.dev-btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.dev-btn-outline:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(27, 30, 44, 0.1);
}

.dev-actions svg { width: 19px; height: 19px; fill: currentColor; flex: none; }

.dev-email { margin: 0; font-size: 0.94rem; color: var(--muted); }

.dev-email a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color 0.2s ease;
}

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

/* ---------- Footer ---------- */
.site-footer {
  background: #14161f;
  color: rgba(255, 255, 255, 0.72);
  padding: 40px 0;
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
}

.footer-brand img { border-radius: 8px; }

.footer-nav { display: flex; gap: 24px; margin-left: auto; }
.footer-nav a { color: rgba(255, 255, 255, 0.72); font-size: 0.9rem; }
.footer-nav a:hover { color: #fff; }

.footer-copy { margin: 0; width: 100%; text-align: center; color: rgba(255, 255, 255, 0.55); }

/* ---------- Reveal animation ----------
   Only hidden when JS is available (html.js), so the content stays
   visible for crawlers and no-JS visitors. */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-media { order: -1; }
  .lead { margin-inline: auto; }
  .store-buttons, .hero-meta { justify-content: center; }
  .about-inner { grid-template-columns: 1fr; text-align: center; gap: 32px; }
  .about-content p, .about-list { text-align: left; }
  .about-list { max-width: 520px; margin-inline: auto; }
  .dev-card { padding: 44px 36px; gap: 28px; }
}

@media (max-width: 720px) {
  .section { padding: 60px 0; }
  .hero { padding: 48px 0 64px; }

  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 8px 24px 20px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 30px rgba(27, 30, 44, 0.10);
    display: none;
  }

  .site-nav.open { display: flex; }
  .site-nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .site-nav a:last-child { border-bottom: 0; }

  .header-cta { display: none; }
  .nav-toggle { display: flex; }

  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .feature-grid { grid-template-columns: 1fr; }
  .store-buttons { justify-content: center; }
  .download-inner { padding: 44px 20px; }

  /* Developer section stacks on small screens */
  .dev-card {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 36px 22px;
    gap: 20px;
  }
  .dev-avatar { margin-inline: auto; width: 92px; height: 92px; font-size: 1.9rem; }
  .dev-bio { margin-inline: auto; text-align: left; }
  .dev-actions { justify-content: center; }
  .footer-inner { justify-content: center; text-align: center; }
  .footer-nav { margin-left: 0; }
}

@media (max-width: 400px) {
  .store-btn { width: 100%; justify-content: center; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
