:root {
  color-scheme: dark;
  --bg: #030303;
  --surface: #0a0a0b;
  --surface-soft: #111113;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.2);
  --text: #f5f5f0;
  --muted: #a6a6a0;
  --dim: #6d6d68;
  --signal: #e9ff70;
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  background: var(--bg);
}

body {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(115deg, rgba(233, 255, 112, 0.08), transparent 28rem),
    linear-gradient(245deg, rgba(255, 255, 255, 0.06), transparent 34rem),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, #000, transparent 75%);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: nowrap;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 0 clamp(20px, 6vw, 92px);
  width: 100%;
  max-width: 100%;
  border-bottom: 1px solid var(--line);
  background: rgba(3, 3, 3, 0.76);
  backdrop-filter: blur(18px);
}

.brand,
.nav-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-size: 16px;
  font-weight: 760;
}

.brand-mark {
  width: 17px;
  height: 17px;
  border: 2px solid var(--text);
  border-radius: 50%;
  box-shadow: inset 6px 0 0 var(--signal);
}

.nav-links {
  min-width: 0;
  max-width: 100%;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: clamp(18px, 3vw, 36px);
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.nav-links a {
  transition:
    color 160ms ease,
    transform 160ms ease;
}

.nav-links a:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.hero {
  position: relative;
  display: grid;
  min-height: min(760px, calc(100vh - 68px));
  place-items: center;
  padding: clamp(68px, 12vw, 132px) 24px clamp(56px, 9vw, 104px);
  text-align: center;
}

.hero::after {
  position: absolute;
  right: max(24px, 8vw);
  bottom: 52px;
  width: min(34vw, 420px);
  height: 1px;
  background: var(--line-strong);
  content: "";
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  width: 100%;
  min-width: 0;
  justify-items: center;
}

h1 {
  max-width: min(1180px, 100%);
  margin: 0;
  font-size: clamp(58px, 12vw, 156px);
  font-weight: 820;
  line-height: 0.86;
  letter-spacing: 0;
  white-space: nowrap;
}

.lede {
  margin: 24px auto 0;
  color: var(--muted);
  font-size: clamp(18px, 2.2vw, 28px);
  font-weight: 560;
  line-height: 1.2;
}

.hero-actions {
  display: flex;
  justify-content: center;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 760;
  white-space: nowrap;
}

.button-light {
  border: 1px solid #eff2d6;
  background: #f5f7e9;
  color: #11120e;
}

.birthday-counter {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 40px));
  margin: 0 auto 72px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.045), transparent 70%),
    rgba(10, 10, 11, 0.82);
  padding: clamp(24px, 5vw, 42px);
  text-align: center;
}

.counter-label {
  margin: 0;
  color: var(--signal);
  font-size: 12px;
  font-weight: 820;
  text-transform: uppercase;
}

.counter-age {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 3vw, 26px);
  font-weight: 650;
}

.birthday-message {
  margin: 20px 0 0;
  color: var(--text);
  font-size: clamp(28px, 6vw, 54px);
  font-weight: 820;
  line-height: 1;
}

.timer {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.timer-unit {
  display: grid;
  min-width: 0;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  padding: 16px 10px 14px;
}

.timer-value {
  color: var(--text);
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: clamp(28px, 6vw, 52px);
  font-weight: 800;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}

.timer-label {
  color: var(--dim);
  font-size: 11px;
  font-weight: 780;
  text-transform: uppercase;
}

.tools-page {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(56px, 9vw, 104px) 0 72px;
}

.tools-hero {
  display: grid;
  justify-items: center;
  padding: 24px 0 clamp(42px, 7vw, 72px);
  text-align: center;
}

.tools-kicker {
  margin: 0 0 16px;
  color: var(--signal);
  font-size: 12px;
  font-weight: 820;
  text-transform: uppercase;
}

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

.tool-card {
  display: grid;
  min-height: 220px;
  align-content: end;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.045), transparent 70%),
    rgba(10, 10, 11, 0.82);
  padding: 24px;
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

.tool-card:hover {
  border-color: rgba(233, 255, 112, 0.55);
  background:
    linear-gradient(135deg, rgba(233, 255, 112, 0.1), transparent 70%),
    rgba(17, 17, 19, 0.92);
  transform: translateY(-2px);
}

.tool-number {
  color: var(--signal);
  font-size: 12px;
  font-weight: 820;
}

.tool-card h2 {
  margin: 42px 0 10px;
  color: var(--text);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 0.95;
}

.tool-card p {
  max-width: 32ch;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.35;
}

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

@media (max-width: 760px) {
  .site-header {
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    padding: 14px 18px 16px;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding-bottom: 2px;
    font-size: 13px;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-links a {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    padding: 8px 11px;
  }

  .hero {
    min-height: 540px;
    padding: 72px 18px 76px;
  }

  h1 {
    white-space: nowrap;
    max-width: 100%;
  }

  .hero::after {
    right: 24px;
    bottom: 34px;
    width: calc(100% - 48px);
  }

  .birthday-counter {
    width: min(100% - 28px, 760px);
    margin-bottom: 40px;
    padding: 22px 14px;
  }

  .timer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

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

  .tools-page {
    width: min(100% - 28px, 1120px);
    padding-top: 44px;
  }

  .tool-card {
    min-height: 170px;
    padding: 20px;
  }

  .tool-card h2 {
    margin-top: 32px;
  }
}

@media (max-width: 460px) {
  body::before {
    background-size: 52px 52px;
  }

  .brand {
    font-size: 15px;
  }

  .nav-links {
    justify-content: flex-start;
    flex-wrap: nowrap;
  }

  h1 {
    font-size: clamp(31px, 10.7vw, 48px);
    line-height: 0.92;
    white-space: nowrap;
  }

  .hero {
    min-height: 460px;
  }

  .lede {
    font-size: 17px;
  }

  .timer-value {
    font-size: clamp(26px, 11vw, 42px);
  }

  .timer-unit {
    padding: 14px 8px 12px;
  }

  .button {
    min-height: 40px;
    padding: 0 17px;
  }
}

@media (max-width: 340px) {
  .timer {
    grid-template-columns: 1fr;
  }
}
