/* Sivun tyylit (siirretty index.html:n <style>-lohkosta, jotta CSP voi
   myöhemmin kieltää inline-tyylit; ks. docs/JATKOKEHITYS.md A6). */
:root{
  --bg: #0a0b0a;
  --bg-hero-2: #0d100f;
  --panel: #131615;
  --panel-2: #181b19;
  --border: #262a27;
  --border-soft: #1d201e;
  --amber: #f0a534;
  --amber-dim: #8a611f;
  --blue: #5b9bd8;
  --green: #3fae6a;
  --text: #eef1ee;
  --text-muted: #8b918c;
  --text-faint: #6b716d;
  --font-display: 'Space Grotesk', 'Arial Narrow', Arial, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

*{ box-sizing: border-box; margin: 0; padding: 0; }
html{ scroll-behavior: smooth; }
body{
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

a{ color: inherit; text-decoration: none; }

/* ---------------------------------------------------------------- */
/* Ambient radar sweep — slow, subtle, purely atmospheric            */
/* ---------------------------------------------------------------- */
.radar-sweep{
  position: fixed;
  top: 50%; left: 50%;
  width: 180vmax; height: 180vmax;
  transform: translate(-50%, -50%);
  background: conic-gradient(from 0deg,
    transparent 0deg, transparent 300deg,
    rgba(240,165,52,0.05) 340deg, rgba(240,165,52,0.09) 356deg, transparent 360deg);
  animation: sweep 14s linear infinite;
  pointer-events: none;
  z-index: 0;
}
@keyframes sweep{ to{ transform: translate(-50%, -50%) rotate(360deg); } }

.grain-vignette{
  position: fixed; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, transparent 0%, transparent 40%, var(--bg) 92%);
  pointer-events: none;
  z-index: 1;
}

/* ---------------------------------------------------------------- */
/* Header                                                            */
/* ---------------------------------------------------------------- */
header{
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px clamp(20px, 5vw, 56px);
  border-bottom: 1px solid var(--border-soft);
  max-width: 1100px;
  margin: 0 auto;
}
.brand{ display: flex; align-items: center; gap: 10px; }
.brand svg{ width: 22px; height: 22px; }
.brand-name{
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.18em;
  color: var(--text-muted); font-weight: 500;
}
.brand-name b{ color: var(--amber); font-weight: 500; }

#clock{
  font-family: var(--font-mono); font-size: 13px; color: var(--text-muted);
  letter-spacing: 0.06em; text-align: right;
}
#clock .time{ color: var(--text); font-size: 15px; font-weight: 500; }

/* ---------------------------------------------------------------- */
/* Hero                                                              */
/* ---------------------------------------------------------------- */
.hero{
  position: relative; z-index: 2;
  padding: clamp(48px, 9vw, 96px) clamp(20px, 5vw, 56px) clamp(32px, 6vw, 64px);
  max-width: 1100px;
  margin: 0 auto;
}
.eyebrow{
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.22em;
  color: var(--amber); margin-bottom: 18px; display: flex; align-items: center; gap: 10px;
  opacity: 0; animation: fadeUp 0.7s ease-out 0.1s forwards;
}
.eyebrow::before{
  content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 8px var(--green);
}
h1{
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(56px, 11vw, 128px); line-height: 0.92; letter-spacing: -0.02em;
  color: var(--text);
  opacity: 0; animation: fadeUp 0.8s ease-out 0.2s forwards;
}
.hero p{
  margin-top: 22px; max-width: 640px;
  font-size: clamp(15px, 1.6vw, 18px); color: var(--text-muted); font-weight: 400;
  opacity: 0; animation: fadeUp 0.8s ease-out 0.35s forwards;
}
.hero p b{ color: var(--text); font-weight: 500; }

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

/* ---------------------------------------------------------------- */
/* Departures board                                                  */
/* ---------------------------------------------------------------- */
.board-wrap{
  position: relative; z-index: 2;
  padding: 0 clamp(20px, 5vw, 56px) clamp(56px, 8vw, 96px);
  max-width: 1100px;
  margin: 0 auto;
}
.board{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,0.6);
}
.board-standalone{ margin-top: 28px; }
.board-head{
  display: grid;
  grid-template-columns: 56px 40px 1fr 130px 28px;
  gap: 18px;
  padding: 14px 24px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em;
  color: var(--text-faint); text-transform: uppercase;
  border-bottom: 1px solid var(--border-soft);
}
.board-head span:nth-child(4){ text-align: right; }

.row{
  position: relative;
  display: grid;
  grid-template-columns: 56px 40px 1fr 130px 28px;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--border-soft);
  transition: background 0.25s ease;
  opacity: 0;
  animation: fadeUp 0.6s ease-out forwards;
}
.row:last-child{ border-bottom: none; }
.row:nth-of-type(1){ animation-delay: 0.5s; }
.row:nth-of-type(2){ animation-delay: 0.62s; }
.row:nth-of-type(3){ animation-delay: 0.74s; }
.row:nth-of-type(4){ animation-delay: 0.86s; }
.row:nth-of-type(5){ animation-delay: 0.98s; }
.row:nth-of-type(6){ animation-delay: 1.1s; }
.row:nth-of-type(7){ animation-delay: 1.22s; }
.board-standalone .row.row-standalone{ animation-delay: 1.46s; }

.row::before{
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--amber-dim);
  transition: background 0.25s ease, width 0.25s ease;
}
.row:hover{ background: var(--panel-2); }
.row:hover::before{ background: var(--amber); width: 4px; }

.row-index{
  font-family: var(--font-mono); font-size: 13px; color: var(--text-faint);
  letter-spacing: 0.05em;
}
.row:hover .row-index{ color: var(--amber); }

.row-icon{
  width: 30px; height: 30px;
  transition: filter 0.25s ease, transform 0.25s ease;
  filter: brightness(1);
}
.row:hover .row-icon{ filter: brightness(1) sepia(1) saturate(4) hue-rotate(-10deg) brightness(1.15); transform: scale(1.06); }

.row-title{
  font-family: var(--font-display); font-weight: 600; font-size: 17px;
  letter-spacing: 0.01em; color: var(--text);
}
.row-desc{
  font-size: 13.5px; color: var(--text-muted); margin-top: 4px; max-width: 480px;
}

.row-status{
  justify-self: end;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em;
  color: var(--green); border: 1px solid rgba(63,174,106,0.35);
  background: rgba(63,174,106,0.08);
  padding: 4px 10px; border-radius: 20px;
  white-space: nowrap;
}
.row-status::before{
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--green);
}

.row-arrow{
  color: var(--text-faint); transition: transform 0.25s ease, color 0.25s ease;
  justify-self: end;
}
.row:hover .row-arrow{ color: var(--amber); transform: translateX(4px); }

/* ---------------------------------------------------------------- */
/* Footer                                                            */
/* ---------------------------------------------------------------- */
footer{
  position: relative; z-index: 2;
  padding: 26px clamp(20px, 5vw, 56px) 40px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 10px;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--text-faint);
  letter-spacing: 0.04em;
  border-top: 1px solid var(--border-soft);
  max-width: 1100px;
  margin: 0 auto;
}

/* ---------------------------------------------------------------- */
/* Responsive                                                        */
/* ---------------------------------------------------------------- */
@media (max-width: 720px){
  .board-head{ display: none; }
  .board-standalone .board-head{ display: block; padding: 12px 20px; }
  .board-standalone .board-head span{ display: none; }
  .board-standalone .board-head span:nth-child(3){ display: inline; }
  .row{
    grid-template-columns: 32px 1fr 26px;
    grid-template-areas:
      "icon title arrow"
      "icon desc arrow"
      "index status status";
    row-gap: 6px;
  }
  .row-index{ grid-area: index; margin-top: 8px; }
  .row-icon{ grid-area: icon; width: 24px; height: 24px; }
  .row-title{ grid-area: title; }
  .row-desc{ grid-area: desc; }
  .row-status{ grid-area: status; justify-self: start; margin-top: 8px; }
  .row-arrow{ grid-area: arrow; }
}

@media (prefers-reduced-motion: reduce){
  .radar-sweep{ animation: none; }
  .eyebrow, h1, .hero p, .row{ animation: none; opacity: 1; }
}

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