/* Shared styles for grupy.dk. Deliberately dependency-free — no fonts,
   frameworks or trackers to load, so every page works offline-ish and
   stays fast on a phone.

   Theme is time-of-day, not OS preference: an inline script in <head> sets
   data-theme="light"|"dark" on <html> based on the visitor's local clock
   (see theme.js) before first paint. :root is the light baseline; dark
   overrides everything through the same custom properties. */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/Montserrat-Regular.woff2") format("woff2");
}

:root {
  --bg: #f2f2f7;
  --card: #ffffff;
  --text: #1c1c1e;
  --muted: #6c6c70;
  --line: rgba(0, 0, 0, .08);
  --ink: #1c1c1e;
  --on-ink: #ffffff;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06);
  /* Hover surface for anything resting on --card (white here, so hovering
     one step toward --bg reads as a subtle press). Dark mode redefines
     this to a step *lighter* than --card instead — --bg is pure black
     there, so the same "toward --bg" move would darken a hover, backwards
     from every other control on the page. */
  --hover-surface: var(--bg);

  --accent-blue: #2AA4FB;
  --accent-purple: #B85CF0;
  --accent-teal: #178C87;
  --accent-orange: #FD7D08;
  --accent-pink: #FC4F98;
}
:root[data-theme="dark"] {
  --bg: #000000;
  --card: #1c1c1e;
  --text: #f2f2f7;
  --muted: #98989d;
  --line: rgba(255, 255, 255, .12);
  --ink: #f2f2f7;
  --on-ink: #1c1c1e;
  --shadow: 0 1px 2px rgba(0,0,0,.5), 0 8px 32px rgba(0,0,0,.5);
  --hover-surface: #2c2c2e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background-color .4s ease, color .4s ease;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}
.wrap-wide { max-width: 1080px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.dot {
  width: 84px; height: 84px;
  border-radius: 20px;
  display: block;
}
.brand-title {
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 400;
  font-size: 42px;
  letter-spacing: -.01em;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.header-controls {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
@media (max-width: 560px) {
  .dot { width: 56px; height: 56px; border-radius: 14px; }
  .brand { gap: 6px; }
  .brand-title { font-size: 32px; }
}

.platform-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
}
.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.platform-badge svg { flex-shrink: 0; }
.platform-badge-blue svg { color: var(--accent-blue); }
.platform-badge-teal svg { color: var(--accent-teal); }
.platform-badge-purple svg { color: var(--accent-purple); }

h1 {
  font-size: clamp(30px, 6vw, 40px);
  line-height: 1.15;
  letter-spacing: -.02em;
  margin: 40px 0 16px;
}
h2 {
  font-size: 20px;
  letter-spacing: -.01em;
  margin: 36px 0 10px;
}
p { margin: 0 0 16px; }
.lead { font-size: 19px; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 15px; }

a { color: inherit; text-underline-offset: 3px; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 8px;
}
.btn {
  display: inline-block;
  padding: 13px 22px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: background-color .18s ease, opacity .18s ease;
}
.btn-primary { background: var(--ink); color: var(--on-ink); }
.btn-primary:hover { opacity: .85; }
.btn-secondary { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-secondary:hover { background: var(--card); }

/* Shown instead of the "Opret en gruppe"/"Log ind" actions when a
   `grupy_profile` cookie (set by app.grupy.dk on sign-in — see
   AuthContext.tsx) says this visitor already has an account. */
.hero-profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 28px 0 8px;
  padding: 12px 18px 12px 12px;
  background: var(--card);
  border-radius: 999px;
  box-shadow: var(--shadow);
  max-width: fit-content;
}
.hero-profile-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.hero-profile-avatar-fallback {
  display: grid; place-items: center;
  background: var(--accent-blue);
  color: #fff;
  font-weight: 700;
  font-size: 17px;
}
.hero-profile-text { line-height: 1.3; }
.hero-profile-greeting { margin: 0; font-size: 13px; color: var(--muted); }
.hero-profile-name { margin: 0; font-weight: 700; font-size: 16px; }
.hero-profile-card .btn { padding: 10px 18px; font-size: 15px; margin-left: 4px; }

.card {
  background: var(--card);
  border-radius: 20px;
  padding: 28px 26px;
  margin: 28px 0;
  border: 1px solid var(--line);
}

/* Pricing — the free tier is the whole point (most groups never need
   more than 30 members), so it gets the full-width hero card; the paid
   tiers are a compact, secondary row underneath rather than four
   equal-weight cards competing for attention. */
.pricing-free {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 36px;
  margin: 28px 0 20px;
}
@media (max-width: 640px) {
  .pricing-free { grid-template-columns: 1fr; text-align: left; }
}
.pricing-free-price {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -.02em;
  white-space: nowrap;
}
.pricing-free-price span { font-size: 17px; font-weight: 600; color: var(--muted); }
.pricing-free-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 20px;
}
@media (max-width: 500px) {
  .pricing-free-list { grid-template-columns: 1fr; }
}
.pricing-free-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: var(--text);
}
.pricing-free-list svg { flex: none; color: var(--accent-teal); }
.pricing-tiers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 0 0 8px;
}
@media (max-width: 760px) {
  .pricing-tiers { grid-template-columns: repeat(2, 1fr); }
}
.pricing-tier {
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
}
.pricing-tier-name { font-size: 14px; font-weight: 700; margin: 0 0 4px; }
.pricing-tier-price { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.pricing-tier-price span { font-size: 13px; font-weight: 500; color: var(--muted); }
.pricing-tier-meta { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.pricing-note { margin: 14px 0 0; font-size: 14px; color: var(--muted); }

/* Centred single-message pages (the Stripe hand-off screens). */
.center {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.center .card {
  max-width: 420px;
  width: 100%;
  text-align: center;
  margin: 0;
}
.lang-switch { position: relative; display: inline-block; }
.lang-trigger {
  display: inline-flex; align-items: center; gap: 7px;
  background: transparent; border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 12px 6px 10px; font: inherit; font-size: 15px; color: inherit; cursor: pointer;
  transition: background-color .18s ease;
}
.lang-trigger:hover { background: var(--card); }
.lang-trigger .lang-flag { font-size: 16px; line-height: 1; }
.lang-trigger .lang-chevron { opacity: .55; margin-left: 2px; }
.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 6px; margin: 0; list-style: none; min-width: 160px;
  box-shadow: var(--shadow); z-index: 20;
}
.lang-menu[hidden] { display: none; }
.lang-menu li a {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 10px; border-radius: 8px; text-decoration: none; color: inherit; font-size: 15px;
}
.lang-menu li a { transition: background-color .18s ease; }
.lang-menu li a:hover { background: var(--hover-surface); }
.lang-menu li a[aria-current="true"] { font-weight: 700; }
.lang-menu .lang-flag { font-size: 16px; line-height: 1; }

/* Same pill language as `.lang-trigger` — the time-of-day default still
   picks the initial theme (see the inline script in <head>), this just lets
   a visitor override it. The override is sticky (localStorage), so once
   tapped the clock stops re-deciding for that visitor. */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  color: inherit; cursor: pointer; padding: 0; vertical-align: middle;
  margin-right: 10px; line-height: 1;
  -webkit-appearance: none; appearance: none;
  transition: background-color .18s ease;
}
.theme-toggle:hover { background: var(--hover-surface); }
/* fill="none" icons only hit-test on the stroke itself, not the interior —
   a click anywhere else in the circle would fall through past the svg. Take
   the icons out of hit-testing entirely so the button's own box (backed by
   --card, not transparent) is always what the cursor actually hits. */
.theme-toggle svg { display: none; pointer-events: none; }
:root[data-theme="dark"] .theme-toggle .theme-icon-sun { display: block; }
:root[data-theme="light"] .theme-toggle .theme-icon-moon { display: block; }

.mark {
  width: 56px; height: 56px;
  margin: 0 auto 20px;
  border-radius: 16px;
  display: grid; place-items: center;
  font-size: 28px;
  background: var(--ink);
  color: var(--on-ink);
}
.mark.warn { background: #ff9f0a; color: #fff; }

footer {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--muted);
}
footer a { margin-right: 18px; }

/* Long-form legal text. */
.prose h1 { margin-top: 24px; }
.prose p { max-width: 62ch; }

/* ---------- Marketing homepage ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 8px 0 16px;
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
}

.hero-copy h1 { margin-top: 24px; }

/* Plain label, not a pill — it used to share `.btn`'s rounded-border shape
   and sat right above the two real CTA buttons, which read as a third,
   disabled-looking button rather than a tagline. */
.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-blue);
}
.pill-badge b { color: var(--text); }

/* Real device mockups (Pixelmator templates) with the on-screen area
   flood-filled transparent, so a screenshot dropped into .mockup-screen
   shows through the actual frame photo instead of a hand-drawn shape. */
.device-stack {
  position: relative;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}
.mockup { position: relative; width: 100%; }
.mockup > img {
  position: relative;
  z-index: 2;
  width: 100%;
  display: block;
}
.mockup-screen {
  position: absolute;
  z-index: 1;
  overflow: hidden;
  background: var(--card);
  border-radius: 11%;
}
.mockup-screen img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* Standalone single-device frame — same cutout images and inset math as
   the hero .device-stack, reused wherever a screenshot needs to look like
   it's genuinely on a phone rather than a bare rounded rectangle. */
.device-frame {
  position: relative;
  width: 100%;
  max-width: 190px;
  margin: 0 auto;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,.25));
}
.device-frame img.frame { position: relative; z-index: 2; width: 100%; display: block; }
.device-frame .screen { position: absolute; z-index: 1; overflow: hidden; background: var(--card); border-radius: 11%; }
.device-frame .screen img { width: 100%; height: 100%; object-fit: contain; display: block; }
.device-frame.iphone .screen { left: 4.3%; top: 1.83%; width: 91.41%; height: 96.42%; }
.device-frame.android .screen { left: 5.48%; top: 1.92%; width: 86.31%; height: 96.25%; }

/* All three device photos are the user's own cutouts with a real
   transparent hole punched in the screen — frame on top (default stacking
   from `.mockup > img` above), screenshot shows through from behind. */
.mockup-mac { width: 100%; }
.mockup-mac .mockup-screen { left: 10.29%; top: 2.49%; width: 79.36%; height: 85.33%; border-radius: 2%; }

.mockup-phone {
  position: absolute;
  width: 27%;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.35));
}
.mockup-phone-ios { right: -4%; bottom: -10%; z-index: 3; }
.mockup-phone-ios .mockup-screen { left: 4.3%; top: 1.83%; width: 91.41%; height: 96.42%; }

.mockup-phone-android {
  right: 20%;
  bottom: -6%;
  width: 32%;
  z-index: 2;
}
.mockup-phone-android .mockup-screen { left: 5.48%; top: 1.92%; width: 86.31%; height: 96.25%; }

.screenshot-pending {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  text-align: center;
  padding: 24px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent-blue) 18%, var(--card)), var(--card));
  color: var(--muted);
  font-size: 13px;
}

.usp-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin: 32px 0;
}
@media (max-width: 860px) {
  .usp-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .usp-grid { grid-template-columns: 1fr; }
}
.usp-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  border-top: 3px solid var(--accent, var(--ink));
}
.usp-card .icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent, var(--ink)) 16%, transparent);
  color: var(--accent, var(--ink));
  margin-bottom: 14px;
  font-size: 19px;
}
.usp-card h3 {
  font-size: 17px;
  margin: 0 0 6px;
  letter-spacing: -.01em;
}
.usp-card p { margin: 0; font-size: 15px; color: var(--muted); }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin: 24px 0 40px;
}
.gallery-shot {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--card);
  aspect-ratio: 9 / 17;
  position: relative;
}
.gallery-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-shot .screenshot-pending { border-radius: 0; }

.section-eyebrow {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin: 48px 0 4px;
}

/* A short multi-colour bar between major sections — reuses the same five
   accent hues the feature icons already cycle through, so it reads as
   Grupy's own mark rather than a generic <hr>. */
.section-divider {
  width: 64px;
  height: 4px;
  margin: 56px 0 0;
  border-radius: 999px;
  background: linear-gradient(90deg,
    var(--accent-blue), var(--accent-purple), var(--accent-teal),
    var(--accent-orange), var(--accent-pink));
}

/* Medlem / Admin & Leder split above the feature list — same underline
   language as .brand-divider (the five-color streak), so switching tabs
   reads as the same brand mark rather than a generic pill toggle. */
.usp-tabs {
  display: flex;
  gap: 32px;
  margin: 8px 0 32px;
  border-bottom: 1px solid var(--line);
}
.usp-tab {
  position: relative;
  appearance: none;
  border: none;
  background: none;
  font: inherit;
  font-weight: 700;
  font-size: 17px;
  color: var(--muted);
  padding: 0 0 14px;
  cursor: pointer;
  transition: color .18s ease;
}
.usp-tab:hover { color: var(--text); }
.usp-tab.is-active { color: var(--text); }
.usp-tab-underline {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple),
    var(--accent-teal), var(--accent-orange), var(--accent-pink));
  opacity: 0;
  transform: scaleX(.6);
  transform-origin: left;
  transition: opacity .18s ease, transform .18s ease;
}
.usp-tab.is-active .usp-tab-underline { opacity: 1; transform: scaleX(1); }

/* Lightweight pure-CSS browser chrome for the Web USP's screenshot — no
   cutout PNG asset, since a phone/laptop frame doesn't read as "a browser
   tab" the way three dots and an address pill instantly do. */
.browser-frame {
  width: 100%;
  max-width: 220px;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.browser-frame .browser-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 10px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.browser-frame .browser-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.browser-frame .browser-url {
  margin-left: 6px;
  flex: 1;
  font-size: 10px;
  color: var(--muted);
  background: var(--card);
  border-radius: 999px;
  padding: 3px 10px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.browser-frame img { width: 100%; display: block; }

/* Mac variant of .device-frame — same cutout-image mechanism as
   iphone/android, just with the laptop screen's own insets (matches
   .mockup-mac's cutout math, since it's the same macbook-cutout.png). */
.device-frame.mac .screen { left: 10.29%; top: 2.49%; width: 79.36%; height: 85.33%; border-radius: 2%; }

/* Large, alternating feature sections — replaces the old small usp-grid.
   Each is a real screenshot beside real copy, with a link to a dedicated
   explainer page. Odd/even alternates which side the screenshot sits on so
   a long stack of them doesn't read as a monotonous list. */
.feature-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  /* Ekstra luft foroven — det første korts telefon stikker op over
     kortets egen kant, og med for lidt margin herover ramte den næsten
     overskriften lige ovenfor. */
  margin: 64px 0 48px;
}
.feature-section {
  display: grid;
  grid-template-columns: minmax(0, 200px) 1fr;
  gap: 40px;
  align-items: center;
  padding: 32px 40px;
  background: var(--card);
  border-radius: 24px;
  /* Reuses the site's own standard card shadow — deliberately not a
     harder, more "designed" shadow of its own, so a whole column of
     these still reads as one calm, discreet surface each. */
  box-shadow: var(--shadow);
}
.feature-section:nth-child(even) { grid-template-columns: 1fr minmax(0, 200px); }
.feature-section:nth-child(even) .feature-shot { order: 2; }
.feature-section:nth-child(even) .feature-text { order: 1; }
@media (max-width: 760px) {
  .feature-section,
  .feature-section:nth-child(even) { grid-template-columns: 1fr; gap: 20px; padding: 24px; }
  .feature-section:nth-child(even) .feature-shot { order: 0; }
  .feature-section:nth-child(even) .feature-text { order: 0; }
  .feature-shot,
  .feature-section:nth-child(even) .feature-shot { max-width: 170px; margin: 0 auto; }
  .feature-shot .device-frame { margin-top: -32px; margin-bottom: -32px; }
}
.feature-shot { display: flex; justify-content: center; }
/* The phone is taller than the card: it pokes out past the card's own
   top and bottom edge rather than sitting inside it with room to spare,
   so the card's rounded top/bottom border runs behind the device instead
   of framing it on every side. */
.feature-shot .device-frame { margin-top: -48px; margin-bottom: -48px; }
.feature-shot .screenshot-pending { border-radius: 20px; width: 100%; max-width: 190px; aspect-ratio: 9/19.5; margin: 0 auto; }
.feature-text .icon {
  width: 44px; height: 44px;
  border-radius: 13px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent, var(--ink)) 16%, transparent);
  color: var(--accent, var(--ink));
  margin-bottom: 18px;
}
.feature-text h3 {
  font-size: clamp(22px, 3vw, 28px);
  letter-spacing: -.01em;
  margin: 0 0 12px;
}
.feature-text p {
  font-size: 17px;
  color: var(--muted);
  max-width: 46ch;
}
.feature-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  color: var(--accent, var(--text));
}
.feature-more svg { transition: transform .15s ease; }
.feature-more:hover svg { transform: translateX(3px); }

/* Per-feature explainer pages. */
.feature-hero {
  display: grid;
  grid-template-columns: minmax(0, 220px) 1fr;
  gap: 40px;
  align-items: center;
  margin: 8px 0 40px;
}
@media (max-width: 700px) {
  .feature-hero { grid-template-columns: 1fr; }
  .feature-hero .feature-shot { max-width: 190px; margin: 0 auto; }
}
/* Own line above the hero, and round like `.theme-toggle` rather than a
   text link — a distinct tappable affordance instead of small muted copy
   easy to skim past. */
.back-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  color: inherit;
  text-decoration: none;
  margin: 0 0 56px;
  transition: background-color .18s ease;
}
.back-link:hover { background: var(--hover-surface); }
.feature-points {
  list-style: none;
  padding: 0;
  margin: 24px 0 24px 260px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
@media (max-width: 700px) {
  .feature-points { margin-left: 0; }
}
.feature-points li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.feature-points .check {
  flex: none;
  width: 26px; height: 26px;
  border-radius: 999px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent, var(--ink)) 16%, transparent);
  color: var(--accent, var(--ink));
  margin-top: 2px;
}
.feature-points strong { display: block; margin-bottom: 2px; }
.feature-points span.desc { color: var(--muted); font-size: 15px; }
