:root {
  --bg: #061425;
  --bg-deep: #04101d;
  --panel: #0b2037;
  --panel-light: #102b48;

  --blue: #087cff;
  --cyan: #10b8dd;
  --purple: #633cc7;

  --text: #ffffff;
  --muted: #9eafc3;
  --line: rgba(255, 255, 255, 0.08);

  --radius: 18px;
  --nav-height: 72px;
}


/* --------------------------------------------------
   RESET
-------------------------------------------------- */

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;

  background:
    radial-gradient(
      circle at top right,
      rgba(0, 147, 255, 0.12),
      transparent 30%
    ),
    linear-gradient(
      180deg,
      #07182b 0%,
      var(--bg) 35%,
      var(--bg-deep) 100%
    );

  color: var(--text);

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

  -webkit-font-smoothing: antialiased;
}


/* --------------------------------------------------
   APP
-------------------------------------------------- */

.app {
  width: 100%;
  max-width: 520px;

  margin: 0 auto;

  padding:
    calc(18px + env(safe-area-inset-top))
    16px
    calc(var(--nav-height) + 35px + env(safe-area-inset-bottom));
}


/* --------------------------------------------------
   HEADER
-------------------------------------------------- */

.home-header {
  padding: 6px 4px 20px;
}

.eyebrow {
  margin: 0 0 6px;

  color: #67d7ef;

  font-size: 12px;
  font-weight: 750;

  letter-spacing: 0.09em;
}

h1 {
  margin: 0;

  font-size: 32px;
  line-height: 1.05;

  letter-spacing: -1.2px;
}

.subtitle {
  margin: 6px 0 0;

  color: var(--muted);

  font-size: 14px;
  font-weight: 500;
}


/* --------------------------------------------------
   COUNTDOWN
-------------------------------------------------- */

.countdown-card {
  display: grid;

  grid-template-columns:
    50px
    minmax(0, 1fr)
    18px;

  align-items: center;

  gap: 12px;

  min-height: 104px;

  padding: 17px;

  margin-bottom: 12px;

  border: 1px solid rgba(25, 170, 255, 0.34);

  border-radius: 22px;

  background:
    linear-gradient(
      135deg,
      rgba(9, 89, 151, 0.68),
      rgba(7, 39, 69, 0.95)
    );

  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.countdown-icon {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 50px;
  height: 50px;

  border-radius: 15px;

  background: rgba(0, 119, 255, 0.24);

  font-size: 26px;
}

.countdown-content {
  min-width: 0;
}

.countdown-number {
  margin-bottom: 3px;

  font-size: 22px;
  line-height: 1.08;

  font-weight: 760;

  letter-spacing: -0.5px;
}

.countdown-label {
  color: #e5eef7;

  font-size: 13px;
  font-weight: 600;
}

.countdown-date {
  margin-top: 3px;

  color: var(--muted);

  font-size: 11px;
}

.chevron {
  color: rgba(255, 255, 255, 0.68);

  font-size: 28px;
  font-weight: 300;
}


/* --------------------------------------------------
   UP NEXT
-------------------------------------------------- */

.up-next-card {
  display: grid;

  grid-template-columns:
    50px
    minmax(0, 1fr)
    18px;

  align-items: center;

  gap: 12px;

  min-height: 108px;

  padding: 16px;

  margin-bottom: 14px;

  border: 1px solid rgba(0, 174, 255, 0.68);

  border-radius: 20px;

  background:
    linear-gradient(
      135deg,
      rgba(9, 65, 111, 0.95),
      rgba(8, 35, 61, 0.96)
    );

  box-shadow:
    0 10px 25px rgba(0, 0, 0, 0.18);
}

.up-next-icon {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 50px;
  height: 50px;

  border-radius: 15px;

  background: #075fb6;

  font-size: 25px;
}

.up-next-content {
  min-width: 0;
}

.small-label {
  margin-bottom: 2px;

  color: #8ba6bd;

  font-size: 10px;
  font-weight: 700;

  letter-spacing: 0.06em;
}

.up-next-title {
  font-size: 18px;
  line-height: 1.1;

  font-weight: 750;
}

.up-next-date {
  margin-top: 4px;

  color: #c3d1df;

  font-size: 12px;
}

.up-next-note {
  margin-top: 3px;

  color: #8fa8bd;

  font-size: 11px;
}


/* --------------------------------------------------
   HOME GRIDS
-------------------------------------------------- */

.home-grid {
  display: grid;

  gap: 9px;
}

.main-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.utility-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));

  margin-top: 9px;
}


/* --------------------------------------------------
   HOME TILES
-------------------------------------------------- */

.home-tile {
  appearance: none;

  width: 100%;

  border: 0;
  border-radius: var(--radius);

  color: var(--text);

  font: inherit;

  cursor: pointer;

  display: flex;
  flex-direction: column;

  align-items: center;
  justify-content: center;

  gap: 9px;

  min-height: 92px;

  padding: 14px 10px;

  background:
    linear-gradient(
      145deg,
      #0d355d,
      #0a2744
    );

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 7px 18px rgba(0, 0, 0, 0.14);

  transition:
    transform 0.12s ease,
    filter 0.12s ease;
}

.home-tile:active {
  transform: scale(0.97);

  filter: brightness(1.12);
}

.tile-icon {
  display: block;

  font-size: 25px;
  line-height: 1;
}

.tile-title {
  display: block;

  font-size: 13px;
  line-height: 1.15;

  font-weight: 700;

  text-align: center;
}


/* --------------------------------------------------
   FEATURE TILE COLOURS
-------------------------------------------------- */

.plans-tile {
  background:
    linear-gradient(
      145deg,
      #086cd4,
      #064a9d
    );
}

.upcoming-tile {
  background:
    linear-gradient(
      145deg,
      #087da6,
      #075779
    );
}

.arvia-tile {
  background:
    linear-gradient(
      145deg,
      #643ac3,
      #3f2688
    );
}

.directions-tile {
  background:
    linear-gradient(
      145deg,
      #15599d,
      #0b3768
    );
}

.toilet-tile {
  background:
    linear-gradient(
      145deg,
      #08689b,
      #08466b
    );
}

.decks-tile {
  background:
    linear-gradient(
      145deg,
      #116487,
      #0a415e
    );
}


/* --------------------------------------------------
   SMALL UTILITY TILES
-------------------------------------------------- */

.small-tile {
  min-height: 76px;

  gap: 7px;

  padding: 10px 5px;

  border-radius: 16px;

  background:
    linear-gradient(
      145deg,
      #0d416c,
      #092d4d
    );
}

.small-tile .tile-icon {
  font-size: 22px;
}

.small-tile .tile-title {
  font-size: 11px;
}


/* --------------------------------------------------
   DATA STATUS
-------------------------------------------------- */

.data-status {
  padding: 16px 0 5px;

  color: rgba(158, 175, 195, 0.55);

  font-size: 9px;

  text-align: center;
}


/* --------------------------------------------------
   BOTTOM NAVIGATION
-------------------------------------------------- */

.bottom-nav {
  position: fixed;

  left: 0;
  right: 0;
  bottom: 0;

  z-index: 100;

  display: grid;

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

  height:
    calc(
      var(--nav-height) +
      env(safe-area-inset-bottom)
    );

  padding:
    8px
    max(12px, env(safe-area-inset-right))
    env(safe-area-inset-bottom)
    max(12px, env(safe-area-inset-left));

  border-top: 1px solid var(--line);

  background:
    rgba(4, 16, 29, 0.94);

  backdrop-filter: blur(20px);

  -webkit-backdrop-filter: blur(20px);
}

.nav-item {
  appearance: none;

  border: 0;

  background: transparent;

  color: #8495a8;

  font: inherit;

  display: flex;
  flex-direction: column;

  align-items: center;
  justify-content: center;

  gap: 3px;

  min-width: 0;

  font-size: 10px;

  cursor: pointer;
}

.nav-icon {
  display: block;

  min-height: 22px;

  font-size: 21px;
  line-height: 21px;
}

.nav-item.active {
  color: #16baff;

  font-weight: 700;
}


/* --------------------------------------------------
   LARGER PHONES
-------------------------------------------------- */

@media (min-width: 430px) {

  .app {
    padding-left: 20px;
    padding-right: 20px;
  }

  .home-tile {
    min-height: 98px;
  }

  .small-tile {
    min-height: 80px;
  }
}


/* --------------------------------------------------
   SMALLER PHONES
-------------------------------------------------- */

@media (max-width: 360px) {

  .app {
    padding-left: 12px;
    padding-right: 12px;
  }

  h1 {
    font-size: 29px;
  }

  .countdown-number {
    font-size: 19px;
  }

  .countdown-card,
  .up-next-card {
    grid-template-columns:
      44px
      minmax(0, 1fr)
      14px;
  }

  .countdown-icon,
  .up-next-icon {
    width: 44px;
    height: 44px;

    font-size: 22px;
  }

  .tile-title {
    font-size: 12px;
  }
}
