@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;700&display=swap");

:root {
  --bg: #0f1416;
  --ink: #f2f0ea;
  --muted: #b8b2a8;
  --accent: #7edbd3;
  --paper: #161b1e;
  --shadow: 0 22px 48px rgba(6, 9, 10, 0.55);
  --ring: rgba(126, 219, 211, 0.18);
  --panel: rgba(22, 27, 30, 0.75);
  --border: rgba(242, 240, 234, 0.08);
  --card-border: rgba(242, 240, 234, 0.06);
  --page-glow: rgba(80, 180, 171, 0.25);
  --hover-shadow: 0 18px 32px rgba(6, 9, 10, 0.28);
}

[data-theme="light"] {
  --bg: #f6f2ea;
  --ink: #1d2326;
  --muted: #5b6064;
  --accent: #1e8f86;
  --paper: #ffffff;
  --shadow: 0 18px 40px rgba(12, 18, 21, 0.05);
  --ring: rgba(30, 143, 134, 0.16);
  --panel: rgba(255, 255, 255, 0.92);
  --border: rgba(29, 35, 38, 0.12);
  --card-border: rgba(29, 35, 38, 0.1);
  --page-glow: rgba(30, 143, 134, 0.18);
  --hover-shadow: 0 18px 32px rgba(12, 18, 21, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 420px at 10% -10%, var(--page-glow) 0%, transparent 60%),
    var(--bg);
  line-height: 1.6;
}

.page {
  min-height: 100vh;
  padding: 56px 18px 72px;
  display: grid;
  place-items: center;
}

.card {
  width: min(780px, 100%);
  background: var(--paper);
  border-radius: 28px;
  padding: clamp(28px, 5vw, 52px);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--card-border);
}

header {
  display: grid;
  gap: 14px;
  margin-bottom: 30px;
  position: relative;
  z-index: 1;
}

h1 {
  font-size: clamp(30px, 4vw, 44px);
  margin: 0;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 12px;
  margin: 0;
  color: var(--accent);
  font-weight: 600;
}

.lead {
  margin: 0;
  color: var(--muted);
  max-width: 60ch;
}

.actions {
  display: grid;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 0 0 1px var(--ring);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.button strong {
  display: block;
  font-size: 18px;
  margin-bottom: 4px;
}

.button__meta {
  display: block;
  font-size: 14px;
  color: var(--muted);
}

.button__icon {
  font-size: 22px;
  color: var(--accent);
  transition: transform 0.25s ease;
}

.button:hover {
  transform: translateY(-4px);
  border-color: rgba(126, 219, 211, 0.35);
  box-shadow:
    0 0 0 1px var(--ring),
    var(--hover-shadow);
}

.button:hover .button__icon {
  transform: translateX(6px);
}

.note {
  margin-top: 26px;
  padding: 14px 18px;
  border-left: 3px solid var(--accent);
  background: rgba(126, 219, 211, 0.12);
  color: var(--ink);
  border-radius: 12px;
  font-size: 14px;
}

.fade-in {
  animation: fadeIn 0.7s ease both;
}

.theme-toggle {
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 2;
}

.theme-toggle__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.theme-toggle__label {
  width: 54px;
  height: 30px;
  display: flex;
  align-items: center;
  padding: 3px;
  border-radius: 999px;
  background: rgba(242, 240, 234, 0.12);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}

.theme-toggle__icon {
  position: absolute;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: color 0.25s ease, opacity 0.25s ease;
}

.theme-toggle__icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle__icon--sun {
  left: 7px;
}

.theme-toggle__icon--moon {
  right: 7px;
}

.theme-toggle__handle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 8px 16px rgba(8, 12, 14, 0.35);
  transform: translateX(0);
  transition: transform 0.25s ease, background 0.25s ease;
}

.theme-toggle__input:checked + .theme-toggle__label {
  background: rgba(126, 219, 211, 0.25);
  border-color: rgba(126, 219, 211, 0.4);
  box-shadow: 0 0 0 4px var(--ring);
}

.theme-toggle__input:checked + .theme-toggle__label .theme-toggle__handle {
  transform: translateX(24px);
  background: var(--bg);
}

.theme-toggle__input:checked + .theme-toggle__label .theme-toggle__icon--moon,
.theme-toggle__input:not(:checked) + .theme-toggle__label .theme-toggle__icon--sun {
  color: var(--accent);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 760px) {
  .actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .button {
    flex-direction: column;
    align-items: flex-start;
  }

  .button__icon {
    align-self: flex-end;
  }
}
