/* ============================================================
 * Firewall / Firewall Pro — site theme
 *
 * Stand-alone CSS for the whole site (top page, privacy, terms,
 * FAQ, refund). Mirrors the Flutter app's look: Material 3
 * surfaces, generous rounding, and the app's own brand blue
 * (#1296E8 — AppTheme.brandBlue in lib/app/theme/app_theme.dart).
 * Light by default; a dark variant kicks in via
 * prefers-color-scheme so it tracks the OS just like the app's
 * ThemeMode.system.
 *
 * Ported from the sibling ad blocker (assets/css/adblock.css) with
 * the class prefix renamed ab- -> fw- and the top-page blocks added
 * at the end.
 * ============================================================ */

:root {
  /* Brand */
  --fw-brand: #1296E8;          /* brand blue — primary accent */
  --fw-brand-deep: #0B6FB0;     /* pressed / gradient end */
  --fw-brand-bright: #46B1F0;   /* hover / highlight */
  --fw-brand-tint: rgba(18, 150, 232, 0.10);

  /* Light surfaces */
  --fw-bg: #F4F7FB;             /* page background */
  --fw-bg-grad-1: #EAF4FD;
  --fw-bg-grad-2: #F4F7FB;
  --fw-surface: #FFFFFF;        /* cards */
  --fw-surface-2: #F7FAFD;      /* nested / faq closed */
  --fw-border: #E2E8F0;
  --fw-border-strong: #CBD8E8;

  /* Text */
  --fw-text: #16202E;           /* headings / body strong */
  --fw-text-soft: #45566B;      /* paragraph */
  --fw-text-muted: #7C8AA0;     /* meta */

  /* Shape */
  --fw-radius-lg: 22px;
  --fw-radius-md: 16px;
  --fw-radius-sm: 12px;
  --fw-radius-pill: 999px;

  /* Elevation */
  --fw-shadow-card: 0 1px 2px rgba(16, 32, 56, 0.04),
                    0 12px 32px -16px rgba(16, 64, 120, 0.22);
  --fw-shadow-glow: 0 8px 22px -8px rgba(18, 150, 232, 0.45);
}

@media (prefers-color-scheme: dark) {
  :root {
    --fw-bg: #0E1620;
    --fw-bg-grad-1: #11202E;
    --fw-bg-grad-2: #0E1620;
    --fw-surface: #18222F;
    --fw-surface-2: #141D29;
    --fw-border: rgba(255, 255, 255, 0.09);
    --fw-border-strong: rgba(255, 255, 255, 0.16);

    --fw-text: #F2F6FB;
    --fw-text-soft: #B7C4D4;
    --fw-text-muted: #7E8EA1;

    --fw-brand: #3BA7F0;
    --fw-brand-bright: #6CC0F6;
    --fw-brand-tint: rgba(59, 167, 240, 0.14);

    --fw-shadow-card: 0 1px 2px rgba(0, 0, 0, 0.30),
                      0 16px 40px -20px rgba(0, 0, 0, 0.70);
    --fw-shadow-glow: 0 8px 22px -8px rgba(59, 167, 240, 0.50);
  }
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, var(--fw-bg-grad-1), transparent 70%),
    var(--fw-bg-grad-2);
  background-attachment: fixed;
  color: var(--fw-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans",
    "Noto Sans JP", "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.7;
  overflow-x: hidden;
}

/* Long English words / URLs must not blow out narrow phone widths. */
.fw-card p,
.fw-card li,
.fw-faq-answer,
.fw-faq-item summary {
  overflow-wrap: anywhere;
  word-break: break-word;
}

a {
  color: var(--fw-brand);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover { color: var(--fw-brand-bright); }

::selection {
  background: var(--fw-brand-tint);
  color: var(--fw-text);
}

/* ============================================================
 * Page scaffold
 * ============================================================ */
.fw-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ----- Top bar ----- */
.fw-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--fw-surface) 86%, transparent);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--fw-border);
}

.fw-topbar-inner {
  max-width: 920px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.fw-back {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--fw-brand-tint);
  border: 1px solid var(--fw-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--fw-brand);
  font-size: 1.2rem;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.fw-back:hover {
  background: var(--fw-brand);
  border-color: var(--fw-brand);
  color: #fff;
}

.fw-topbar h1,
.fw-topbar .fw-topbar-title {
  font-size: 1.2rem;
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--fw-text);
  /* A flex item's default `min-width: auto` refuses to shrink below its
   * content, and a long title ("Rückerstattungsrichtlinie") would then push
   * the language select off a narrow phone. Let it wrap instead. */
  min-width: 0;
  overflow-wrap: anywhere;
}

.fw-brandmark {
  flex: none;
  display: inline-flex;
  align-items: center;
}
.fw-brandmark img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: block;
}

/* ----- Language switcher ----- */
.fw-lang-switch {
  margin-left: auto;
  display: flex;
  align-items: center;
  /* Don't shrink: the <select> inside cannot reflow, so squeezing the wrapper
   * would just let it spill out. The heading beside it absorbs the shortfall. */
  flex: none;
}
.fw-lang-switch select {
  background-color: var(--fw-surface);
  border: 1px solid var(--fw-border-strong);
  color: var(--fw-text);
  padding: 8px 30px 8px 12px;
  border-radius: var(--fw-radius-sm);
  font-size: 0.85rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231296E8' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 9px center;
  /* Sized by its widest option ("Bahasa Indonesia") unless told otherwise. */
  min-width: 0;
  max-width: 100%;
}
.fw-lang-switch select:focus {
  outline: none;
  border-color: var(--fw-brand);
  box-shadow: 0 0 0 3px var(--fw-brand-tint);
}

/* ----- Content ----- */
.fw-content {
  flex: 1;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 32px 24px 24px;
}

.fw-card {
  background: var(--fw-surface);
  border: 1px solid var(--fw-border);
  border-radius: var(--fw-radius-lg);
  box-shadow: var(--fw-shadow-card);
  padding: 32px 36px;
  margin-bottom: 22px;
}

.fw-card > :first-child { margin-top: 0; }
.fw-card > :last-child { margin-bottom: 0; }

.fw-card h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 32px 0 14px;
  color: var(--fw-text);
  padding-left: 14px;
  border-left: 4px solid var(--fw-brand);
  line-height: 1.4;
}
.fw-card h3 {
  font-size: 1.08rem;
  font-weight: 700;
  margin: 24px 0 10px;
  color: var(--fw-text);
}

.fw-card p,
.fw-card li {
  color: var(--fw-text-soft);
  font-size: 0.97rem;
  line-height: 1.8;
}
.fw-card strong { color: var(--fw-text); }

.fw-card ol,
.fw-card ul {
  padding-left: 1.4rem;
  margin: 12px 0;
}
.fw-card li { margin-bottom: 6px; }

.fw-card ul li::marker { color: var(--fw-brand); }

.fw-effective {
  color: var(--fw-text-muted);
  font-size: 0.85rem;
  margin-top: 30px;
  padding-top: 16px;
  border-top: 1px solid var(--fw-border);
}

/* Lead paragraph in the FAQ intro card */
.fw-intro {
  margin: 0;
  color: var(--fw-text-soft);
}

/* ============================================================
 * FAQ accordion
 * ============================================================ */
.fw-faq-item {
  background: var(--fw-surface);
  border: 1px solid var(--fw-border);
  border-radius: var(--fw-radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: var(--fw-shadow-card);
  transition: border-color 0.2s ease;
}
.fw-faq-item[open] {
  border-color: var(--fw-brand);
}
.fw-faq-item summary {
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 600;
  color: var(--fw-text);
  font-size: 1rem;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
}
.fw-faq-item summary::-webkit-details-marker { display: none; }
.fw-faq-item summary::after {
  content: "";
  flex: none;
  margin-left: auto;
  width: 22px;
  height: 22px;
  background: var(--fw-brand);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 5v14M5 12h14' stroke='black' stroke-width='2.4' stroke-linecap='round'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 5v14M5 12h14' stroke='black' stroke-width='2.4' stroke-linecap='round'/></svg>") center / contain no-repeat;
  transition: transform 0.25s ease;
}
.fw-faq-item[open] summary::after {
  transform: rotate(135deg);
}
.fw-faq-item summary:hover { color: var(--fw-brand); }

.fw-faq-answer {
  padding: 0 22px 20px;
  color: var(--fw-text-soft);
  font-size: 0.95rem;
  line-height: 1.8;
}
.fw-faq-answer > :first-child { margin-top: 0; }
.fw-faq-answer ol,
.fw-faq-answer ul { padding-left: 1.3rem; }
.fw-faq-answer li { margin-bottom: 6px; }
.fw-faq-answer strong { color: var(--fw-text); }

/* ============================================================
 * Footer nav (also embeddable on the top page)
 * ============================================================ */
.fw-footer-nav {
  background: var(--fw-surface);
  border-top: 1px solid var(--fw-border);
  padding: 32px 24px;
  margin-top: 8px;
}
.fw-footer-nav-inner {
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  text-align: center;
}
.fw-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 26px;
}
.fw-footer-links a {
  color: var(--fw-text-soft);
  font-size: 0.92rem;
  font-weight: 500;
}
.fw-footer-links a:hover { color: var(--fw-brand); }
.fw-footer-copy {
  color: var(--fw-text-muted);
  font-size: 0.82rem;
  margin: 0;
}
.fw-footer-copy a { color: var(--fw-text-muted); }
.fw-footer-copy a:hover { color: var(--fw-brand); }

/* ============================================================
 * Responsive
 * ============================================================ */
@media (max-width: 600px) {
  .fw-content { padding: 22px 14px 16px; }
  .fw-card { padding: 22px 18px; border-radius: var(--fw-radius-md); }
  .fw-topbar-inner { padding: 10px 14px; gap: 8px; }
  .fw-lang-switch select { max-width: 112px; }
  .fw-topbar h1,
  .fw-topbar .fw-topbar-title { font-size: 1.05rem; }
  .fw-card h2 { font-size: 1.18rem; }
  .fw-card h3 { font-size: 1rem; }
  .fw-lang-switch select { font-size: 0.8rem; padding: 7px 26px 7px 10px; }
  .fw-faq-item summary { padding: 15px 16px; font-size: 0.96rem; }
  .fw-faq-answer { padding: 0 16px 16px; font-size: 0.92rem; }
}

/* ============================================================
 * Top page
 *
 * The top page uses this same stylesheet rather than the Bootstrap
 * landing kit the sibling apps use: it is a short page, and one
 * self-contained CSS file keeps every page of the site on the same
 * palette and dark-mode behaviour with nothing to load from a CDN.
 * ============================================================ */

/* ----- Hero ----- */
.fw-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 90% at 78% 20%, var(--fw-brand-tint), transparent 70%),
    linear-gradient(160deg, var(--fw-bg-grad-1), var(--fw-bg-grad-2));
  border-bottom: 1px solid var(--fw-border);
}
.fw-hero-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 60px 24px 56px;
  display: flex;
  align-items: center;
  gap: 48px;
}
.fw-hero-text { flex: 1 1 0; min-width: 0; }
.fw-hero-art {
  flex: 0 0 300px;
  display: flex;
  justify-content: center;
}
.fw-hero-art img {
  width: 100%;
  max-width: 300px;
  height: auto;
  border-radius: var(--fw-radius-lg);
  box-shadow: var(--fw-shadow-card);
  border: 1px solid var(--fw-border);
  display: block;
}

.fw-hero h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  margin: 0 0 8px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--fw-text);
}
.fw-hero .fw-tagline {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--fw-brand);
  margin: 0 0 14px;
  line-height: 1.5;
}
.fw-hero .fw-lead {
  font-size: 1rem;
  color: var(--fw-text-soft);
  margin: 0 0 26px;
  max-width: 34em;
}
.fw-availability {
  display: block;
  margin-top: 14px;
  font-size: 0.86rem;
  color: var(--fw-text-muted);
}

/* ----- Store button ----- */
.fw-store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 13px 26px 13px 22px;
  border-radius: var(--fw-radius-pill);
  background: linear-gradient(135deg, var(--fw-brand), var(--fw-brand-deep));
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: var(--fw-shadow-glow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.fw-store-btn:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -10px rgba(18, 150, 232, 0.6);
}
.fw-store-btn svg { flex: none; }

/* ----- Section scaffold ----- */
.fw-section {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 56px 24px 0;
}
.fw-section:last-of-type { padding-bottom: 8px; }
.fw-section-head {
  text-align: center;
  max-width: 44em;
  margin: 0 auto 30px;
}
.fw-section-head h2 {
  font-size: 1.7rem;
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--fw-text);
}
.fw-section-head p {
  margin: 0;
  color: var(--fw-text-soft);
  font-size: 0.97rem;
}

/* ----- Feature grid ----- */
.fw-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.fw-features li {
  background: var(--fw-surface);
  border: 1px solid var(--fw-border);
  border-radius: var(--fw-radius-md);
  box-shadow: var(--fw-shadow-card);
  padding: 22px 24px;
}
.fw-features b {
  display: block;
  color: var(--fw-text);
  font-size: 1.02rem;
  margin-bottom: 6px;
}
.fw-features span {
  color: var(--fw-text-soft);
  font-size: 0.93rem;
  line-height: 1.75;
}

/* ----- Screenshot strip -----
 * A plain scroll-snap row: no carousel script, and it degrades to a
 * swipeable strip on a phone without any JS at all. */
.fw-shots {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 24px 22px;
  margin: 0 -24px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.fw-shots img {
  flex: none;
  width: 220px;
  height: auto;
  border-radius: var(--fw-radius-md);
  border: 1px solid var(--fw-border);
  box-shadow: var(--fw-shadow-card);
  scroll-snap-align: center;
  background: var(--fw-surface);
}

/* ----- Closing download band ----- */
.fw-download {
  width: 100%;
  margin: 56px auto 0;
  max-width: 1040px;
  padding: 0 24px;
}
.fw-download-inner {
  background: linear-gradient(135deg, var(--fw-brand), var(--fw-brand-deep));
  border-radius: var(--fw-radius-lg);
  padding: 44px 32px;
  text-align: center;
  box-shadow: var(--fw-shadow-glow);
}
.fw-download-inner h2 {
  color: #fff;
  font-size: 1.6rem;
  font-weight: 800;
  margin: 0 0 8px;
}
.fw-download-inner p {
  color: rgba(255, 255, 255, 0.88);
  margin: 0 0 22px;
  font-size: 0.97rem;
}
.fw-download-inner .fw-store-btn {
  background: #fff;
  color: var(--fw-brand-deep);
  box-shadow: 0 10px 26px -12px rgba(0, 0, 0, 0.55);
}
.fw-download-inner .fw-store-btn:hover { color: var(--fw-brand-deep); }
.fw-download-inner .fw-availability { color: rgba(255, 255, 255, 0.8); }

/* ----- The "about this VPN" note -----
 * Android shows a key icon for any VpnService, so the page has to
 * say what this one is and is not before the user reaches the store. */
.fw-note {
  background: var(--fw-surface);
  border: 1px solid var(--fw-border);
  border-left: 4px solid var(--fw-brand);
  border-radius: var(--fw-radius-md);
  box-shadow: var(--fw-shadow-card);
  padding: 26px 30px;
}
.fw-note h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--fw-text);
}
.fw-note p,
.fw-note li {
  color: var(--fw-text-soft);
  font-size: 0.94rem;
  line-height: 1.8;
}
.fw-note ul { padding-left: 1.3rem; margin: 10px 0 0; }
.fw-note li { margin-bottom: 6px; }
.fw-note li::marker { color: var(--fw-brand); }
.fw-note strong { color: var(--fw-text); }

@media (max-width: 860px) {
  .fw-hero-inner { flex-direction: column; gap: 34px; padding: 44px 20px 40px; }
  /* The row layout constrains .fw-hero-text through `flex: 1 1 0`. Stacked, the
   * parent's `align-items: center` would shrink-wrap it instead, and the lead
   * paragraph's 34em max-width would then push it past a phone's viewport. */
  .fw-hero-text { width: 100%; text-align: center; }
  .fw-hero .fw-lead { margin-left: auto; margin-right: auto; }
  .fw-hero-art { flex: none; width: 100%; max-width: 260px; }
}

@media (max-width: 600px) {
  .fw-hero h1 { font-size: 1.9rem; }
  .fw-hero .fw-tagline { font-size: 1.02rem; }
  .fw-section { padding: 40px 16px 0; }
  .fw-section-head h2 { font-size: 1.4rem; }
  .fw-shots { padding: 4px 16px 20px; margin: 0 -16px; }
  .fw-shots img { width: 190px; }
  .fw-download { padding: 0 16px; margin-top: 40px; }
  .fw-download-inner { padding: 34px 20px; }
  .fw-download-inner h2 { font-size: 1.3rem; }
  .fw-note { padding: 20px 18px; }
}
