:root {
  color-scheme: dark;
  --bg: #030913;
  --panel: rgba(7, 20, 36, 0.87);
  --panel-strong: rgba(7, 18, 32, 0.96);
  --line: rgba(137, 181, 230, 0.20);
  --line-strong: rgba(70, 151, 255, 0.46);
  --text: #f4f8ff;
  --muted: #94afd0;
  --accent: #3c8fff;
  --accent-2: #69b7ff;
  --danger: #ff735f;
  --ok: #65d8a6;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 70% 10%, rgba(15, 80, 150, 0.22), transparent 32%),
    radial-gradient(circle at 15% 70%, rgba(16, 85, 145, 0.12), transparent 28%),
    linear-gradient(180deg, #05101d 0%, var(--bg) 78%);
}
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }

.page-shell {
  width: min(1600px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 28px;
}

.topbar {
  min-height: 76px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 36px;
  border-bottom: 1px solid rgba(139, 180, 224, 0.10);
}
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid rgba(74, 159, 255, .42); border-radius: 12px;
  color: var(--accent-2); font-size: 28px; transform: rotate(90deg);
}
.brand-copy { display: flex; flex-direction: column; line-height: 1; }
.brand-copy strong { font-size: 27px; letter-spacing: -.04em; }
.brand-copy small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.main-nav { display: flex; justify-content: center; gap: clamp(20px, 4vw, 56px); }
.main-nav a { color: #bdd0e8; font-size: 14px; transition: .2s ease; }
.main-nav a:hover { color: white; }
.lang-switch { display: flex; align-items: center; gap: 6px; color: #6e88a8; }
.lang-switch button { border: 0; background: transparent; padding: 7px; cursor: pointer; color: #738eae; }
.lang-switch button.active { color: white; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(360px, .65fr);
  gap: 24px;
  padding: 34px 0 28px;
}
.hero-panel, .auth-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.hero-panel {
  min-height: 710px;
  overflow: hidden;
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  background: #06111e;
}
.hero-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(2, 9, 17, .88) 0%, rgba(2, 9, 17, .64) 31%, rgba(2, 9, 17, .14) 59%, rgba(2, 9, 17, .08) 100%),
    linear-gradient(180deg, rgba(2, 9, 17, .34) 0%, rgba(2, 9, 17, .02) 46%, rgba(2, 9, 17, .20) 100%);
}
.hero-copy {
  z-index: 2;
  position: absolute;
  top: 48px;
  left: 46px;
  width: min(520px, 52%);
  text-shadow: 0 2px 18px rgba(0,0,0,.48);
}
.eyebrow { color: #7ea7d6; font-size: 12px; letter-spacing: .18em; margin-bottom: 16px; }
.hero h1 { margin: 0; font-size: clamp(52px, 5.2vw, 78px); line-height: .94; letter-spacing: -.055em; }
.hero h1 span { color: white; }
.hero h1 { color: var(--accent); }
.lead { max-width: 540px; margin: 20px 0 12px; font-size: clamp(20px, 1.75vw, 27px); line-height: 1.25; font-weight: 500; }
.sublead { margin: 0; color: #9fc1e4; font-size: 15px; }
.hero-visual {
  min-height: 610px;
  background-image: url('./assets/nrk-desktop-hero-left.webp');
  background-size: cover;
  background-position: center center;
}
.feature-strip {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-top: 1px solid var(--line);
  background: rgba(3, 12, 23, .91);
  backdrop-filter: blur(14px);
}
.feature { min-width: 0; padding: 17px 10px 15px; text-align: center; border-right: 1px solid rgba(142, 181, 225, .12); }
.feature:last-child { border-right: 0; }
.feature-icon { display: block; color: var(--accent); font-size: 23px; line-height: 1; margin-bottom: 9px; }
.feature-icon.warning { color: var(--danger); }
.feature b { display: block; font-size: 13px; }
.feature small { display: block; color: #7896b8; font-size: 10px; margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.auth-card {
  align-self: center;
  padding: 32px;
  background: rgba(6, 18, 33, .92);
  backdrop-filter: blur(24px) saturate(135%);
}
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); margin-bottom: 30px; }
.auth-tab {
  border: 0; background: transparent; padding: 0 4px 15px; color: #738cab; cursor: pointer; font-size: 16px; position: relative;
}
.auth-tab.active { color: white; }
.auth-tab.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); border-radius: 4px; }
.auth-view { display: none; }
.auth-view.active { display: block; animation: fadeIn .2s ease; }
.auth-view h2 { margin: 0 0 8px; font-size: 28px; letter-spacing: -.025em; }
.auth-view > p { margin: 0 0 24px; color: var(--muted); font-size: 14px; }
form { display: grid; gap: 17px; }
label { display: grid; gap: 7px; color: #a9bfd9; font-size: 12px; }
input[type="text"], input[type="email"], input[type="password"] {
  width: 100%; height: 50px; border-radius: 10px; border: 1px solid rgba(129, 169, 214, .27);
  padding: 0 14px; color: white; background: rgba(8, 22, 39, .74); outline: 0; transition: .2s ease;
}
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(60, 143, 255, .11); }
input::placeholder { color: #58728f; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 48px; }
.password-toggle { position: absolute; right: 8px; top: 7px; width: 36px; height: 36px; border: 0; background: transparent; color: #6786a7; cursor: pointer; }
.form-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.form-row a { color: var(--accent-2); font-size: 12px; }
.check-row { display: inline-flex; grid-template-columns: auto 1fr; align-items: center; gap: 8px; cursor: pointer; }
.check-row input { accent-color: var(--accent); }
.terms { margin-top: -2px; }
.primary-btn { height: 50px; border: 0; border-radius: 10px; background: linear-gradient(135deg, #287ff6, #4ba0ff); font-weight: 700; cursor: pointer; box-shadow: 0 10px 24px rgba(46, 132, 249, .21); }
.primary-btn:hover { filter: brightness(1.06); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.switch-hint { margin: 21px 0 0 !important; text-align: center; color: #829bb8 !important; font-size: 12px !important; }
.switch-hint button { border: 0; background: transparent; color: var(--accent-2); cursor: pointer; padding: 0; }
.form-message { min-height: 16px; margin: -6px 0 0; font-size: 12px; color: var(--muted); }
.form-message.error { color: #ff8e7e; }
.form-message.ok { color: var(--ok); }

.footer {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  align-items: center;
  padding: 24px 6px 32px;
  color: #9db4cf;
}
.footer > div { display: flex; flex-direction: column; gap: 5px; }
.footer small { color: #617d9d; font-size: 10px; }
.footer-motto { text-align: center; }
.footer-meta { text-align: right; }

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

@media (max-width: 1120px) {
  .main-nav { display: none; }
  .topbar { grid-template-columns: 1fr auto; }
  .hero { grid-template-columns: 1fr; }
  .auth-card { width: min(620px, 100%); justify-self: center; }
  .hero-panel { min-height: 650px; }
  .feature-strip { grid-template-columns: repeat(4, 1fr); }
  .feature:nth-child(4) { border-right: 0; }
  .hero-copy { width: min(630px, 80%); }
}

@media (max-width: 700px) {
  .page-shell { padding: 0 14px; }
  .topbar { min-height: 64px; }
  .brand-copy strong { font-size: 22px; }
  .brand-mark { width: 36px; height: 36px; }
  .hero { padding-top: 16px; gap: 16px; }
  .hero-panel { min-height: 570px; border-radius: 16px; }
  .hero-copy { top: 28px; left: 22px; right: 22px; width: auto; }
  .hero h1 { font-size: clamp(48px, 15vw, 72px); }
  .lead { font-size: 20px; }
  .sublead { font-size: 13px; max-width: 90%; }
  .hero-visual { min-height: 480px; background-position: 43% center; }
  .feature-strip { grid-template-columns: repeat(2, 1fr); }
  .feature:nth-child(2n) { border-right: 0; }
  .feature:last-child { grid-column: 1 / -1; }
  .auth-card { padding: 22px 18px; border-radius: 16px; }
  .two-col { grid-template-columns: 1fr; }
  .footer { grid-template-columns: 1fr; text-align: left; }
  .footer-motto, .footer-meta { text-align: left; }
}
