/* Boin Mael LLC — shared styles */

:root {
  --bg: #050505;
  --fg: #f5f5f4;
  --fg-soft: rgba(245, 245, 244, 0.86);
  --fg-muted: rgba(245, 245, 244, 0.6);
  --fg-faint: rgba(245, 245, 244, 0.54);
  --line: rgba(245, 245, 244, 0.22);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Archivo", "Arial Black", ui-sans-serif, system-ui, sans-serif;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ---------- Background ----------
   Three fixed layers behind the content:
   1. body::before  light from above + soft centre glow + vignette
   2. body::after   fine grid, faded out towards the edges
   3. .page::before film grain */

body::before,
body::after,
.page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

body::before {
  background:
    radial-gradient(ellipse 42% 38% at 50% -8%, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.06) 45%, rgba(255, 255, 255, 0) 80%),
    radial-gradient(ellipse 65% 50% at 50% 48%, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0) 70%),
    radial-gradient(ellipse 120% 90% at 50% 45%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.55) 100%);
}

body::after {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 72px 72px;
  background-position: center -1px;
  -webkit-mask-image: radial-gradient(ellipse 62% 58% at 50% 42%, #000 0%, rgba(0, 0, 0, 0.5) 45%, transparent 78%);
  mask-image: radial-gradient(ellipse 62% 58% at 50% 42%, #000 0%, rgba(0, 0, 0, 0.5) 45%, transparent 78%);
}

.page::before {
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
}

::selection {
  background: var(--fg);
  color: var(--bg);
}

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

a:focus-visible {
  outline: 1px solid var(--fg);
  outline-offset: 4px;
  border-radius: 2px;
}

/* The single entrance animation */
.reveal {
  animation: fade-in 1.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

/* ---------- Layout shell ---------- */

.page {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
}

/* ---------- Home ---------- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--gutter);
}

.hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: min(clamp(2rem, 0.2rem + 8.6vw, 5.75rem), 11.5vh);
  font-weight: 800;
  font-stretch: 125%;
  line-height: 1;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.hero__subtitle {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin: clamp(1.1rem, 2.8vh, 1.75rem) 0 0;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.hero__subtitle::before,
.hero__subtitle::after {
  content: "";
  width: clamp(1.5rem, 4vw, 2.75rem);
  height: 1px;
  background: rgba(245, 245, 244, 0.25);
}

.hero__subtitle::before {
  margin-right: 0.3em;
}

@media (max-width: 420px) {
  .hero__subtitle {
    gap: 0.75rem;
    font-size: 0.6875rem;
    letter-spacing: 0.2em;
    white-space: nowrap;
  }

  .hero__subtitle::before,
  .hero__subtitle::after {
    width: 1rem;
  }

  .hero__subtitle::before {
    margin-right: 0.2em;
  }
}

.hero__desc {
  max-width: 31rem;
  margin: clamp(1.75rem, 5vh, 3rem) 0 0;
  font-size: clamp(0.9375rem, 0.9rem + 0.2vw, 1.0625rem);
  line-height: 1.7;
  letter-spacing: -0.005em;
  color: var(--fg-muted);
  text-wrap: balance;
}

.hero__email {
  display: inline-block;
  margin-top: clamp(1.75rem, 5.5vh, 3.5rem);
  padding-bottom: 0.2em;
  font-size: clamp(0.9375rem, 0.88rem + 0.25vw, 1.0625rem);
  letter-spacing: -0.005em;
  color: var(--fg-soft);
  border-bottom: 1px solid var(--line);
  transition: color 0.25s ease, border-color 0.25s ease;
}

.hero__email:hover {
  color: var(--fg);
  border-color: var(--fg);
}

/* Short screens (phones in landscape): tighten vertical rhythm so it still fits */
@media (max-height: 500px) {
  .hero {
    padding-block: 1rem;
  }

  .hero__subtitle {
    margin-top: 0.625rem;
  }

  .hero__desc {
    margin-top: 1rem;
    font-size: 0.875rem;
    line-height: 1.6;
  }

  .hero__email {
    margin-top: 1rem;
  }

  .footer {
    padding-top: 0.75rem;
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }
}

/* ---------- Footer ---------- */

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 1.5rem;
  padding: 1.25rem var(--gutter) max(1.5rem, env(safe-area-inset-bottom));
  font-size: 0.75rem;
  line-height: 1.6;
  letter-spacing: 0.005em;
  color: var(--fg-faint);
  text-align: center;
}

.footer address {
  font-style: normal;
}

.footer nav {
  display: flex;
  gap: 1.25rem;
}

.footer a {
  transition: color 0.25s ease;
}

.footer a:hover {
  color: var(--fg);
}

.footer .sep {
  padding: 0 0.4em;
  opacity: 0.6;
}

.footer .nw {
  white-space: nowrap;
}

@media (max-width: 640px) and (min-height: 501px) {
  .footer {
    flex-direction: column;
    gap: 0.5rem;
  }

  .footer .sep {
    display: none;
  }

  .footer .nw--first {
    display: block;
  }
}

/* ---------- Legal pages ---------- */

.topbar {
  padding: clamp(1.25rem, 4vh, 2rem) var(--gutter) 0;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: -0.02em;
}

.topbar a {
  color: var(--fg-soft);
  transition: color 0.25s ease;
}

.topbar a:hover {
  color: var(--fg);
}

.legal {
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: clamp(3rem, 10vh, 6rem) var(--gutter) clamp(3rem, 8vh, 5rem);
}

.legal h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem);
  font-weight: 800;
  font-stretch: 125%;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.legal .updated {
  margin: 1rem 0 0;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.legal h2 {
  margin: 2.75rem 0 0.75rem;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--fg);
}

.legal p,
.legal li {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--fg-soft);
}

.legal p {
  margin: 0 0 1rem;
}

.legal ul {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
}

.legal li {
  margin-bottom: 0.4rem;
}

.legal strong {
  font-weight: 500;
  color: var(--fg);
}

.legal li::marker {
  color: var(--fg-faint);
}

.legal .intro {
  margin-top: 2.5rem;
}

.legal a {
  color: var(--fg);
  border-bottom: 1px solid var(--line);
  transition: border-color 0.25s ease;
}

.legal a:hover {
  border-color: var(--fg);
}

.legal address {
  font-style: normal;
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--fg-soft);
}
