/* ==========================================================================
   Padly — marketing site styles
   Palette: bg #0f1420 · surface #1b2130 · text #ffffff · muted #9aa4b8
            accent #4C8DFF · success #22c55e
   ========================================================================== */

:root {
  --bg: #0f1420;
  --surface: #1b2130;
  --surface-2: #232b3d;
  --text: #ffffff;
  --muted: #9aa4b8;
  --accent: #4C8DFF;
  --accent-soft: rgba(76, 141, 255, 0.14);
  --success: #22c55e;
  --border: rgba(154, 164, 184, 0.16);
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --maxw: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

a { color: var(--accent); }

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 20, 32, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.1rem;
}

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

.site-nav { display: flex; align-items: center; gap: 22px; }

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

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

.site-nav .nav-cta {
  color: #fff;
  background: var(--accent);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
}

.site-nav .nav-cta:hover { background: #3c7df2; color: #fff; }

@media (max-width: 720px) {
  .site-nav a:not(.nav-cta) { display: none; }
}

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

.hero {
  position: relative;
  padding: 72px 0 64px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto;
  height: 120%;
  background:
    radial-gradient(600px 360px at 25% 20%, rgba(76, 141, 255, 0.22), transparent 70%),
    radial-gradient(500px 300px at 80% 10%, rgba(76, 141, 255, 0.12), transparent 70%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero { padding: 48px 0; text-align: center; }
  .hero-copy { display: flex; flex-direction: column; align-items: center; }
}

.hero-logo {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.1rem);
  line-height: 1.15;
  margin: 20px 0 14px;
  letter-spacing: -0.02em;
}

.hero h1 .accent {
  background: linear-gradient(90deg, var(--accent), #7fb0ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .pitch {
  color: var(--muted);
  font-size: 1.125rem;
  max-width: 34em;
  margin: 0 0 28px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.badge-link { display: inline-flex; line-height: 0; border-radius: 10px; }

.badge-link img { height: 60px; width: auto; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 22px;
  height: 60px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.btn svg { flex: none; }

.btn-secondary {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border);
}

.btn-secondary:hover { border-color: var(--accent); background: var(--surface-2); }

.btn-primary { color: #fff; background: var(--accent); }

.btn-primary:hover { background: #3c7df2; }

.hero-meta {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Hero device frame holding a real app screenshot */

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

.phone-frame {
  width: min(280px, 72vw);
  background: linear-gradient(160deg, #161c2b, #10141f);
  border: 1px solid rgba(154, 164, 184, 0.3);
  border-radius: 36px;
  padding: 12px;
  box-shadow: var(--shadow), 0 0 80px rgba(76, 141, 255, 0.12);
}

.phone-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 24px;
  border: 1px solid var(--border);
}

/* Screenshots gallery — each shot framed like a phone */

.shots-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
  max-width: 1020px;
  margin: 0 auto;
}

.shot {
  margin: 0;
  transition: transform 0.2s ease;
}

.shot:hover { transform: translateY(-4px); }

.shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 26px;
  border: 7px solid #222a3c;
  background: #222a3c;
  box-shadow:
    0 0 0 1px rgba(154, 164, 184, 0.35),
    0 12px 30px rgba(0, 0, 0, 0.4),
    0 0 50px rgba(76, 141, 255, 0.07);
}

.shot figcaption {
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
  padding: 14px 0 0;
}

/* On small screens: a swipeable, snap-scrolling row (app-store style) */
@media (max-width: 900px) {
  .shots-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 18px;
    margin: 0 -20px;
    padding: 6px 20px 14px;
  }
  .shot {
    flex: 0 0 min(62vw, 250px);
    scroll-snap-align: center;
  }
  .shot:hover { transform: none; }
}

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

.section { padding: 72px 0; }

.section-alt {
  background: linear-gradient(180deg, rgba(27, 33, 48, 0.55), rgba(27, 33, 48, 0));
}

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

.section-head h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}

.section-head p { color: var(--muted); margin: 0; }

/* How it works */

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

@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  position: relative;
}

.step-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-weight: 700;
  font-size: 0.85rem;
}

.step h3 { margin: 0 0 8px; font-size: 1.1rem; }

.step p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* Features */

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

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

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.feature:hover { transform: translateY(-3px); border-color: rgba(76, 141, 255, 0.45); }

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 14px;
}

.feature h3 { margin: 0 0 6px; font-size: 1.02rem; }

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

/* Download */

.download-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: stretch;
}

@media (max-width: 860px) { .download-grid { grid-template-columns: 1fr; } }

.download-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  display: flex;
  flex-direction: column;
}

.download-card.highlight { border-color: rgba(76, 141, 255, 0.5); box-shadow: 0 0 50px rgba(76, 141, 255, 0.08); }

.download-card h3 {
  margin: 0 0 4px;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.download-card h3 svg { color: var(--accent); flex: none; }

.download-card .card-sub { color: var(--muted); font-size: 0.92rem; margin: 0 0 18px; }

.download-card ol {
  margin: 0 0 22px;
  padding-left: 22px;
  color: var(--muted);
  font-size: 0.95rem;
}

.download-card ol li { margin-bottom: 10px; }

.download-card ol li strong { color: var(--text); font-weight: 600; }

.download-card .card-cta { margin-top: auto; }

.note {
  background: var(--accent-soft);
  border: 1px solid rgba(76, 141, 255, 0.3);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0 0 20px;
}

.note strong { color: var(--text); }

/* Requirements */

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

@media (max-width: 820px) { .req-grid { grid-template-columns: 1fr; } }

.req {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.req h3 { margin: 0 0 6px; font-size: 1rem; display: flex; align-items: center; gap: 9px; }

.req h3 svg { color: var(--success); flex: none; }

.req p { margin: 0; color: var(--muted); font-size: 0.92rem; }

.fineprint {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 22px 4px 0;
}

/* FAQ */

.faq-list { max-width: 760px; margin: 0 auto; }

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 54px 18px 22px;
  font-weight: 600;
  position: relative;
}

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

.faq-item summary::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after { transform: translateY(-30%) rotate(225deg); }

.faq-item .faq-body {
  padding: 0 22px 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

.faq-item .faq-body p { margin: 0 0 8px; }
.faq-item .faq-body p:last-child { margin-bottom: 0; }

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

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

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-brand img { width: 26px; height: 26px; border-radius: 7px; }

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

.footer-links a { color: var(--muted); text-decoration: none; font-size: 0.9rem; }

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

/* ---------- Legal pages (privacy.html / terms.html) ---------- */

.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 20px 72px;
}

.legal h1 { font-size: 2rem; letter-spacing: -0.01em; margin: 0 0 6px; }

.legal .updated { color: var(--muted); font-size: 0.92rem; margin: 0 0 32px; }

.legal h2 {
  font-size: 1.25rem;
  margin: 36px 0 10px;
  padding-top: 8px;
}

.legal p, .legal li { color: #c7cedd; }

.legal ul { padding-left: 22px; }

.legal li { margin-bottom: 8px; }

.legal strong { color: var(--text); }

.back-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.95rem;
  margin-bottom: 28px;
}

.back-home:hover { text-decoration: underline; }

/* ---------- Scroll reveal (disabled when reduced motion is preferred) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.55s ease, transform 0.55s ease;
  }
  .reveal.visible { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
