:root {
  --container: 1160px;
  --red: #d5241d;
  --red-dark: #b61f18;
  --black: #1c1c1c;
  --white: #ffffff;
  --surface: rgba(255, 255, 255, 0.82);
  --text: #1c1c1c;
  --text-soft: rgba(28, 28, 28, 0.7);
  --text-muted: rgba(28, 28, 28, 0.68);
  --border: rgba(28, 28, 28, 0.1);
  --focus: #ff6f5c;
  --shadow-soft: 0 20px 60px rgba(21, 16, 15, 0.1);
  --font-main: "Montserrat", sans-serif;
}

html[data-theme="dark"] {
  --surface: rgba(255, 255, 255, 0.06);
  --text: #f4f2ee;
  --text-soft: rgba(244, 242, 238, 0.78);
  --text-muted: rgba(244, 242, 238, 0.72);
  --border: rgba(255, 255, 255, 0.1);
  --shadow-soft: 0 20px 60px rgba(0, 0, 0, 0.3);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: var(--font-main);
  color: var(--text);
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html[data-theme="dark"] body {
  background: #1c1c1c;
}

img {
  display: block;
  max-width: 100%;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: min(calc(100% - 40px), var(--container));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--black);
  color: var(--white);
}

.skip-link:focus {
  top: 12px;
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.site-header {
  padding: 28px 0 0;
}

.header-inner {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand-logo {
  width: clamp(170px, 22vw, 250px);
  height: auto;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  min-width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  transform: translateY(-2px);
}

.brand:focus-visible,
.footer-link:focus-visible,
.theme-toggle:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.theme-toggle__icon {
  position: relative;
  width: 20px;
  height: 20px;
  display: block;
}

.theme-toggle__icon::before,
.theme-toggle__icon::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  display: grid;
  place-items: center;
  color: currentColor;
  font-weight: 700;
  line-height: 1;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

html[data-theme="light"] .theme-toggle__icon::before {
  content: "\263E";
  font-size: 16px;
  transform: translateY(-1px);
  opacity: 1;
}

html[data-theme="light"] .theme-toggle__icon::after {
  opacity: 0;
}

html[data-theme="dark"] .theme-toggle__icon::before {
  opacity: 0;
}

html[data-theme="dark"] .theme-toggle__icon::after {
  content: "\2600";
  font-size: 16px;
  opacity: 1;
}

.main-content {
  flex: 1;
  display: grid;
  align-items: center;
  padding: 72px 0 112px;
}

.hero {
  padding: 28px 0 0;
}

.hero-layout {
  display: flex;
  justify-content: center;
}

.hero-copy {
  max-width: 860px;
  display: grid;
  gap: 20px;
  text-align: center;
}

.hero-kicker,
.footer-meta {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.hero-kicker {
  color: var(--red);
  font-size: 0.8rem;
  font-weight: 800;
  justify-self: center;
}

.hero-title {
  margin: 0;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.04em;
  font-size: clamp(3.2rem, 7.6vw, 6.2rem);
  line-height: 0.92;
}

.hero-title span {
  color: var(--red);
}

.hero-text,
.footer-title,
.footer-link {
  margin: 0;
  line-height: 1.75;
}

.hero-text {
  max-width: 52ch;
  justify-self: center;
  color: var(--text-soft);
  font-size: clamp(0.98rem, 2.3vw, 1.06rem);
}

.site-footer {
  padding: 0 0 44px;
}

.footer-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}

.footer-left {
  display: grid;
  gap: 6px;
}

.footer-title {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--text);
}

.footer-meta {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.footer-link {
  color: var(--text-soft);
  font-size: 0.94rem;
  font-weight: 600;
  word-break: break-word;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: color-mix(in srgb, currentColor 65%, transparent);
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--red);
  text-decoration-color: currentColor;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .main-content {
    padding: 56px 0 88px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(calc(100% - 28px), var(--container));
  }

  .site-header {
    padding-top: 18px;
  }

  .header-inner {
    min-height: 64px;
  }

  .brand-logo {
    width: min(170px, 50vw);
  }

  .main-content {
    padding: 36px 0 68px;
  }

  .hero-copy {
    gap: 14px;
  }

  .hero-title {
    font-size: clamp(2.2rem, 12vw, 3.8rem);
    line-height: 0.95;
  }

  .footer-right {
    gap: 10px;
    flex-direction: column;
    align-items: flex-start;
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-contrast: more) {
  :root {
    --surface: #ffffff;
    --text-soft: rgba(28, 28, 28, 0.9);
    --text-muted: rgba(28, 28, 28, 0.82);
    --border: rgba(28, 28, 28, 0.32);
  }

  html[data-theme="dark"] {
    --surface: rgba(255, 255, 255, 0.14);
    --text-soft: rgba(244, 242, 238, 0.92);
    --text-muted: rgba(244, 242, 238, 0.84);
    --border: rgba(255, 255, 255, 0.38);
  }

  .theme-toggle,
  .footer-inner {
    border-width: 2px;
  }
}
