/* ==========================================================================
   Maplet Landing Page — styles.css
   Clean, minimalist Apple/iOS-inspired marketing site.
   ========================================================================== */

:root {
  --bg: #F5F5F7;
  --surface: #FFFFFF;
  --text: #1D1D1F;
  --text-secondary: #6E6E73;
  --text-tertiary: #9A9A9E;

  --accent: #FF6B35;
  --accent-dark: #E85A2A;
  --accent-soft: rgba(255, 107, 53, 0.12);
  --accent-2: #0A84FF;

  --border: rgba(0, 0, 0, 0.08);
  --radius: 20px;
  --radius-sm: 12px;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.10);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.16);

  --header-h: 64px;
  --max-width: 1160px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

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

a { color: inherit; }

h1, h2, h3, h4 { margin: 0; letter-spacing: -0.02em; }

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

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 10px;
}

/* Scroll-reveal animation base state (activated via JS adding .is-visible) */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  padding: 13px 22px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

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

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

.btn-primary:hover { filter: brightness(1.05); box-shadow: var(--shadow-md); }

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

.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-light {
  background: #fff;
  color: var(--accent-dark);
  box-shadow: var(--shadow-sm);
}

.btn-light:hover { filter: brightness(1.03); }

.btn-sm { padding: 9px 16px; font-size: 14px; }

.btn-appstore {
  background: #000;
  color: #fff;
  padding: 11px 20px;
}

.btn-appstore:hover { filter: brightness(1.2); }

.appstore-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  font-size: 16px;
  font-weight: 600;
}

.appstore-text small {
  font-size: 10.5px;
  font-weight: 400;
  opacity: 0.85;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(245, 245, 247, 0.7);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.brand-mark { width: 26px; height: 26px; flex-shrink: 0; }
.brand-mark svg { width: 100%; height: 100%; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14.5px;
  font-weight: 500;
}

.main-nav a {
  text-decoration: none;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

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

.main-nav a[aria-current="page"] { font-weight: 600; }

.btn:focus-visible,
.main-nav a:focus-visible,
.nav-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 34px;
  height: 34px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  margin: 0 auto;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

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

.hero {
  position: relative;
  padding: 84px 0 96px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -220px;
  left: 50%;
  width: 900px;
  height: 700px;
  transform: translateX(-50%);
  background: radial-gradient(circle at 50% 30%, var(--accent-soft), transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-copy h1 {
  font-size: 52px;
  line-height: 1.08;
  font-weight: 800;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 0 32px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.hero-trust {
  font-size: 13px;
  color: var(--text-tertiary);
  margin: 0;
}

.hero-visual-card {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--surface);
}

.hero-visual-card img {
  width: 100%;
  height: auto;
}

/* ---------------------------------------------------------------------- */
/* Feature grid                                                            */
/* ---------------------------------------------------------------------- */

.features { padding: 40px 0 100px; }

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

.section-heading h2 {
  font-size: 34px;
  font-weight: 800;
}

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

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--icon-tint) 14%, transparent);
  color: var(--icon-tint);
  margin-bottom: 18px;
}

.feature-icon svg { width: 24px; height: 24px; }

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

.feature-card p {
  font-size: 14.5px;
  color: var(--text-secondary);
  margin: 0;
}

/* ---------------------------------------------------------------------- */
/* Alternating showcase rows                                                */
/* ---------------------------------------------------------------------- */

.showcase { padding: 20px 0 100px; }

.showcase-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 56px 0;
}

.showcase-row + .showcase-row {
  border-top: 1px solid var(--border);
}

.showcase-row.reverse .showcase-copy { order: 2; }
.showcase-row.reverse .showcase-media { order: 1; }

.showcase-copy h2 {
  font-size: 30px;
  font-weight: 800;
  margin-bottom: 14px;
}

.showcase-copy p {
  font-size: 15.5px;
  color: var(--text-secondary);
  margin: 0 0 18px;
}

.checklist {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checklist li {
  position: relative;
  padding-left: 26px;
  font-size: 14.5px;
  color: var(--text);
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FF6B35' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 11px;
}

.showcase-media {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

/* ---------------------------------------------------------------------- */
/* Universal link showcase                                                  */
/* ---------------------------------------------------------------------- */

.share-showcase {
  background: var(--surface);
  padding: 90px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.share-showcase-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.share-copy h2 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 16px;
}

.share-copy > p {
  font-size: 15.5px;
  color: var(--text-secondary);
  margin: 0 0 20px;
}

.share-media-frame {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: #111;
}

/* ---------------------------------------------------------------------- */
/* Closing CTA band                                                         */
/* ---------------------------------------------------------------------- */

.cta-band {
  padding: 80px 24px;
}

.cta-inner {
  max-width: 720px;
  text-align: center;
  padding: 64px 40px;
  border-radius: 28px;
  background: linear-gradient(160deg, #FF7A45 0%, var(--accent-dark) 100%);
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.cta-inner h2 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 10px;
}

.cta-inner p {
  font-size: 16px;
  opacity: 0.92;
  margin: 0 0 28px;
}

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

.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding-top: 56px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
  padding-bottom: 40px;
}

.footer-brand {
  max-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-brand p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

.footer-brand .btn-appstore {
  align-self: flex-start;
}

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

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}

.footer-col a {
  font-size: 14.5px;
  text-decoration: none;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 20px 24px 28px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-tertiary);
  flex-wrap: wrap;
}

.footer-bottom p { margin: 0; }

.footer-credit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-credit img {
  border-radius: 4px;
}

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

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

@media (max-width: 860px) {
  .hero-inner,
  .showcase-row,
  .showcase-row.reverse,
  .share-showcase-inner {
    grid-template-columns: 1fr;
  }
  .showcase-row.reverse .showcase-copy,
  .showcase-row.reverse .showcase-media { order: initial; }
  .hero-copy h1 { font-size: 40px; }
  .hero-sub { max-width: none; }
}

@media (max-width: 720px) {
  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 24px 20px;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }

  .main-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .main-nav a { padding: 10px 0; width: 100%; }

  .nav-toggle { display: flex; }
  .header-actions .btn-primary.btn-sm { display: none; }

  .feature-grid { grid-template-columns: 1fr; }

  .hero { padding: 48px 0 64px; }
  .hero-copy h1 { font-size: 34px; }

  .section-heading h2 { font-size: 27px; }
  .showcase-copy h2, .share-copy h2 { font-size: 25px; }

  .cta-inner { padding: 48px 24px; }
  .cta-inner h2 { font-size: 26px; }

  .footer-inner { flex-direction: column; gap: 32px; }
  .footer-links { gap: 32px; }
}

@media (max-width: 420px) {
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { width: 100%; }
}

/* ---------------------------------------------------------------------- */
/* Legal / support document pages                                           */
/* ---------------------------------------------------------------------- */

.doc-hero {
  padding: 56px 0 28px;
}

.doc-hero h1 {
  font-size: 40px;
  font-weight: 800;
  margin-bottom: 10px;
}

.doc-hero p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 16px;
  max-width: 640px;
}

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

.doc-toc {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  max-height: calc(100vh - var(--header-h) - 40px);
  overflow-y: auto;
}

.doc-toc h2 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-bottom: 10px;
}

.doc-toc a {
  display: block;
  font-size: 13.5px;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 8px;
  line-height: 1.35;
}

.doc-toc a:hover,
.doc-toc a[aria-current="true"] {
  color: var(--text);
  background: var(--accent-soft);
}

.prose {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 44px 56px;
  min-width: 0;
}

.prose h2 {
  font-size: 24px;
  font-weight: 800;
  margin: 40px 0 14px;
  padding-top: 8px;
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.prose h2:first-child { margin-top: 0; }

.prose h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 28px 0 10px;
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.prose p,
.prose li {
  font-size: 15.5px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.prose p { margin: 0 0 14px; }

.prose ul, .prose ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

.prose li { margin-bottom: 6px; }

.prose li strong,
.prose p strong {
  color: var(--text);
  font-weight: 600;
}

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

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 20px;
  font-size: 14.5px;
}

.prose th,
.prose td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--text-secondary);
}

.prose th {
  color: var(--text);
  font-weight: 600;
  background: var(--bg);
}

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--bg);
  padding: 1px 6px;
  border-radius: 6px;
  color: var(--text);
}

.callout {
  background: var(--accent-soft);
  border: 1px solid rgba(255, 107, 53, 0.22);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin: 8px 0 20px;
}

.callout p { margin: 0; color: var(--text); }

.callout p + p { margin-top: 8px; }

.faq dt {
  font-weight: 700;
  color: var(--text);
  margin-top: 18px;
  font-size: 15.5px;
}

.faq dd {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 15.5px;
  line-height: 1.65;
}

@media (max-width: 860px) {
  .doc-layout { grid-template-columns: 1fr; }
  .doc-toc {
    position: static;
    max-height: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 12px;
  }
  .doc-toc h2 { grid-column: 1 / -1; }
  .prose { padding: 28px 22px 40px; }
  .doc-hero h1 { font-size: 32px; }
}

@media (max-width: 520px) {
  .doc-toc { grid-template-columns: 1fr; }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}
