/* ── Beni Apter Development — beniapter.dev ───────────────── */

/* ── SELF-HOSTED FONTS (latin subset, woff2) ───────────────── */

@font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/static/fonts/oswald-var.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/static/fonts/hanken-grotesk-300.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/static/fonts/space-mono-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

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

:root {
  --bg: #ffffff;
  --t1: #1a1a1a;
  --t2: #737373;
  --t3: #a3a3a3;
  --fo: 'Oswald', sans-serif;
  --fb: 'Hanken Grotesk', sans-serif;
  --fm: 'Space Mono', monospace;
}

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--t1);
  font-family: var(--fo);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

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

:focus-visible { outline: 2px solid var(--t1); outline-offset: 3px; }

/* ── LANGUAGE TOGGLE ───────────────────────────────────────── */

.lt {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lt a {
  font-family: var(--fo);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: var(--t3);
  text-decoration: none;
  transition: color 0.15s;
  text-transform: uppercase;
}

.lt a:hover { color: var(--t2); }
.lt a.on    { color: var(--t1); }
.lt-dot { color: var(--t3); font-size: 10px; user-select: none; }

/* ── MAIN ──────────────────────────────────────────────────── */

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(40px, 8vh, 100px) clamp(24px, 8vw, 120px);
  padding-left: calc(clamp(24px, 8vw, 120px) + env(safe-area-inset-left, 0px));
  padding-right: calc(clamp(24px, 8vw, 120px) + env(safe-area-inset-right, 0px));
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}

/* ── LOGO ──────────────────────────────────────────────────── */

.logo {
  width: clamp(52px, 7vw, 88px);
  height: auto;
  display: block;
  margin-bottom: clamp(20px, 3.5vh, 40px);
}

/* ── TITLE ─────────────────────────────────────────────────── */

h1 {
  font-family: var(--fo);
  font-weight: 700;
  font-size: clamp(24px, 7vw, 80px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--t1);
  margin-bottom: clamp(8px, 1.2vh, 16px);
}

/* ── SUBTITLE ──────────────────────────────────────────────── */

.sub {
  font-family: var(--fb);
  font-weight: 300;
  font-size: clamp(14px, 1.8vw, 22px);
  color: var(--t2);
  line-height: 1.5;
  margin-bottom: clamp(24px, 4vh, 48px);
  max-width: 560px;
}

/* ── CONTACT ───────────────────────────────────────────────── */

address {
  font-style: normal;
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 2vh, 20px);
}

.c-lbl {
  font-family: var(--fo);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--t3);
  margin-bottom: 2px;
}

.c-val {
  font-family: var(--fo);
  font-size: clamp(13px, 1.4vw, 16px);
  font-weight: 600;
  color: var(--t1);
  line-height: 1.5;
  letter-spacing: 0.01em;
}

.c-val a {
  color: inherit;
  text-decoration: none;
  position: relative;
  transition: color 0.15s;
}

.c-val a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.c-val a:hover { color: var(--t2); }
.c-val a:hover::after { transform: scaleX(1); }

/* ── FOOTER ────────────────────────────────────────────────── */

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: clamp(14px, 2vh, 22px) clamp(24px, 8vw, 120px);
  padding-left: calc(clamp(24px, 8vw, 120px) + env(safe-area-inset-left, 0px));
  padding-right: calc(clamp(24px, 8vw, 120px) + env(safe-area-inset-right, 0px));
  padding-bottom: calc(clamp(14px, 2vh, 22px) + env(safe-area-inset-bottom, 0px));
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}

.fc {
  font-family: var(--fm);
  font-size: 10px;
  color: var(--t3);
  letter-spacing: 0.04em;
}

/* ── MOTION ────────────────────────────────────────────────── */

/* Staggered entrance — each .up element rises in with its own --d delay
   (delay classes instead of inline styles, so the CSP needs no
   'unsafe-inline' for style attributes) */
.d1 { --d: .08s; }
.d2 { --d: .16s; }
.d3 { --d: .24s; }
.d4 { --d: .30s; }
.d5 { --d: .36s; }
.d6 { --d: .46s; }

@media (prefers-reduced-motion: no-preference) {
  .up {
    opacity: 0;
    animation: rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: var(--d, 0s);
  }

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

  /* Smooth cross-document fade when switching languages (EN ⇄ DE).
     Pure CSS — View Transitions API, progressive enhancement. */
  @view-transition {
    navigation: auto;
  }

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 0.25s;
  }
}
