:root {
  color-scheme: light dark;
  --bg: #f6f2f7;
  --card: #ffffff;
  --text: #2a1c2f;
  --muted: #5a4a61;
  --accent: #5b1f6f;
  --shadow: 0 18px 45px rgba(38, 25, 44, 0.18);
  --radius: 22px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #140f17;
    --card: #1c1420;
    --text: #f2ecf4;
    --muted: #c7b8cf;
    --accent: #caa6ff;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  }
}

* {
  box-sizing: border-box;
}

::selection {
  background: #3f0b3e;
  color: #f6f2f7;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: radial-gradient(circle at top, rgba(91, 31, 111, 0.08), transparent 45%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  padding: 2rem 1.25rem 4rem;
}

@media (min-width: 640px) {
  .page {
    padding: 3rem 1.25rem 4rem;
  }
}

.intro {
  text-align: center;
  max-width: 1080px;
}

.intro h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  letter-spacing: 0.01em;
  line-height: 1.12;
  text-wrap: balance;
  color: var(--text);
}

.intro p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  font-family: "Manrope", "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
}

.hero {
  width: min(100vw, 960px);
  margin: 0 -1.25rem;
}

@media (min-width: 640px) {
  .hero {
    width: min(92vw, 960px);
    margin: 0;
  }
}

.hero-button {
  all: unset;
  display: block;
  cursor: pointer;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
}

.hero-button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 70%, transparent);
  outline-offset: 3px;
  border-radius: var(--radius);
}

.hero img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: block;
  /* Use contain to preserve the manifesto layout without cropping. */
  object-fit: contain;
  background: var(--card);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

@media (hover: hover) {
  .hero img:hover {
    box-shadow: 0 12px 30px rgba(63, 11, 62, 0.35);
    transform: translateY(-2px);
  }
}

@media (max-width: 639px) {
  .hero img {
    border-radius: 0;
  }

  .hero-button:active img {
    opacity: 0.9;
  }
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(8px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1001;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  font-size: 2.5rem;
  font-weight: 300;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.modal-close:hover,
.modal-close:focus {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
}

.modal-close:active {
  transform: scale(0.95);
}

.modal-content {
  width: 100%;
  max-width: 100%;
  max-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem 1rem;
}
.modal-content img {
  max-width: 100%;
  max-height: calc(100vh - 4rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  -webkit-user-select: none;
  user-select: none;
  touch-action: pan-x pan-y pinch-zoom;
}

.social {
  width: min(92vw, 760px);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.social-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}

.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  color: var(--text);
  background: color-mix(in srgb, var(--card) 88%, transparent);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.social a:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

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

.icon {
  width: 1.1rem;
  height: 1.1rem;
  display: inline-flex;
}

.icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

@media (min-width: 900px) {
  .page {
    padding-top: 4rem;
  }
}

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