/* ============================================================
   AETHER STATION — "Deep Space hex"
   Dark, cinematic, premium. Pure CSS — no frameworks, no imports.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --bg: #06070b;
  --bg-2: #0b0d14;
  --panel: rgba(255, 255, 255, .04);
  --line: rgba(255, 255, 255, .09);
  --text: #eceef4;
  --muted: #9aa3b5;
  --accent: #ff3b2f;
  --accent-2: #ff8a1e;
  --grad: linear-gradient(135deg, #ff3b2f, #ff8a1e);

  /* Pillar accents — warm family (channel identity) */
  --c-study: #ffc061;
  --c-focus: #ff5c47;
  --c-coding: #ff8a1e;
  --c-creativity: #d92c20;

  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

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

html {
  background: var(--bg);
  scrollbar-color: #2a2e3a transparent;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, blockquote { margin: 0; }
button { font-family: inherit; }
img { max-width: 100%; }

::selection { background: var(--accent); color: #fff; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

body.no-scroll { overflow: hidden; }

/* Dark scrollbar (WebKit) */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2a2e3a; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #3a4152; }

/* ---------- Hex background ---------- */
.hex-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 700px at 50% -12%, rgba(255, 59, 47, .10), transparent 70%),
    radial-gradient(1200px 800px at 100% 108%, rgba(255, 138, 30, .05), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M0 -32.33 28 -16.17 28 16.17 0 32.33 -28 16.17 -28 -16.17Z M56 -32.33 84 -16.17 84 16.17 56 32.33 28 16.17 28 -16.17Z M28 16.17 56 32.33 56 64.67 28 80.83 0 64.67 0 32.33Z M0 64.67 28 80.83 28 113.17 0 129.33 -28 113.17 -28 80.83Z M56 64.67 84 80.83 84 113.17 56 129.33 28 113.17 28 80.83Z' fill='none' stroke='rgba(255,255,255,0.04)' stroke-width='1'/%3E%3C/svg%3E");
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px clamp(16px, 4vw, 40px);
  background: rgba(6, 7, 11, .75);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(255, 80, 30, .45));
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: .14em;
  font-size: .95rem;
  color: var(--text);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 22px;
  margin-left: auto;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: .95rem;
  font-weight: 500;
  transition: color .2s ease;
}

.nav-links a:hover { color: var(--text); }

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

.lang-switch {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.lang-btn {
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 7px 13px;
  font: 600 .8rem/1 var(--font-body);
  cursor: pointer;
}

.lang-btn.is-active {
  background: var(--grad);
  color: #fff;
}

.yt-icon {
  display: inline-block;
  vertical-align: -3px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 999px;
  padding: 11px 22px;
  font: 600 .92rem/1.2 var(--font-body);
  cursor: pointer;
  text-decoration: none;
  color: #fff;
  transition: all .25s ease;
}

.btn--primary {
  background: var(--grad);
  box-shadow: 0 4px 24px rgba(255, 60, 30, .35);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(255, 60, 30, .5);
}

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

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

.btn--big { padding: 14px 28px; font-size: 1rem; }
.btn--small { padding: 8px 16px; font-size: .85rem; }

.i-play {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 12px solid currentColor;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
}

/* ---------- Hero ---------- */
.hero {
  min-height: calc(88vh - 70px);
  display: flex;
  align-items: center;
  padding: clamp(48px, 7vw, 96px) clamp(16px, 4vw, 40px);
}

.hero-inner {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: .88fr 1.32fr;
  gap: 44px;
  align-items: center;
}

.hero-kicker {
  text-transform: uppercase;
  letter-spacing: .32em;
  font-size: .74rem;
  font-weight: 600;
  color: var(--accent-2);
  margin-bottom: 16px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.08;
  margin-bottom: 18px;
}

.hero-sub {
  color: var(--muted);
  font-size: clamp(.95rem, 1.2vw, 1.05rem);
  max-width: 52ch;
  margin-bottom: 28px;
}

.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Main player inside the hero (right column) */
.hero-stage { min-width: 0; }

.hero-stage .section-tag { margin-bottom: 12px; }

.hero-stage-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.35;
  margin-top: 16px;
}

.hero-stage .main-meta { margin-top: 6px; }

/* ---------- Sections ---------- */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(56px, 7vw, 110px) clamp(16px, 4vw, 40px);
  scroll-margin-top: 90px;
}

.section-head { margin-bottom: 34px; }

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: .24em;
  font-size: .78rem;
  font-weight: 600;
  color: var(--accent-2);
  margin-bottom: 14px;
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  display: none;
}

#mainTag.is-live .live-dot {
  display: inline-block;
  animation: pulse 1.6s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 59, 47, .55); }
  50%      { box-shadow: 0 0 0 8px rgba(255, 59, 47, 0); }
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.55rem, 2.6vw, 2.4rem);
  margin-bottom: 10px;
}

.section-sub { color: var(--muted); }

.main-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: .95rem;
  margin-top: 6px;
}

.link-yt {
  color: var(--accent-2);
  text-decoration: none;
  font-weight: 600;
}

.link-yt:hover { text-decoration: underline; }

.main-duration { font-variant-numeric: tabular-nums; }

/* ---------- Main player ---------- */
.player-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
  transition: border-color .3s ease;
}

.player-frame:hover { border-color: rgba(255, 90, 40, .5); }

.player-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Click-to-load facade (generated by app.js) */
.facade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  cursor: pointer;
  background: #000;
  padding: 0;
}

.facade-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .85;
  display: block;
}

.facade-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .1), rgba(0, 0, 0, .55));
}

.facade-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 10px 40px rgba(255, 60, 30, .5);
  transition: transform .25s ease;
}

.facade-play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-38%, -50%);
  border-left: 22px solid #fff;
  border-top: 13px solid transparent;
  border-bottom: 13px solid transparent;
}

.facade:hover .facade-play {
  transform: translate(-50%, -50%) scale(1.07);
}

/* ---------- Grids & cards ---------- */
.grid {
  display: grid;
  gap: 22px;
  grid-template-columns: 1fr;
}

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

@media (min-width: 1100px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 90, 40, .45);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .45);
}

.card-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  padding: 0;
  background: #000;
  cursor: pointer;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .55));
}

.card-playicon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(.85);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--grad);
  opacity: 0;
  transition: all .25s ease;
}

.card-playicon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-38%, -50%);
  border-left: 16px solid #fff;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
}

.card-thumb:hover .card-playicon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-duration {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: rgba(0, 0, 0, .8);
  color: #fff;
  font-size: .78rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
}

.card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.card-tags { margin: 0; }

.badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid;
}

.badge--study      { color: var(--c-study);      border-color: rgba(255, 192, 97, .45);  background: rgba(255, 192, 97, .12); }
.badge--focus      { color: var(--c-focus);      border-color: rgba(255, 92, 71, .45);   background: rgba(255, 92, 71, .12); }
.badge--coding     { color: var(--c-coding);     border-color: rgba(255, 138, 30, .45);  background: rgba(255, 138, 30, .12); }
.badge--creativity { color: var(--c-creativity); border-color: rgba(217, 44, 32, .45);   background: rgba(217, 44, 32, .12); }
.badge--playlist   { color: var(--accent-2);     border-color: rgba(255, 138, 30, .45);  background: rgba(255, 138, 30, .1); }

.card-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.35;
}

/* Título clicável: abre o player na própria página (sem link externo) */
.card-title a,
.card-title button {
  color: var(--text);
  text-decoration: none;
  transition: color .2s ease;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-title a:hover,
.card-title button:hover { color: var(--accent-2); }

.card-desc {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}

.card-actions {
  margin: auto 0 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ---------- Pillars ---------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 44px;
}

.pillar {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px;
  transition: border-color .25s ease;
}

.pillar:hover { border-color: rgba(255, 90, 40, .4); }

/* Colored top accent per pillar (no icons) */
.pillar { border-top: 3px solid var(--line); }

[data-pillar="study"]      { border-top-color: var(--c-study); }
[data-pillar="focus"]      { border-top-color: var(--c-focus); }
[data-pillar="coding"]     { border-top-color: var(--c-coding); }
[data-pillar="creativity"] { border-top-color: var(--c-creativity); }

.pillar h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.pillar p {
  color: var(--muted);
  font-size: .92rem;
}

.station-quote {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  color: var(--muted);
  font-size: 1.06rem;
  font-style: italic;
  padding: 0 16px;
}

.station-quote::before,
.station-quote::after {
  color: var(--accent-2);
  font-style: normal;
  font-weight: 600;
}

.station-quote::before { content: "\201C\00A0"; }
.station-quote::after  { content: "\00A0\201D"; }

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.is-open { display: flex; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 3, 6, .85);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.modal-box {
  position: relative;
  width: min(960px, 100%);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, .7);
  animation: modalIn .25s ease;
}

@keyframes modalIn {
  from { transform: translateY(14px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

.modal-player {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}

.modal-player iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.modal-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--text);
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background .2s ease, border-color .2s ease;
}

.modal-close:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.modal-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 6px 4px;
  flex-wrap: wrap;
}

.modal-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 48px clamp(16px, 4vw, 40px) 28px;
  background: rgba(11, 13, 20, .5);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(255, 80, 30, .4));
}

.footer-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .14em;
}

.footer-tag {
  margin-top: 2px;
  color: var(--muted);
  font-size: .88rem;
}

.footer-copy {
  text-align: center;
  color: var(--muted);
  font-size: .84rem;
  margin: 34px 0 0;
}

.footer-copy a {
  color: var(--accent-2);
  text-decoration: none;
}

.footer-copy a:hover { text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-inner { gap: 32px; }
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .hero { min-height: auto; }
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 36px;
  }
  .hero-sub {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-ctas { justify-content: center; }
  .hero-stage { max-width: 640px; margin: 0 auto; }
  .hero-stage .main-meta { justify-content: center; }
  .brand-name { font-size: .88rem; }
}

@media (max-width: 520px) {
  .section { padding-block: 56px; }
  .btn--big {
    width: 100%;
    justify-content: center;
  }
  .modal-box { padding: 10px; }
  .modal-close { top: -12px; right: -6px; }
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
  .footer-brand {
    flex-direction: column;
    text-align: center;
  }

  /* Phone nav safeguard: keep brand + language on one row */
  .nav { gap: 14px; }
  .nav-actions { margin-left: auto; }
  .lang-btn { padding: 7px 11px; }
}

@media (min-width: 1920px) {
  html { font-size: 115%; }
  .section,
  .hero-inner { max-width: 1400px; }
  .player-frame { border-radius: 22px; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  html { scroll-behavior: auto; }
}
