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

:root {
  --varn-red: #e31e24;
  --varn-green: #009640;
  --varn-gold: #c9a227;
  --text-primary: #1a1a1a;
  --text-muted: #5c5c5c;
  --bg: #f7f6f4;
  --card-bg: #ffffff;
  --shadow: 0 10px 36px rgba(0, 0, 0, 0.08);

  /* Comfortable defaults — readable on any screen */
  --page-pad-y: 1.25rem;
  --page-pad-x: 1.5rem;
  --card-pad-y: 2rem;
  --card-pad-x: 2.25rem;
  --gap-sm: 0.5rem;
  --gap-md: 1rem;
  --gap-lg: 1.5rem;
  --logo-width: min(20rem, 78vw);
  --card-max-w: 36rem;
}

html {
  font-size: 100%;
  -webkit-font-smoothing: antialiased;
  height: 100%;
}

body {
  font-family: "Source Sans 3", system-ui, sans-serif;
  color: var(--text-primary);
  background: var(--bg);
  height: 100%;
  line-height: 1.5;
  overflow: hidden;
}

.page {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  height: 100dvh;
  max-height: 100dvh;
  padding: var(--page-pad-y) var(--page-pad-x);
  padding-top: max(var(--page-pad-y), env(safe-area-inset-top));
  padding-bottom: max(var(--page-pad-y), env(safe-area-inset-bottom));
  overflow: hidden;
}

.accent {
  position: absolute;
  border-radius: 50%;
  opacity: 0.07;
  pointer-events: none;
}

.accent--left {
  width: min(28rem, 70vw);
  height: min(28rem, 70vw);
  background: var(--varn-red);
  top: -20%;
  left: -25%;
}

.accent--right {
  width: min(22rem, 55vw);
  height: min(22rem, 55vw);
  background: var(--varn-green);
  bottom: -15%;
  right: -20%;
}

.card {
  position: relative;
  z-index: 1;
  flex: 0 1 auto;
  width: 100%;
  max-width: var(--card-max-w);
  padding: var(--card-pad-y) var(--card-pad-x);
  background: var(--card-bg);
  border-radius: 0.875rem;
  box-shadow: var(--shadow);
  text-align: center;
  animation: fadeUp 0.7s ease-out both;
}

.logo {
  display: block;
  width: var(--logo-width);
  max-width: 100%;
  height: auto;
  margin: 0 auto var(--gap-lg);
  object-fit: contain;
}

.title {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(1.5rem, 2.5vw + 0.5rem, 2rem);
  font-weight: 700;
  color: var(--varn-red);
  letter-spacing: 0.01em;
  line-height: 1.2;
  margin-bottom: var(--gap-sm);
}

.subtitle {
  font-size: clamp(1.125rem, 1.5vw + 0.5rem, 1.375rem);
  font-weight: 600;
  color: var(--varn-green);
  line-height: 1.25;
  margin-bottom: var(--gap-md);
  animation: pulse 2.5s ease-in-out infinite;
}

.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: var(--gap-md);
}

.divider__line {
  flex: 1;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    #d4d4d4 20%,
    #d4d4d4 80%,
    transparent
  );
}

.divider__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--varn-gold);
  flex-shrink: 0;
}

.message {
  font-size: 1.0625rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: var(--gap-sm);
  max-width: 36ch;
  margin-inline: auto;
}

.contact {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.45;
  opacity: 0.9;
}

.contact__email {
  color: var(--varn-red);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.contact__email:hover,
.contact__email:focus-visible {
  color: var(--varn-green);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.contact__email:focus-visible {
  outline: 2px solid var(--varn-green);
  outline-offset: 2px;
  border-radius: 2px;
}

.footer {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  text-align: center;
  padding-inline: var(--page-pad-x);
}

.footer p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* 13" laptops & short viewports — tighten only when height is limited */
@media (max-height: 820px) {
  :root {
    --page-pad-y: 0.875rem;
    --card-pad-y: 1.5rem;
    --card-pad-x: 1.75rem;
    --gap-lg: 1.125rem;
    --gap-md: 0.75rem;
    --logo-width: min(16rem, 72vw);
    --card-max-w: 32rem;
  }

  .title {
    font-size: 1.5rem;
  }

  .subtitle {
    font-size: 1.125rem;
  }

  .message {
    font-size: 1rem;
  }

  .contact {
    font-size: 0.875rem;
  }
}

@media (max-height: 700px) {
  :root {
    --page-pad-y: 0.625rem;
    --card-pad-y: 1.125rem;
    --card-pad-x: 1.5rem;
    --gap-lg: 0.875rem;
    --gap-md: 0.625rem;
    --gap-sm: 0.375rem;
    --logo-width: min(13rem, 68vw);
  }

  .title {
    font-size: 1.35rem;
  }

  .subtitle {
    font-size: 1.05rem;
  }

  .message {
    font-size: 0.9375rem;
    line-height: 1.4;
  }

  .contact {
    font-size: 0.8125rem;
  }

  .footer p {
    font-size: 0.75rem;
  }
}

/* Mobile */
@media (max-width: 540px) {
  :root {
    --page-pad-x: 1rem;
    --card-pad-y: 1.5rem;
    --card-pad-x: 1.25rem;
    --logo-width: min(15rem, 82vw);
    --card-max-w: 100%;
  }

  .card {
    border-radius: 0.75rem;
  }

  .message {
    max-width: none;
    font-size: 1rem;
  }
}

/* Very small phones */
@media (max-width: 380px) {
  :root {
    --logo-width: min(13rem, 88vw);
    --card-pad-y: 1.25rem;
    --gap-lg: 1rem;
  }
}

/* Landscape phones — hide extras to avoid scroll */
@media (max-height: 520px) and (orientation: landscape) {
  :root {
    --logo-width: min(9rem, 40vw);
    --card-pad-y: 0.75rem;
    --gap-lg: 0.5rem;
    --gap-md: 0.5rem;
  }

  .divider {
    display: none;
  }

  body {
    overflow: auto;
  }

  .page {
    height: auto;
    min-height: 100dvh;
    max-height: none;
  }
}

/* Extreme short height — allow scroll rather than crush text */
@media (max-height: 420px) {
  body {
    overflow: auto;
  }

  .page {
    height: auto;
    min-height: 100dvh;
    max-height: none;
    overflow: visible;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(0.75rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.75;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card,
  .subtitle {
    animation: none;
  }
}
