@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@600;700;800&display=swap');

:root {
  color-scheme: light;
  --ink: #102a43;
  --ink-soft: #486581;
  --muted: #829ab1;
  --paper: #f4f7f5;
  --card: #ffffff;
  --line: #dce6e2;
  --teal: #1f7a6c;
  --teal-dark: #155e54;
  --mint: #b9e4d8;
  --lime: #d9ecb4;
  --orange: #f0a868;
  --shadow: 0 20px 55px rgba(16, 42, 67, 0.09);
  --radius: 28px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 0 32%, rgba(185, 228, 216, 0.35), transparent 30rem),
    var(--paper);
  color: var(--ink);
  font-family: "DM Sans", system-ui, sans-serif;
  line-height: 1.5;
}

a { color: inherit; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  padding: .75rem 1rem;
  background: #fff;
  border-radius: .75rem;
  box-shadow: var(--shadow);
}

.skip-link:focus { top: 1rem; }

.page-shell { overflow: hidden; }

.hero {
  position: relative;
  isolation: isolate;
  min-height: 580px;
  overflow: hidden;
  padding: 2rem max(5vw, 2rem) 5rem;
  background:
    linear-gradient(125deg, rgba(12, 46, 62, .98), rgba(17, 73, 75, .96)),
    var(--ink);
  color: #fff;
}

.hero::before {
  content: "";
  position: absolute;
  inset: auto -8rem -14rem auto;
  z-index: -2;
  width: 42rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--lime), #72b8a5 42%, #1f6f69 70%);
  opacity: .92;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 6.8rem 9vw auto auto;
  z-index: -1;
  width: clamp(15rem, 30vw, 28rem);
  aspect-ratio: 1;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 50%;
  box-shadow: 0 0 0 3rem rgba(255,255,255,.025), 0 0 0 7rem rgba(255,255,255,.018);
}

.brand-row {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1440px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  gap: .8rem;
  align-items: center;
  color: #fff;
  font: 700 1.05rem "Manrope", sans-serif;
  text-decoration: none;
  letter-spacing: -.01em;
}

.brand-mark {
  display: grid;
  width: 2.55rem;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 50%;
  background: rgba(255,255,255,.09);
  color: var(--lime);
  font-size: 1.35rem;
}

.current-time {
  display: grid;
  text-align: right;
  color: rgba(255,255,255,.65);
  font-size: .8rem;
  text-transform: capitalize;
}

.current-time #clock {
  color: #fff;
  font: 700 1.35rem "Manrope", sans-serif;
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(680px, 66vw);
  max-width: 1440px;
  margin: clamp(5rem, 11vh, 8rem) auto 0;
}

.eyebrow, .widget-kicker {
  margin: 0 0 .7rem;
  color: var(--mint);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.eyebrow.dark, .widget-kicker { color: var(--teal); }

.hero h1 {
  max-width: 760px;
  margin: 0;
  font: 800 clamp(3.6rem, 8vw, 7.4rem)/.93 "Manrope", sans-serif;
  letter-spacing: -.07em;
}

.hero h1 span { color: var(--lime); }

.hero-intro {
  max-width: 540px;
  margin: 1.75rem 0 2rem;
  color: rgba(255,255,255,.72);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
}

.primary-action, .route-action {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-width: 215px;
  padding: .95rem 1.1rem .95rem 1.25rem;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}

.primary-action:hover, .route-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0,0,0,.16);
}

.primary-action span, .route-action span {
  display: grid;
  width: 2rem;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: rgba(16,42,67,.1);
}

.hero-orbit {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.orbit-one {
  right: 21vw;
  bottom: 9.5rem;
  width: 1rem;
  aspect-ratio: 1;
  background: var(--orange);
  box-shadow: 0 0 0 .65rem rgba(240,168,104,.12);
}

.orbit-two {
  right: 8vw;
  top: 8rem;
  width: .65rem;
  aspect-ratio: 1;
  background: var(--mint);
}

main {
  width: min(1440px, calc(100% - max(4vw, 2rem)));
  margin: 0 auto;
}

.section-block { padding: clamp(3.5rem, 7vw, 6.5rem) 0 2.5rem; }

.section-heading, .widget-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
}

.section-heading { margin-bottom: 1.5rem; }

.section-heading h2, .widget-heading h2, dialog h2 {
  margin: 0;
  font: 700 clamp(1.45rem, 2vw, 2rem) "Manrope", sans-serif;
  letter-spacing: -.035em;
}

.text-button, .small-action {
  border: 0;
  background: none;
  color: var(--teal-dark);
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
}

.text-button:hover, .small-action:hover { text-decoration: underline; }

.quick-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.quick-link {
  position: relative;
  display: flex;
  min-height: 112px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,.74);
  color: var(--ink);
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.quick-link:hover {
  transform: translateY(-3px);
  border-color: var(--mint);
  background: #fff;
}

.quick-link-icon {
  display: grid;
  flex: 0 0 auto;
  width: 2.7rem;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 14px;
  background: var(--mint);
  color: var(--teal-dark);
  font: 700 1.05rem "Manrope", sans-serif;
  text-transform: uppercase;
}

.quick-link strong { display: block; font: 700 1rem "Manrope", sans-serif; }
.quick-link small { color: var(--muted); }
.quick-link-arrow { margin-left: auto; color: var(--teal); font-size: 1.15rem; }

.remove-link {
  position: absolute;
  top: .4rem;
  right: .45rem;
  display: none;
  width: 1.7rem;
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}

.quick-link.custom:hover .remove-link,
.quick-link.custom:focus-within .remove-link { display: grid; place-items: center; }

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.25rem;
  padding: 1.5rem 0 clamp(4rem, 8vw, 8rem);
}

.widget {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(188, 205, 199, .75);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.widget-heading { padding: 1.5rem 1.6rem 1rem; }
.widget-kicker { margin-bottom: .35rem; }
.widget-heading h2 { font-size: 1.35rem; }

.weather-widget { grid-column: span 5; padding-bottom: 1.25rem; background: linear-gradient(145deg, #eef8f4, #fff 60%); }
.market-index-widget { grid-column: span 7; }
.stocks-widget { grid-column: span 7; }
.traffic-widget { grid-column: span 5; }
.route-widget { grid-column: span 12; }

.live-label, .delay-label {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .65rem;
  border-radius: 999px;
  background: #edf5f2;
  color: var(--teal-dark);
  font-size: .68rem;
  font-weight: 700;
  white-space: nowrap;
}

.live-label i { width: .45rem; aspect-ratio: 1; border-radius: 50%; background: #28a879; box-shadow: 0 0 0 .22rem rgba(40,168,121,.14); }
.delay-label { color: var(--ink-soft); }

.loading-state, .error-state { margin: 3.8rem 1.6rem; color: var(--ink-soft); }
.error-state button { border: 0; background: none; color: var(--teal); cursor: pointer; font-weight: 700; }

.weather-now {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.15rem 1.6rem 1.5rem;
}

.weather-symbol {
  display: grid;
  width: clamp(5rem, 10vw, 7rem);
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--lime), var(--mint));
  font-size: 3rem;
}

.weather-now strong { display: block; font: 800 clamp(3rem, 5vw, 5rem)/1 "Manrope", sans-serif; letter-spacing: -.08em; }
.weather-now span:last-child { color: var(--ink-soft); }

.weather-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 1.6rem 1.5rem;
  border-block: 1px solid var(--line);
}

.weather-details div { padding: 1rem .5rem; }
.weather-details div + div { border-left: 1px solid var(--line); }
.weather-details dt { color: var(--muted); font-size: .7rem; text-transform: uppercase; }
.weather-details dd { margin: .2rem 0 0; font-weight: 700; }

.forecast { display: grid; grid-template-columns: repeat(4, 1fr); gap: .55rem; padding: 0 1.6rem; }
.forecast-day { display: grid; gap: .25rem; padding: .65rem .4rem; border-radius: 14px; text-align: center; }
.forecast-day:first-child { background: rgba(185,228,216,.28); }
.forecast-day small { color: var(--muted); text-transform: capitalize; }
.forecast-day span { font-size: 1.25rem; }
.forecast-day strong { font-size: .85rem; }

.data-credit { margin: 1rem 1.6rem 0; color: var(--muted); font-size: .68rem; }

.market-chart { height: 405px; padding: 0 .5rem .5rem; }
.stock-list { height: 560px; }

.map-heading { align-items: center; }
.small-action { font-size: .74rem; }
.traffic-map { display: block; width: 100%; height: 490px; border: 0; filter: saturate(.8) contrast(.95); }
.map-note { margin: 0; padding: .85rem 1.6rem 1.2rem; color: var(--muted); font-size: .74rem; }

.route-widget { display: grid; grid-template-columns: 1.15fr 1fr; padding: .5rem; }
.route-widget .widget-heading { grid-column: 1; grid-row: 1; }

.route-tabs {
  display: flex;
  gap: .4rem;
  grid-column: 2;
  grid-row: 1;
  align-items: center;
  justify-content: flex-end;
  padding: 1rem;
}

.route-tabs button {
  padding: .65rem .9rem;
  border: 0;
  border-radius: 999px;
  background: #edf2ef;
  color: var(--ink-soft);
  cursor: pointer;
  font-weight: 700;
}

.route-tabs button[aria-selected="true"] { background: var(--ink); color: #fff; }

.route-summary {
  grid-column: 1;
  grid-row: 2;
  padding: 1.6rem;
  border-radius: 23px;
  background: var(--paper);
}

.route-line { display: flex; align-items: center; margin: 0 .3rem 1rem; }
.route-line i { width: .7rem; aspect-ratio: 1; border: 3px solid var(--teal); border-radius: 50%; background: #fff; }
.route-line span { flex: 1; height: 2px; background: repeating-linear-gradient(90deg, var(--teal), var(--teal) 8px, transparent 8px, transparent 14px); }
.route-places { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: end; }
.route-places div:last-child { text-align: right; }
.route-places small { display: block; color: var(--muted); }
.route-places strong { font: 700 clamp(1.1rem, 2vw, 1.55rem) "Manrope", sans-serif; }
.route-arrow { color: var(--teal); }

.route-action {
  align-self: center;
  grid-column: 2;
  grid-row: 2;
  margin: 2rem;
  background: var(--ink);
  color: #fff;
}

.route-action + .map-note { grid-column: 2; grid-row: 2; align-self: end; margin: 0 1rem; text-align: center; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  width: min(1440px, calc(100% - max(4vw, 2rem)));
  margin: 0 auto;
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .78rem;
}

dialog {
  width: min(470px, calc(100% - 2rem));
  padding: 0;
  border: 0;
  border-radius: 24px;
  box-shadow: 0 30px 100px rgba(16,42,67,.3);
}

dialog::backdrop { background: rgba(16,42,67,.55); backdrop-filter: blur(5px); }
dialog form { display: grid; gap: 1rem; padding: 1.5rem; }
.dialog-heading { display: flex; justify-content: space-between; align-items: start; }
.icon-button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 1.6rem; }
dialog label { display: grid; gap: .35rem; color: var(--ink-soft); font-size: .78rem; font-weight: 700; }
dialog input { width: 100%; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 12px; outline: none; }
dialog input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(31,122,108,.12); }
.dialog-actions { display: flex; justify-content: flex-end; gap: .65rem; margin-top: .5rem; }
.primary-button, .secondary-button { padding: .75rem 1rem; border: 0; border-radius: 999px; cursor: pointer; font-weight: 700; }
.primary-button { background: var(--ink); color: #fff; }
.secondary-button { background: #edf2ef; color: var(--ink-soft); }

@media (max-width: 1020px) {
  .quick-links { grid-template-columns: repeat(2, 1fr); }
  .weather-widget, .market-index-widget, .stocks-widget, .traffic-widget { grid-column: span 6; }
  .route-widget { grid-template-columns: 1fr; }
  .route-widget .widget-heading, .route-tabs, .route-summary, .route-action, .route-action + .map-note { grid-column: 1; }
  .route-widget .widget-heading { grid-row: 1; }
  .route-tabs { grid-row: 2; justify-content: flex-start; }
  .route-summary { grid-row: 3; }
  .route-action { grid-row: 4; margin: 1.25rem 1.5rem 2.7rem; }
  .route-action + .map-note { grid-row: 4; }
}

@media (max-width: 760px) {
  .hero { min-height: 650px; padding-inline: 1.25rem; }
  .hero::before { right: -15rem; bottom: -11rem; width: 36rem; opacity: .65; }
  .hero::after { right: -8rem; top: 11rem; }
  .hero-copy { width: 100%; margin-top: 6.5rem; }
  .hero h1 { font-size: clamp(3.1rem, 16vw, 5rem); }
  main, footer { width: min(100% - 1.5rem, 1440px); }
  .section-heading { align-items: center; }
  .quick-links { grid-template-columns: 1fr; }
  .quick-link { min-height: 90px; }
  .weather-widget, .market-index-widget, .stocks-widget, .traffic-widget, .route-widget { grid-column: 1 / -1; }
  .market-chart { height: 380px; }
  .stock-list { height: 520px; }
  .traffic-map { height: 400px; }
  footer { flex-direction: column; gap: .35rem; }
}

@media (max-width: 480px) {
  .brand-row { align-items: flex-start; }
  .current-time #clock { font-size: 1.05rem; }
  .hero { min-height: 610px; }
  .hero-copy { margin-top: 5rem; }
  .section-heading { align-items: flex-end; }
  .text-button { max-width: 100px; text-align: right; }
  .weather-details { margin-inline: 1rem; }
  .forecast { padding-inline: 1rem; }
  .widget-heading { padding-inline: 1.2rem; }
  .route-tabs { display: grid; grid-template-columns: 1fr 1fr; }
  .route-tabs button { padding-inline: .55rem; font-size: .75rem; }
  .route-places { gap: .4rem; }
}

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