/* BeRemarkable Foundation — Preview Stylesheet */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  /* Brand palette — pulled from live beremarkable.org */
  --purple: #510F94;          /* primary brand color */
  --purple-light: #6314B3;    /* gradient/overlay companion */
  --purple-dark: #3A0A6B;     /* deeper for hover/depth */
  --blue: #1194F2;            /* secondary brand color */
  --blue-dark: #0B6FBA;       /* hover for blue */
  --yellow: #FCD40D;          /* pop accent */
  --pink: #ED1566;            /* stroke/border accent */

  /* Aliases — keeps existing rule names working */
  --accent: #1194F2;
  --accent-dark: #0B6FBA;

  --black: #0E0E0E;
  --white: #FFFFFF;
  --gray-50: #FAFAFA;
  --gray-100: #F1F1F1;
  --gray-200: #E5E5E5;
  --gray-500: #8A8A8A;
  --gray-700: #4A4A4A;
  --max: 1200px;
  --radius: 4px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--black);
  background: var(--white);
  line-height: 1.6;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ============ TOP NAV ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-200);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
}
.logo .be { color: var(--purple); }
.logo .remarkable { color: var(--black); }
.logo img {
  height: 56px;
  width: auto;
  display: block;
}
.footer .logo img {
  height: 48px;
}
@media (max-width: 600px) {
  .logo img { height: 44px; }
  .footer .logo img { height: 40px; }
}
.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}
.nav-links a {
  font-weight: 500;
  font-size: 15px;
  color: var(--gray-700);
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--black); }
.nav-links a.active { color: var(--black); font-weight: 600; }

/* Hamburger toggle (mobile) — pure-CSS, no JS */
.nav-toggle { display: none; }
.nav-burger { display: none; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 0.15s;
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--purple);
  color: var(--white);
}
.btn-primary:hover { background: var(--purple-dark); }
.btn-accent {
  background: var(--blue);
  color: var(--white);
}
.btn-accent:hover { background: var(--blue-dark); }
.btn-outline {
  background: transparent;
  color: var(--black);
  border: 2px solid var(--black);
  padding: 12px 26px;
}
.btn-outline:hover { background: var(--black); color: var(--white); }
.btn-outline-light {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
  padding: 12px 26px;
}
.btn-outline-light:hover { background: var(--white); color: var(--black); }

/* ============ HERO ============ */
.hero {
  padding: 120px 32px 100px;
  text-align: center;
  background: var(--white);
  min-height: 560px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
}
.hero-dark {
  background: linear-gradient(135deg, #0E0E0E 0%, #2A0855 60%, #510F94 100%);
  color: var(--white);
}
.hero-accent {
  background: linear-gradient(135deg, #1194F2 0%, #510F94 100%);
  color: var(--white);
}
.hero h1 {
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.0;
  margin-bottom: 28px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.hero p.subhead {
  font-size: clamp(18px, 2vw, 22px);
  max-width: 720px;
  margin: 0 auto 40px;
  color: var(--gray-700);
  line-height: 1.5;
}
.hero-dark p.subhead, .hero-accent p.subhead { color: rgba(255,255,255,0.85); }
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ============ SECTIONS ============ */
.section {
  padding: 100px 32px;
  border-bottom: 1px solid var(--gray-100);
}
.section-dark { background: var(--black); color: var(--white); border-color: var(--gray-700); }
.section-gray { background: var(--gray-50); }
.section-inner {
  max-width: var(--max);
  margin: 0 auto;
}
.section h2 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 32px;
}
.section h2.centered { text-align: center; max-width: 800px; margin-left: auto; margin-right: auto; }
.section .body {
  font-size: 20px;
  max-width: 760px;
  color: var(--gray-700);
  line-height: 1.6;
}
.section-dark .body { color: rgba(255,255,255,0.8); }
.section .body.centered { text-align: center; margin: 0 auto; }
.section .body p { margin-bottom: 20px; }
.section .body p:last-child { margin-bottom: 0; }
.section .body strong { color: var(--black); font-weight: 700; }
.section-dark .body strong { color: var(--white); }

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

/* ============ CARDS ============ */
.cards {
  display: grid;
  gap: 24px;
  margin-top: 48px;
}
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-2 { grid-template-columns: repeat(2, 1fr); }
.cards-4 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--white);
  padding: 40px 32px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  transition: all 0.15s;
}
.card:hover { border-color: var(--purple); transform: translateY(-2px); }
.section-gray .card { background: var(--white); }
.section-dark .card {
  background: #1A1A1A;
  border-color: #2A2A2A;
  color: var(--white);
}
.card h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}
.card p {
  font-size: 17px;
  color: var(--gray-700);
  line-height: 1.6;
}
.section-dark .card p { color: rgba(255,255,255,0.7); }

/* Stat cards */
.stat-card {
  text-align: center;
  padding: 60px 32px;
}
.stat-card .num {
  font-size: clamp(56px, 7vw, 88px);
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 16px;
}
.stat-card .label {
  font-size: 17px;
  color: var(--gray-700);
}

/* Step cards (1, 2, 3) */
.step .num-small {
  font-size: 14px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

/* Activation card with image placeholder */
.activation-card {
  padding: 0;
  overflow: hidden;
}
.activation-card .img-placeholder {
  width: 100%;
  height: 240px;
  background: linear-gradient(135deg, #510F94 0%, #1194F2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.5);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.activation-card .img-placeholder.mistory {
  background: linear-gradient(135deg, #3A0A6B 0%, #ED1566 100%);
}
.activation-card .img-placeholder.andi {
  background: linear-gradient(135deg, #510F94 0%, #FCD40D 100%);
}
.activation-card .activation-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
}
.activation-card .card-content { padding: 32px; }
.activation-card .meta {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

/* ============ SPLIT (image + text) ============ */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.split-image {
  height: 480px;
  background: linear-gradient(135deg, #1194F2 0%, #510F94 100%);
  border-radius: var(--radius);
}
.split-image.andi {
  background: linear-gradient(135deg, #510F94 0%, #ED1566 50%, #FCD40D 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  overflow: hidden;
}
.split-image.andi img {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: center bottom;
  display: block;
  filter: drop-shadow(0 18px 28px rgba(14, 14, 14, 0.3));
}
.split-img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
  box-shadow: 0 20px 60px rgba(14, 14, 14, 0.18);
}
@media (max-width: 900px) {
  .split-img { height: 280px; }
}

/* Inline autoplay video in split layouts (e.g. MIstory) — matches native 4:5 portrait */
.video-frame {
  position: relative;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  background: #0E0E0E;
  cursor: pointer;
  margin: 0 auto;
  box-shadow: 0 20px 60px rgba(14, 14, 14, 0.18);
}
.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.video-expand {
  position: absolute;
  bottom: 16px;
  left: 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(14, 14, 14, 0.78);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  pointer-events: none; /* parent frame handles the click */
}
.video-frame:hover .video-expand {
  background: var(--purple);
  transform: translateY(-1px);
}
.video-expand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--white);
  color: var(--purple);
  font-size: 10px;
  line-height: 1;
}

/* Centered modal player — opens on click of inline .video-frame */
.video-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.video-modal.open { display: flex; }
.video-modal-inner {
  position: relative;
  width: 100%;
  max-width: 560px;
  aspect-ratio: 4 / 5;
  max-height: 88vh;
}
.video-modal-inner video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  border-radius: 8px;
  display: block;
}
.video-modal-close {
  position: absolute;
  top: -48px;
  right: 0;
  width: 36px;
  height: 36px;
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}
.video-modal-close:hover {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}
@media (max-width: 600px) {
  .video-modal-close { top: -42px; }
}

/* ============ FORM ============ */
.form-block {
  max-width: 640px;
  margin: 48px auto 0;
}
.form-row {
  margin-bottom: 20px;
}
.form-row label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--gray-700);
}
.section-dark .form-row label,
.cta-banner .form-row label,
.hero-dark .form-row label,
.hero-accent .form-row label {
  color: rgba(255, 255, 255, 0.85);
}
.form-row input, .form-row textarea, .form-row select {
  width: 100%;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 16px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--white);
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
  outline: none;
  border-color: var(--accent);
}
.form-row textarea { min-height: 120px; resize: vertical; }

/* ============ FOOTER ============ */
.footer {
  background: var(--black);
  color: var(--white);
  padding: 80px 32px 40px;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid #2A2A2A;
}
.footer h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}
.footer p, .footer a {
  font-size: 15px;
  color: rgba(255,255,255,0.7);
  line-height: 1.8;
  display: block;
}
.footer a:hover { color: var(--white); }
.footer .footer-newsletter input {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 15px;
  border: 1px solid #2A2A2A;
  background: #1A1A1A;
  color: var(--white);
  border-radius: var(--radius);
  margin-bottom: 12px;
}
.footer-bottom {
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}
.footer .social {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}
.footer .social a {
  width: 36px;
  height: 36px;
  background: #1A1A1A;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}
.footer .social a:hover { background: var(--accent); color: var(--white); }

/* ============ CTA BANNER ============ */
.cta-banner {
  background: linear-gradient(135deg, #0E0E0E 0%, #510F94 100%);
  color: var(--white);
  padding: 100px 32px;
  text-align: center;
}
.cta-banner h2 {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 800;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}
.cta-banner p {
  font-size: 20px;
  color: rgba(255,255,255,0.8);
  max-width: 600px;
  margin: 0 auto 40px;
}
.cta-banner .btn-primary {
  background: var(--blue);
}
.cta-banner .btn-primary:hover {
  background: var(--white);
  color: var(--purple);
}

/* ============ UTILS ============ */
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.text-center { text-align: center; }
.giving-levels {
  list-style: none;
  margin: 24px 0 32px;
}
.giving-levels li {
  padding: 16px 0;
  border-bottom: 1px solid var(--gray-200);
  font-size: 18px;
  display: flex;
  gap: 24px;
}
.giving-levels .amount {
  font-weight: 800;
  color: var(--accent);
  min-width: 100px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  margin-top: 48px;
}
.contact-grid h4 {
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 16px;
}

.notice {
  font-size: 14px;
  color: var(--gray-500);
  font-style: italic;
  margin-top: 24px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .cards-3, .cards-2, .cards-4 { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split-image { height: 280px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .section { padding: 60px 24px; }
  .hero { padding: 80px 24px 60px; }

  /* Mobile nav: hamburger reveals a full-width dropdown */
  .nav-burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 11px 10px;
    margin: -10px;
    cursor: pointer;
    z-index: 101;
  }
  .nav-burger span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--black);
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.15s ease;
  }
  .nav-toggle:checked ~ .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 8px 0 16px;
    box-shadow: 0 16px 28px rgba(14, 14, 14, 0.14);
  }
  .nav-toggle:checked ~ .nav-links { display: flex; }
  .nav-links a {
    padding: 15px 24px;
    font-size: 17px;
    border-bottom: 1px solid var(--gray-100);
  }
  .nav-links a:last-child { border-bottom: none; }
  .nav-links a.btn-accent {
    margin: 14px 24px 0;
    text-align: center;
    border-bottom: none;
  }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  body { font-size: 16px; }
}


/* ============ DONATE POPUP MODAL ============ */
.donate-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  background: rgba(14, 14, 14, 0.72);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  padding: 32px 16px;
  overflow-y: auto;
}
.donate-modal.open { display: flex; }
.donate-modal-box {
  position: relative;
  background: var(--white);
  width: 100%;
  max-width: 600px;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  margin: auto;
}
.donate-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--gray-200);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  color: var(--black);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.donate-modal-close:hover { background: var(--gray-100); }
.donate-modal iframe {
  width: 100%;
  height: 82vh;
  border: 0;
  display: block;
}
@media (max-width: 600px) {
  .donate-modal { padding: 0; }
  .donate-modal-box { border-radius: 0; min-height: 100%; max-width: 100%; }
  .donate-modal iframe { height: 100vh; }
}
