@layer reset, base, theme, utilities;

@layer reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }
  html:focus-within {
    scroll-behavior: smooth;
  }
  html,
  body {
    height: 100%;
  }
  body {
    margin: 0;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
  }
  img,
  picture,
  svg,
  video {
    display: block;
    max-width: 100%;
    height: auto;
  }
  input,
  button,
  textarea,
  select {
    font: inherit;
  }
  :where(h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote) {
    margin: 0;
  }
}

@layer theme {
  :root {
    --bg: #ffffff;
    --fg: #111111;
    --muted: #666666;
    --border: #e5e7eb;
  }
}

@layer base {
  body {
    background-color: var(--bg);
    color: var(--fg);
    font-family:
      system-ui,
      -apple-system,
      Segoe UI,
      Roboto,
      Ubuntu,
      Cantarell,
      Noto Sans,
      Helvetica Neue,
      Arial,
      "Apple Color Emoji",
      "Segoe UI Emoji",
      "Segoe UI Symbol";
    min-height: 100dvh;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-rows: 100dvh;
    grid-template-columns: 1fr;
  }

  /* Mobile: vertical layout, each section 100dvh */
  .content {
    min-height: 100dvh;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .content h2 {
    color: var(--muted);
  }

  /* Paragraph spacing inside content */
  .content p {
    margin: 0 0 1rem 0;
  }
  .content p:last-child {
    margin-bottom: 0;
  }

  .image {
    min-height: 100dvh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
  }

  .image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
    transition: opacity 0.5s ease-in-out;
  }

  /* Desktop: 50/50 horizontal split */
  @media (min-width: 768px) {
    body {
      grid-template-columns: 1fr 1fr;
      grid-template-rows: 100dvh;
    }

    .content {
      min-height: 100dvh;
    }

    .image {
      min-height: 100dvh;
    }
  }
}

@layer utilities {
  .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    border: 0;
    padding: 0;
    white-space: nowrap;
    clip-path: inset(50%);
    clip: rect(0 0 0 0);
    overflow: hidden;
  }

  .badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
  }

  .badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 9999px;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .cta {
    margin-top: 2.5rem;
  }

  .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.25rem;
    border: 1px solid var(--fg);
    border-radius: 9999px;
    background-color: var(--fg);
    color: var(--bg);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.01em;
  }

  .button:hover {
    background-color: #222222;
    border-color: #222222;
    color: var(--bg);
  }
}
