/* ═══════════════════════════════════════════════════════════════════════════
   Flumio TV — Premium IPTV Startup Design System
   Dark theme · Copper/amber gradient accent · Glassmorphism cards
   ═══════════════════════════════════════════════════════════════════════════ */

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

/* ── Design Tokens ─────────────────────────────────────────────────────── */
:root {
  --bg:        #08090c;
  --bg-2:      #0e1015;
  --panel:     rgba(255, 255, 255, 0.04);
  --panel-2:   rgba(255, 255, 255, 0.06);
  --panel-solid: #141620;
  --border:    rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.14);
  --text:      #f0f0f5;
  --text-secondary: #c0c0cc;
  --muted:     #7a7a8e;
  --accent:    #d1863b;
  --accent-2:  #b06726;
  --accent-glow: rgba(209, 134, 59, 0.25);
  --accent-gradient: linear-gradient(135deg, #e8a04e 0%, #d1863b 40%, #b06726 100%);
  --good:      #4caf7d;
  --good-bg:   rgba(76, 175, 125, 0.08);
  --bad:       #e0574b;
  --bad-bg:    rgba(224, 87, 75, 0.08);
  --radius:    14px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --shadow:    0 4px 24px rgba(0, 0, 0, 0.4), 0 1px 4px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & Base ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Subtle radial glow behind the page top */
body::before {
  content: '';
  position: fixed;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 120vw;
  height: 80vh;
  background: radial-gradient(ellipse at center, rgba(209, 134, 59, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── Layout ────────────────────────────────────────────────────────────── */
.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px 80px;
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
}

/* ── Header ────────────────────────────────────────────────────────────── */
header.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* The pair page is opened on a phone by definition, and the nav is one link
     longer than the header can hold at 360–375 px: without wrapping the row
     pushed the page ~130 px wider than the viewport. */
  flex-wrap: wrap;
  gap: 16px;
  padding: 24px 0 40px;
}

header.brand .brand-wordmark {
  height: 32px;
  width: auto;
  display: block;
  transition: opacity var(--transition);
}

header.brand .brand-wordmark:hover {
  opacity: 0.85;
}

/* Header nav links */
header.brand nav.header-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

header.brand nav.header-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-xs);
  transition: color var(--transition), background var(--transition);
}

header.brand nav.header-nav a:hover {
  color: var(--text);
  background: var(--panel-2);
}

header.brand nav.header-nav a.nav-active {
  color: var(--accent);
}

header.brand nav.header-nav a.nav-cta {
  background: var(--accent-gradient);
  color: #fff;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
}

header.brand nav.header-nav a.nav-cta:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--accent-glow);
}

/* ── Language switch ───────────────────────────────────────────────────── */
/* Pages ship English markup (for crawlers and no-JS) and translate on load.
   Set only for visitors who will actually get a translation, so English
   visitors never wait on JS; i18n.js clears it as soon as the swap is done. */
.i18n-wait body {
  visibility: hidden;
}

.lang-switch {
  display: flex;
  gap: 4px;
  font-size: 13px;
  flex-shrink: 0;
}

.lang-switch a, .lang-switch span {
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  transition: all var(--transition);
}

.lang-switch a:hover {
  color: var(--text);
  border-color: var(--border-hover);
  background: var(--panel);
}

.lang-switch .current {
  color: #fff;
  background: var(--accent-gradient);
  border-color: transparent;
}

/* ── Typography ────────────────────────────────────────────────────────── */
h1 {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 8px;
}

h2 {
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0 0 8px;
}

h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}

.sub {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 36px;
  max-width: 600px;
}

.page-intro {
  text-align: center;
  margin-bottom: 48px;
}

.page-intro h1 {
  background: linear-gradient(135deg, var(--text) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-intro .sub {
  margin: 8px auto 0;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: #e8a04e; }

/* ── Pricing Tiles ─────────────────────────────────────────────────────── */
.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

@media (max-width: 700px) {
  .tiles { grid-template-columns: 1fr; max-width: 400px; margin-left: auto; margin-right: auto; }
}

.tile {
  background: var(--panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px 28px;
  text-align: center;
  position: relative;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.tile:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow);
}

.tile.best {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(209, 134, 59, 0.08) 0%, var(--panel) 60%);
  box-shadow: 0 0 40px rgba(209, 134, 59, 0.1);
}

.tile.best:hover {
  box-shadow: 0 0 60px rgba(209, 134, 59, 0.15), var(--shadow);
}

.tile .badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-gradient);
  color: #1a1a1a;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  box-shadow: 0 2px 12px var(--accent-glow);
}

.tile .name {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.tile .price {
  font-size: 40px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0 0 2px;
  line-height: 1;
}

.tile.best .price {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tile .period {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
}

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 18px;
  cursor: pointer;
  background: var(--accent-gradient);
  color: #fff;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 13px 20px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
  box-shadow: 0 2px 12px rgba(209, 134, 59, 0.2);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(209, 134, 59, 0.3);
  opacity: 0.95;
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(209, 134, 59, 0.15);
}

.btn.secondary {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}

.btn.secondary:hover {
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ── Cards ─────────────────────────────────────────────────────────────── */
.card {
  background: var(--panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin: 24px 0;
  box-shadow: var(--shadow);
}

.card h3 {
  margin-top: 0;
}

/* ── Forms ─────────────────────────────────────────────────────────────── */
.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

input[type="email"],
input[type="text"] {
  flex: 1;
  min-width: 220px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

input[type="email"]:focus,
input[type="text"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

input[type="email"]::placeholder,
input[type="text"]::placeholder {
  color: var(--muted);
}

/* ── Notices / Alerts ──────────────────────────────────────────────────── */
.muted { color: var(--muted); font-size: 14px; }

.warn {
  background: rgba(232, 208, 154, 0.08);
  border: 1px solid rgba(232, 208, 154, 0.2);
  color: #e8d09a;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.5;
}

.notice {
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 15px;
  line-height: 1.5;
}

.notice.good {
  background: var(--good-bg);
  border: 1px solid rgba(76, 175, 125, 0.2);
  color: #a9e8c6;
}

.notice.bad {
  background: var(--bad-bg);
  border: 1px solid rgba(224, 87, 75, 0.2);
  color: #f0b5ad;
}

/* ── Pills ─────────────────────────────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.pill.good {
  background: rgba(76, 175, 125, 0.12);
  color: var(--good);
}

.pill.bad {
  background: rgba(224, 87, 75, 0.12);
  color: var(--bad);
}

/* ── Device List ───────────────────────────────────────────────────────── */
.device-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

.device-list li {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 10px;
  transition: border-color var(--transition);
}

.device-list li:hover {
  border-color: var(--border-hover);
}

.device-list .muted {
  display: block;
  margin-top: 2px;
  font-size: 13px;
}

.device-list .btn {
  width: auto;
  margin: 0;
  flex: none;
}

/* ── Big Code (Pairing) ────────────────────────────────────────────────── */
.big-code {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-align: center;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 12px 0 8px;
  font-family: 'Inter', monospace;
}

/* ── Feature Grid (for landing enhancement) ────────────────────────────── */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 48px 0;
}

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

.feature {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  transition: transform var(--transition), border-color var(--transition);
}

.feature:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
}

.feature .feature-icon {
  font-size: 32px;
  margin-bottom: 14px;
  display: block;
}

.feature .feature-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.feature .feature-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

/* ── Hero Banner ───────────────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 40px 0 8px;
}

.hero h1 {
  font-size: clamp(32px, 5.5vw, 48px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.hero h1 .accent {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .hero-sub {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
  max-width: 520px;
  margin: 0 auto 36px;
}

/* ── Trusted / Social Proof ────────────────────────────────────────────── */
.trust-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  padding: 20px 0;
  margin: 24px 0 40px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.trust-item .trust-icon {
  font-size: 18px;
}

/* ── Footer ────────────────────────────────────────────────────────────── */
footer.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  position: relative;
  z-index: 1;
}

footer.site-footer .footer-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 24px 32px;
}

footer.site-footer .footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

@media (max-width: 600px) {
  footer.site-footer .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

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

footer.site-footer .footer-brand img {
  height: 26px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  opacity: 0.7;
}

footer.site-footer .footer-brand p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  max-width: 280px;
}

footer.site-footer .footer-col h4 {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

footer.site-footer .footer-col a {
  display: block;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  padding: 4px 0;
  transition: color var(--transition);
}

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

footer.site-footer .footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

footer.site-footer .footer-bottom p {
  color: var(--muted);
  font-size: 12px;
}

footer.site-footer .footer-bottom a {
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
  transition: color var(--transition);
}

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

/* Simple footer fallback (for legal pages) */
footer:not(.site-footer) {
  margin-top: 48px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

footer:not(.site-footer) a {
  color: var(--muted);
  text-decoration: none;
  transition: color var(--transition);
}

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

/* ── Article (legal pages) ─────────────────────────────────────────────── */
article {
  line-height: 1.7;
  color: var(--text-secondary);
}

article h1, article h2, article h3, article h4 {
  color: var(--text);
  margin-top: 32px;
  margin-bottom: 12px;
}

article h1 { font-size: 28px; margin-top: 0; }
article h2 { font-size: 22px; }
article h3 { font-size: 18px; }

article p {
  margin-bottom: 16px;
}

article ul, article ol {
  margin: 12px 0 16px;
  padding-left: 24px;
}

article li {
  margin-bottom: 6px;
}

article a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(209, 134, 59, 0.3);
  text-underline-offset: 2px;
  transition: text-decoration-color var(--transition);
}

article a:hover {
  text-decoration-color: var(--accent);
}

article blockquote {
  border-left: 3px solid var(--accent);
  padding: 12px 20px;
  margin: 16px 0;
  background: var(--panel);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  color: var(--text-secondary);
}

article code {
  background: var(--panel-2);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

/* ── Animations ────────────────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.fade-in-up {
  animation: fadeInUp 0.5s ease-out both;
}

.fade-in {
  animation: fadeIn 0.4s ease-out both;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* ── Scrollbar ─────────────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* ── Selection ─────────────────────────────────────────────────────────── */
::selection {
  background: rgba(209, 134, 59, 0.3);
  color: #fff;
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .wrap { padding: 0 16px 60px; }
  header.brand { padding: 16px 0 28px; }
  /* Wordmark on its own line, nav centred underneath — at this width they
     cannot share a row without one of them being pushed off screen. */
  header.brand nav.header-nav { width: 100%; justify-content: center; gap: 4px; }
  header.brand nav.header-nav a { padding: 6px 10px; font-size: 13px; }
  .lang-switch a, .lang-switch span { padding: 5px 9px; }
  .card { padding: 20px; }
  .tile { padding: 24px 18px 22px; }
}
