:root {
  --ink: #101716;
  --ink-soft: #263230;
  --paper: #f3f6f4;
  --white: #fcfdfc;
  --muted: #65716e;
  --line: #cfd7d4;
  --teal: #2d6965;
  --coral: #d85f49;
  --gold: #d1a33a;
  --content: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: absolute;
  z-index: 10;
  top: 0;
  left: 50%;
  width: min(calc(100% - 48px), var(--content));
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-mark {
  position: relative;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.brand-mark::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -1px;
  width: 1px;
  height: 22px;
  background: currentColor;
}

.site-header nav {
  display: flex;
  gap: 30px;
  font-size: 14px;
}

.site-header nav a {
  color: rgba(255, 255, 255, 0.82);
}

.site-header nav a:hover,
.site-header nav a:focus-visible {
  color: var(--white);
}

.hero {
  position: relative;
  min-height: 560px;
  height: 82svh;
  max-height: 760px;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--white);
  background-color: #050706;
  background-image: url("/assets/earth.jpg");
  background-repeat: no-repeat;
  background-position: center 43%;
  background-size: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 7, 0.42);
}

.hero-content,
.local-clock {
  z-index: 1;
}

.hero-content {
  width: min(calc(100% - 48px), var(--content));
  margin: 34px auto 0;
}

.eyebrow {
  margin: 0 0 14px;
  color: #d8b85f;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

.eyebrow.light {
  color: #84b9b4;
}

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

h1,
h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  font-size: clamp(64px, 10vw, 132px);
  line-height: 0.88;
}

.hero-copy {
  max-width: 520px;
  margin: 26px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

.local-clock {
  position: absolute;
  right: max(24px, calc((100% - var(--content)) / 2));
  bottom: 34px;
  width: min(430px, calc(100% - 48px));
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-top: 17px;
  border-top: 1px solid rgba(255, 255, 255, 0.48);
}

.clock-label {
  display: block;
  margin-bottom: 3px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  text-transform: uppercase;
}

#local-time {
  display: block;
  min-width: 182px;
  font-variant-numeric: tabular-nums;
  font-size: 30px;
  line-height: 1.1;
}

.local-date {
  max-width: 180px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
  text-align: right;
}

.clock-section {
  width: min(calc(100% - 48px), var(--content));
  margin: 0 auto;
  padding: 86px 0 104px;
}

.section-heading {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 64px;
  align-items: end;
  margin-bottom: 44px;
}

.section-heading h2,
.about-section h2 {
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1;
}

.section-heading > p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
}

.clock-tools {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.search-field {
  width: min(360px, 100%);
  height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.search-field:focus-within {
  border-color: var(--teal);
  outline: 3px solid rgba(45, 105, 101, 0.14);
}

.search-field svg {
  flex: 0 0 auto;
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-width: 1.7;
}

.search-field input {
  min-width: 0;
  width: 100%;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
}

.search-field input::placeholder {
  color: #89928f;
}

.region-filter {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  background: #e3e9e6;
  border-radius: 6px;
}

.region-filter button {
  min-height: 36px;
  padding: 0 13px;
  color: #4f5c59;
  background: transparent;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}

.region-filter button:hover {
  color: var(--ink);
}

.region-filter button.active {
  color: var(--white);
  background: var(--ink-soft);
}

.clock-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.city-card {
  min-width: 0;
  min-height: 182px;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.city-card:nth-child(4n + 1) {
  border-top: 3px solid var(--teal);
}

.city-card:nth-child(4n + 2) {
  border-top: 3px solid var(--coral);
}

.city-card:nth-child(4n + 3) {
  border-top: 3px solid var(--gold);
}

.city-card:nth-child(4n) {
  border-top: 3px solid var(--ink-soft);
}

.city-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.city-name {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.city-code {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.city-time {
  margin: 25px 0 8px;
  font-size: clamp(30px, 3.1vw, 42px);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.city-meta {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.empty-state {
  padding: 52px 0;
  color: var(--muted);
  text-align: center;
}

.about-section {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 80px;
  align-items: end;
  padding: 88px max(24px, calc((100% - var(--content)) / 2));
  color: var(--white);
  background: var(--ink-soft);
  border-left: 8px solid var(--coral);
}

.about-section > p {
  max-width: 500px;
  margin: 0;
  color: #b9c5c1;
}

footer {
  min-height: 130px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 30px;
  padding: 28px max(24px, calc((100% - var(--content)) / 2));
  color: #d5dcd9;
  background: var(--ink);
  font-size: 12px;
}

footer p {
  margin: 0;
}

footer p:last-child {
  text-align: right;
}

.footer-brand {
  color: var(--white);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

@media (max-width: 920px) {
  .clock-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .clock-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .search-field {
    width: 100%;
  }

  .region-filter {
    width: fit-content;
    max-width: 100%;
    overflow-x: auto;
  }
}

@media (max-width: 680px) {
  .site-header {
    width: calc(100% - 32px);
    height: 66px;
  }

  .site-header nav {
    gap: 16px;
  }

  .site-header nav a:last-child {
    display: none;
  }

  .hero {
    min-height: 560px;
    height: 82svh;
    max-height: 690px;
    background-position: 57% center;
  }

  .hero-content {
    width: calc(100% - 32px);
    margin-top: 0;
  }

  h1 {
    font-size: clamp(60px, 20vw, 92px);
  }

  .hero-copy {
    max-width: 330px;
    font-size: 16px;
  }

  .local-clock {
    right: 16px;
    bottom: 24px;
    width: calc(100% - 32px);
  }

  #local-time {
    min-width: 0;
    font-size: 25px;
  }

  .local-date {
    max-width: 136px;
    font-size: 12px;
  }

  .clock-section {
    width: calc(100% - 32px);
    padding: 66px 0 76px;
  }

  .section-heading,
  .about-section {
    grid-template-columns: 1fr;
    gap: 26px;
  }

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

  .section-heading h2,
  .about-section h2 {
    font-size: 44px;
  }

  .region-filter {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
  }

  .region-filter button {
    white-space: nowrap;
  }

  .clock-grid {
    grid-template-columns: 1fr;
  }

  .city-card {
    min-height: 164px;
  }

  .city-time {
    font-size: 38px;
  }

  .about-section {
    padding-top: 68px;
    padding-bottom: 68px;
  }

  footer {
    grid-template-columns: 1fr;
    gap: 18px;
    padding-top: 40px;
    padding-bottom: 40px;
  }

  footer p:last-child {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
