:root {
  --bg: #050505;
  --text: #f3f3ef;
  --muted: #8a8a84;
  --line: #292925;
  --soft-line: #1c1c19;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;

  background: var(--bg);
  color: var(--text);

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Display",
    "Helvetica Neue",
    Arial,
    sans-serif;
}

body {
  min-height: 100dvh;
}


/* ================================
   GRID
================================ */

.dashboard {
  height: calc(100dvh - 58px);

  display: grid;

  grid-template-columns:
    1fr 1fr;

  grid-template-rows:
    1fr 1fr;
}

.panel {
  position: relative;

  min-width: 0;
  min-height: 0;

  padding:
    clamp(24px, 2.6vw, 46px);

  overflow: hidden;
}

.panel:nth-child(1),
.panel:nth-child(3) {
  border-right:
    1px solid var(--line);
}

.panel:nth-child(1),
.panel:nth-child(2) {
  border-bottom:
    1px solid var(--line);
}


/* ================================
   COMMON
================================ */

.eyebrow {
  color: var(--muted);

  font-size:
    clamp(10px, .72vw, 13px);

  font-weight: 700;

  letter-spacing: .24em;
}

.panel-top {
  display: flex;

  justify-content:
    space-between;

  align-items:
    flex-start;

  gap: 24px;
}

.status {
  color: var(--muted);

  font-size:
    clamp(9px, .68vw, 12px);

  font-weight: 700;

  letter-spacing: .22em;
}


/* ================================
   CLOCK
================================ */

.time-panel {
  display: flex;

  flex-direction: column;

  justify-content:
    space-between;
}

.clock {
  margin-top: auto;

  font-size:
    clamp(100px, 13vw, 220px);

  font-weight: 650;

  line-height: .82;

  letter-spacing: -.075em;

  font-variant-numeric:
    tabular-nums;
}

.date {
  margin-top:
    clamp(24px, 3vh, 42px);

  color: var(--muted);

  font-size:
    clamp(13px, 1vw, 18px);

  font-weight: 650;

  letter-spacing: .17em;
}


/* ================================
   WEATHER
================================ */

.weather-panel {
  display: flex;

  flex-direction: column;
}

.weather-main {
  margin-top: auto;

  margin-bottom:
    clamp(10px, 3vh, 40px);
}

.temperature {
  font-size:
    clamp(100px, 12vw, 200px);

  font-weight: 650;

  line-height: .78;

  letter-spacing: -.065em;
}

.condition {
  margin-top:
    clamp(20px, 2.5vh, 36px);

  font-size:
    clamp(22px, 2vw, 38px);

  font-weight: 650;

  letter-spacing: -.025em;
}

.weather-details {
  display: flex;

  gap:
    clamp(32px, 4vw, 80px);

  margin-top:
    clamp(22px, 3vh, 40px);

  color: var(--muted);

  font-size:
    clamp(10px, .8vw, 14px);

  font-weight: 700;

  letter-spacing: .16em;
}

.weather-details strong {
  margin-left: 8px;

  color: var(--text);

  font-weight: 650;

  letter-spacing: 0;
}


/* ================================
   TRANSIT
================================ */

.transit-panel {
  display: flex;

  flex-direction: column;
}

.transit-panel h2 {
  margin:
    clamp(12px, 1.4vh, 20px)
    0
    0;

  font-size:
    clamp(34px, 3.4vw, 58px);

  line-height: .95;

  letter-spacing: -.045em;
}

.direction {
  display: flex;

  flex-direction: column;

  align-items: flex-end;

  gap: 14px;

  color: var(--muted);

  font-size:
    clamp(10px, .75vw, 13px);

  font-weight: 700;

  letter-spacing: .2em;
}

.departures {
  display: grid;

  grid-template-rows:
    repeat(4, 1fr);

  flex: 1;

  margin-top:
    clamp(18px, 2vh, 28px);

  border-top:
    1px solid #41413c;
}

.departure {
  min-height: 0;

  display: flex;

  align-items: center;

  justify-content:
    space-between;

  gap: 20px;

  border-bottom:
    1px solid var(--soft-line);
}

.destination {
  min-width: 0;

  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;

  font-size:
    clamp(19px, 1.8vw, 32px);

  font-weight: 600;

  letter-spacing: -.025em;
}

.eta {
  flex: 0 0 auto;

  font-size:
    clamp(22px, 2.2vw, 38px);

  font-weight: 650;

  letter-spacing: -.04em;

  font-variant-numeric:
    tabular-nums;
}

.eta small {
  margin-left: 7px;

  color: var(--muted);

  font-size: .38em;

  letter-spacing: .12em;
}

.empty {
  color: #50504c;
}


/* ================================
   NEWS TICKER
================================ */

.ticker {
  height: 58px;

  display: grid;

  grid-template-columns:
    110px 1fr 110px;

  align-items: center;

  border-top:
    1px solid #41413c;

  overflow: hidden;
}

.ticker-label {
  padding-left: 28px;

  font-size: 10px;

  font-weight: 700;

  letter-spacing: .22em;
}

.ticker-window {
  min-width: 0;

  overflow: hidden;
}

.ticker-track {
  width: max-content;

  white-space: nowrap;

  font-size:
    clamp(13px, .95vw, 17px);

  font-weight: 550;

  animation:
    ticker 80s linear infinite;
}

.ticker-status {
  padding-right: 28px;

  text-align: right;

  color: var(--muted);

  font-size: 10px;

  font-weight: 700;

  letter-spacing: .18em;
}

.news-source {
  margin-right: 14px;

  color: var(--muted);

  font-size: .72em;

  font-weight: 700;

  letter-spacing: .18em;
}

.news-separator {
  display: inline-block;

  margin: 0 36px;

  color: #4d4d48;
}

@keyframes ticker {
  from {
    transform:
      translateX(0);
  }

  to {
    transform:
      translateX(-50%);
  }
}


/* ================================
   TABLET LANDSCAPE
================================ */

@media (
  max-width: 1200px
) {

  .panel {
    padding: 28px;
  }

  .clock {
    font-size: 15vw;
  }

  .temperature {
    font-size: 14vw;
  }
}


/* ================================
   PORTRAIT
================================ */

@media (
  orientation: portrait
) {

  html,
  body {
    overflow: auto;
  }

  .dashboard {
    height: auto;

    min-height:
      calc(100dvh - 52px);

    grid-template-columns: 1fr;

    grid-template-rows:
      42vh
      36vh
      42vh
      42vh;
  }

  .panel {
    border-right: 0 !important;

    border-bottom:
      1px solid var(--line);
  }

  .clock {
    font-size: 26vw;
  }

  .temperature {
    font-size: 25vw;
  }

  .ticker {
    position: sticky;

    bottom: 0;

    height: 52px;

    grid-template-columns:
      80px 1fr 80px;

    background: var(--bg);
  }

}
