:root {
  color-scheme: light;
  --bg: #f7f6f1;
  --surface: rgba(255, 255, 255, 0.68);
  --text: #252820;
  --muted: #6f7269;
  --line: rgba(37, 40, 32, 0.12);
  --accent: #e87041;
  --accent-hover: #d96034;
  --button-text: #fffaf2;
  --glow-one: rgba(240, 154, 112, 0.27);
  --glow-two: rgba(171, 196, 149, 0.26);
  --shadow: 0 24px 70px rgba(54, 52, 41, 0.09);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #171914;
  --surface: rgba(35, 38, 31, 0.72);
  --text: #f4f1e8;
  --muted: #afb1a8;
  --line: rgba(244, 241, 232, 0.13);
  --accent: #ef8354;
  --accent-hover: #f1946c;
  --button-text: #1b1c17;
  --glow-one: rgba(200, 90, 50, 0.2);
  --glow-two: rgba(100, 135, 86, 0.2);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  transition: background 300ms ease, color 300ms ease;
}

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

button:focus-visible,
a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 3px;
}

.page-shell {
  display: grid;
  min-height: 100vh;
  grid-template-rows: auto 1fr auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  font-family: "Newsreader", serif;
  font-size: 20px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: 600 13px/1 "DM Sans", sans-serif;
  cursor: pointer;
  transition: border-color 180ms ease, transform 180ms ease, background 300ms ease;
}

.theme-toggle:hover {
  border-color: var(--muted);
  transform: translateY(-1px);
}

.theme-toggle svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.moon-icon,
[data-theme="dark"] .sun-icon {
  display: none;
}

[data-theme="dark"] .moon-icon {
  display: block;
}

main {
  display: grid;
  place-items: center;
  padding: 32px 24px 56px;
}

.hero {
  position: relative;
  display: grid;
  width: min(940px, 100%);
  min-height: 500px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    linear-gradient(var(--surface), var(--surface)),
    radial-gradient(circle at 20% 15%, var(--glow-one), transparent 35%);
  box-shadow: var(--shadow);
  transition: background 300ms ease, border-color 300ms ease;
}

.hero::before {
  position: absolute;
  inset: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  content: "";
  pointer-events: none;
}

.ambient {
  position: absolute;
  border-radius: 999px;
  filter: blur(2px);
  pointer-events: none;
}

.ambient-one {
  top: -110px;
  right: -80px;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, var(--glow-one), transparent 68%);
}

.ambient-two {
  bottom: -155px;
  left: -80px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, var(--glow-two), transparent 68%);
}

.content-card {
  position: relative;
  z-index: 1;
  width: min(650px, calc(100% - 64px));
  padding: 48px 0;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 15%, transparent);
}

h1 {
  min-height: 1.05em;
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(4rem, 9vw, 7.2rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.95;
}

h1.changing {
  animation: change-greeting 400ms ease;
}

.content-card p {
  max-width: 470px;
  margin: 28px auto 34px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.12rem);
  line-height: 1.65;
}

.greeting-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 24%, transparent);
  color: var(--button-text);
  font: 700 14px/1 "DM Sans", sans-serif;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.greeting-button:hover {
  background: var(--accent-hover);
  box-shadow: 0 13px 30px color-mix(in srgb, var(--accent) 30%, transparent);
  transform: translateY(-2px);
}

.greeting-button:active {
  transform: translateY(0);
}

.greeting-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: transform 180ms ease;
}

.greeting-button:hover svg {
  transform: translateX(3px);
}

footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 18px 24px 24px;
  color: var(--muted);
  font-size: 12px;
}

footer p {
  margin: 0;
}

footer > span {
  color: var(--accent);
  font-size: 9px;
}

@keyframes change-greeting {
  0% { opacity: 1; transform: translateY(0); }
  45% { opacity: 0; transform: translateY(-10px); }
  55% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  .site-header {
    width: calc(100% - 32px);
    padding: 18px 0;
  }

  .theme-label {
    display: none;
  }

  .theme-toggle {
    width: 40px;
    justify-content: center;
    padding: 0;
  }

  main {
    padding: 16px 16px 36px;
  }

  .hero {
    min-height: 470px;
    border-radius: 24px;
  }

  .hero::before {
    inset: 12px;
    border-radius: 16px;
  }

  .content-card {
    width: calc(100% - 48px);
  }

  h1 {
    font-size: clamp(3.2rem, 17vw, 5rem);
  }

  footer {
    flex-wrap: wrap;
  }
}

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