:root {
  --ink: #f7fbff;
  --paper: #0d141c;
  --panel: #151f2b;
  --panel-strong: #1d2a38;
  --muted: #a7b7c6;
  --line: rgba(255, 255, 255, 0.12);
  --blue: #62b6ff;
  --green: #50d9a4;
  --amber: #ffc857;
  --red: #ff6b6b;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 12%, rgba(98, 182, 255, 0.18), transparent 34rem),
    radial-gradient(circle at 88% 8%, rgba(80, 217, 164, 0.16), transparent 30rem),
    linear-gradient(145deg, #0d141c 0%, #101923 48%, #0a1017 100%);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a,
button,
select {
  font: inherit;
}

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

button,
select {
  color: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px clamp(18px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: rgba(13, 20, 28, 0.86);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 850;
}

.brand-mark {
  position: relative;
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(98, 182, 255, 0.24), rgba(80, 217, 164, 0.2));
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 13px;
  border-radius: 99px;
  background: var(--ink);
  content: "";
  transform-origin: 50% 100%;
}

.brand-mark::before {
  transform: translate(-50%, -100%) rotate(28deg);
}

.brand-mark::after {
  height: 9px;
  transform: translate(-50%, -100%) rotate(105deg);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 750;
}

.site-nav a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.menu-lines,
.menu-lines::before,
.menu-lines::after {
  display: block;
  width: 18px;
  height: 2px;
  margin: auto;
  border-radius: 999px;
  background: var(--ink);
  content: "";
}

.menu-lines::before {
  transform: translateY(-6px);
}

.menu-lines::after {
  transform: translateY(4px);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(290px, 0.88fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: stretch;
  min-height: calc(100vh - 72px);
  padding: clamp(28px, 5vw, 72px) clamp(18px, 5vw, 72px) 34px;
}

.hero-panel,
.focus-clock,
.clock-card,
.clock-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(21, 31, 43, 0.82);
  box-shadow: var(--shadow);
}

.hero-panel {
  display: flex;
  min-height: 540px;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 5vw, 56px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
}

h1 {
  font-variant-numeric: tabular-nums;
  font-size: clamp(3.35rem, 11vw, 9rem);
  letter-spacing: 0;
}

h2 {
  max-width: 860px;
  font-size: clamp(2rem, 5vw, 4.4rem);
}

h3 {
  font-size: 1.18rem;
}

.local-meta,
.clock-card-bottom,
.focus-clock span,
.note {
  color: var(--muted);
}

.local-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 12px;
  font-size: clamp(1rem, 2vw, 1.24rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 34px;
}

.button,
.segment {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  font-weight: 850;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
}

.button.primary {
  color: #07111a;
  background: var(--green);
}

.segmented {
  display: inline-grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.segment {
  padding: 8px 14px;
  background: transparent;
  color: var(--muted);
}

.segment.is-active {
  color: #07111a;
  background: var(--blue);
}

.note {
  max-width: 760px;
  margin: 22px 0 0;
}

.focus-clock {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 22px;
  min-height: 540px;
  padding: clamp(24px, 4vw, 44px);
  text-align: center;
}

.focus-clock strong {
  display: block;
  font-size: 1.45rem;
}

.focus-clock span {
  display: block;
  margin-top: 4px;
}

.section,
.control-section {
  padding: clamp(54px, 8vw, 104px) clamp(18px, 5vw, 72px);
}

.section-heading {
  margin-bottom: 28px;
}

.clock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.clock-card {
  display: grid;
  min-height: 280px;
  gap: 18px;
  padding: 22px;
}

.clock-card-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.clock-card h3 {
  margin-bottom: 6px;
}

.clock-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.icon-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-weight: 900;
}

.icon-button:hover {
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.28);
}

.digital-time {
  font-variant-numeric: tabular-nums;
  font-size: clamp(2.1rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1;
}

.clock-card-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.9rem;
}

.analog-clock {
  position: relative;
  display: none;
  width: min(52vw, 168px);
  aspect-ratio: 1;
  margin: 4px auto;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.18) 0 3px, transparent 4px),
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04));
}

.analog-clock.large {
  display: block;
  width: min(62vw, 340px);
}

.is-analog .clock-card .digital-time {
  display: none;
}

.is-analog .clock-card .analog-clock {
  display: block;
}

.tick {
  position: absolute;
  background: rgba(255, 255, 255, 0.62);
}

.tick.twelve,
.tick.six {
  left: 50%;
  width: 2px;
  height: 12px;
  transform: translateX(-50%);
}

.tick.twelve {
  top: 10px;
}

.tick.six {
  bottom: 10px;
}

.tick.three,
.tick.nine {
  top: 50%;
  width: 12px;
  height: 2px;
  transform: translateY(-50%);
}

.tick.three {
  right: 10px;
}

.tick.nine {
  left: 10px;
}

.hand {
  position: absolute;
  bottom: 50%;
  left: 50%;
  width: 3px;
  border-radius: 99px;
  background: var(--ink);
  transform: translateX(-50%) rotate(0deg);
  transform-origin: 50% 100%;
}

.hand.hour {
  height: 27%;
}

.hand.minute {
  height: 37%;
  background: var(--blue);
}

.hand.second {
  width: 2px;
  height: 42%;
  background: var(--red);
}

.pin {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green);
  transform: translate(-50%, -50%);
}

.control-section {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(300px, 1.05fr);
  gap: clamp(24px, 5vw, 58px);
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
}

.clock-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
  padding: 22px;
}

.clock-form label {
  grid-column: 1 / -1;
  color: var(--muted);
  font-weight: 800;
}

.clock-form select {
  min-height: 50px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101923;
  padding: 0 14px;
}

.links-section {
  padding-top: clamp(44px, 7vw, 86px);
}

.city-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.city-links a {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  font-weight: 750;
}

.city-links a:hover {
  color: var(--ink);
  border-color: rgba(98, 182, 255, 0.5);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 28px clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

@media (max-width: 900px) {
  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .site-nav {
    position: absolute;
    top: 72px;
    right: 18px;
    left: 18px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .hero,
  .control-section {
    grid-template-columns: 1fr;
  }

  .hero,
  .hero-panel,
  .focus-clock {
    min-height: auto;
  }
}

@media (max-width: 560px) {
  .site-header,
  .section,
  .control-section,
  .site-footer,
  .hero {
    padding-right: 16px;
    padding-left: 16px;
  }

  .hero-panel,
  .focus-clock,
  .clock-card,
  .clock-form {
    padding: 18px;
  }

  .hero-actions,
  .site-footer,
  .clock-form {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .button,
  .segmented {
    width: 100%;
  }
}
