/* anyma start screen — "5b" silver-gelatin style.
   Source of truth: the design handoff `design_handoff_anyma_5b_style` (README + anyma-5b.css).
   Monochrome radial gradients under fine film grain, Instrument Sans headings, Figtree body,
   slow-zoom image tiles, an inverted CTA panel. Light/dark follow the system setting.

   The root legal pages (imprint, privacy) load this file too and use --text, --text-body,
   --muted, --line, --font-display, --font-body, --ease and .footer__link. Keep those names. */

:root {
  --font-display: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Figtree', ui-sans-serif, system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  /* grain tiles (SVG fractal noise, 220px). black ink at .05 / .10, white ink at .08 */
  --grain-black: 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.95' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain-black-strong: 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.95' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.10 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain-white: 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.95' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  /* ---- light (default) ---- */
  --text: #0b0b0b;
  --text-body: #3a3a3a;
  --muted: #555555;
  --line: rgba(0, 0, 0, .14);
  --page-bg: var(--grain-black), radial-gradient(2400px 1500px at 50% -8%, #ffffff 0%, #fefefd 55%, #f9f9f8 100%);
  --page-bg-mobile: var(--grain-black), radial-gradient(1300px 760px at 50% -8%, #ffffff 0%, #fefefd 55%, #f9f9f8 100%);
  --page-base: #fbfbfa;
  --thumb-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 8px 22px rgba(0, 0, 0, .08);
  --thumb-edge: none;
  --cta-bg: var(--grain-white), radial-gradient(900px 420px at 18% 0%, #2a2a2a 0%, #181818 55%, #111111 100%);
  --cta-bg-mobile: var(--grain-white), radial-gradient(420px 320px at 18% 0%, #2a2a2a 0%, #181818 55%, #111111 100%);
  --cta-shadow: inset 0 1px 0 rgba(255, 255, 255, .10);
  --cta-ink: #fafaf8;
  --cta-body: #b4b4b1;
  --cta-body-mobile: #c4c4c1;
  --cta-btn-bg: #fafaf8;
  --cta-btn-bg-hover: #dcdcd9;
  --cta-btn-ink: #0b0b0b;
  --scrim: rgba(10, 10, 10, .38);
  --modal-bg: #fafaf8;
  --field-bg: #ffffff;
  --field-border: rgba(0, 0, 0, .16);
  --field-border-focus: #0b0b0b;
  --modal-btn-bg: #0b0b0b;
  --modal-btn-ink: #fafaf8;
  --logo-filter: grayscale(1) brightness(0);
  --error: #9b2c1f;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #fafaf8;
    --text-body: #c4c4c1;
    --muted: #a8a8a5;
    --line: rgba(255, 255, 255, .16);
    --page-bg: var(--grain-white), radial-gradient(1300px 760px at 50% -8%, #1c1c1c 0%, #0e0e0e 55%, #050505 100%);
    --page-bg-mobile: var(--page-bg);
    --page-base: #070707;
    --thumb-shadow: 0 8px 24px rgba(0, 0, 0, .5);
    --thumb-edge: inset 0 1px 0 rgba(255, 255, 255, .22);
    --cta-bg: var(--grain-black-strong), radial-gradient(900px 420px at 18% 0%, #ffffff 0%, #f3f3f1 55%, #e6e6e3 100%);
    --cta-bg-mobile: var(--grain-black-strong), radial-gradient(420px 320px at 18% 0%, #ffffff 0%, #f3f3f1 55%, #e6e6e3 100%);
    --cta-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 0 0 1px rgba(0, 0, 0, .04);
    --cta-ink: #0b0b0b;
    --cta-body: #3a3a3a;
    --cta-body-mobile: #3a3a3a;
    --cta-btn-bg: #0b0b0b;
    --cta-btn-bg-hover: #2e2e2e;
    --cta-btn-ink: #fafaf8;
    --scrim: rgba(0, 0, 0, .62);
    --modal-bg: #141414;
    --field-bg: rgba(255, 255, 255, .04);
    --field-border: rgba(255, 255, 255, .16);
    --field-border-focus: #fafaf8;
    --modal-btn-bg: #fafaf8;
    --modal-btn-ink: #050505;
    --logo-filter: grayscale(1) brightness(0) invert(0.96);
    --error: #e8907f;

    color-scheme: dark;
  }
}

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

html {
  min-height: 100%;
  background: var(--page-bg);
  background-color: var(--page-base);
  background-attachment: local;
}

body {
  margin: 0;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

button { font: inherit; color: inherit; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 18px;
  background: var(--text);
  color: var(--modal-bg);
  font-size: 14px;
  border-radius: 0 0 12px 0;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
  border-radius: 4px;
}

body.no-scroll { overflow: hidden; }

/* ---------- page ---------- */
.page {
  max-width: 1440px;
  margin: 0 auto;
  padding: 80px 96px;
  display: flex;
  flex-direction: column;
}

.logo {
  display: block;
  height: 108px;
  width: auto;
  margin: -34px -14px;
  align-self: flex-start;
  filter: var(--logo-filter);
}

.rule { height: 1px; margin: 20px 0 0; border: 0; background: var(--line); }

.h1, .h2, .tile__title, .cta__title, .card__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
}

.hero { margin-top: 34px; display: flex; flex-direction: column; gap: 10px; }
.h1 { font-size: 54px; line-height: 1.16; }
.h1 br { display: none; }
.lede { margin: 0; max-width: 756px; font-size: 18px; line-height: 1.6; color: var(--text-body); }
.h2 { margin-top: 40px; font-size: 29px; line-height: 1.05; }

/* ---------- project tiles ---------- */
.tiles {
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px;
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}

.tile__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--thumb-shadow);
}
/* top-edge highlight in dark mode, drawn above the image */
.tile__media::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: var(--thumb-edge);
  pointer-events: none;
}
.tile__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 900ms var(--ease);
}
.tile:hover .tile__img,
.tile:focus-visible .tile__img { transform: scale(1.06); }

.tile__text { display: flex; flex-direction: column; gap: 8px; }
.tile__title { font-size: 27px; line-height: 1.2; }
.tile__desc { font-size: 16px; line-height: 1.6; color: var(--text-body); }

/* coming soon: the overlay fades in on hover; the tile still opens the sign-up pop-up */
.tile__soon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 11, 11, .42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 620ms var(--ease);
  pointer-events: none;
  color: #ffffff;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.tile--soon:hover .tile__soon,
.tile--soon:focus-visible .tile__soon { opacity: 1; }
/* touch screens have no hover: show it all the time */
@media (hover: none) {
  .tile__soon { opacity: 1; }
}

/* ---------- CTA panel ---------- */
.cta {
  margin-top: 44px;
  padding: 56px;
  border-radius: 18px;
  background: var(--cta-bg);
  box-shadow: var(--cta-shadow);
  color: var(--cta-ink);
  display: grid;
  grid-template-columns: max-content minmax(0, 625px);
  column-gap: 72px;
  align-items: start;
}
.cta__title { font-size: 29px; line-height: 1.15; color: var(--cta-ink); }
.cta__side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding-top: 6px;
}
.cta__body { margin: 0; font-size: 16px; line-height: 1.6; color: var(--cta-body); text-wrap: pretty; }

/* ---------- buttons ---------- */
.btn {
  height: 58px;
  padding: 0 28px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 500;
  transition: background 340ms var(--ease), color 340ms var(--ease), opacity 340ms var(--ease);
}
.btn:active { transform: scale(.97); }
.cta .btn { background: var(--cta-btn-bg); color: var(--cta-btn-ink); }
.cta .btn:hover { background: var(--cta-btn-bg-hover); }
.cta .btn:focus-visible { outline-color: var(--cta-ink); }

/* ---------- footer ---------- */
.footer {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
}
.footer__link {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  transition: opacity 340ms var(--ease);
}
.footer__link:hover { opacity: .6; }

/* ---------- pop-ups ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: var(--scrim);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 300ms var(--ease);
}
.overlay[hidden] { display: none; }
.overlay.is-open { opacity: 1; }

.card {
  width: 560px;
  max-width: 100%;
  max-height: 100%;
  overflow-y: auto;
  padding: 44px 44px 40px;
  border-radius: 18px;
  background: var(--modal-bg);
  color: var(--text);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
  display: flex;
  flex-direction: column;
  gap: 24px;
  transform: translateY(10px);
  transition: transform 380ms var(--ease);
}
.overlay.is-open .card { transform: none; }

.card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.card__title { font-size: 30px; line-height: 1.15; }
.card__close {
  flex: none;
  padding: 2px 4px;
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
  color: var(--muted);
  transition: opacity 340ms var(--ease);
}
.card__close:hover { opacity: .6; }
.card__body { margin: 0; font-size: 16px; line-height: 1.6; color: var(--text-body); text-wrap: pretty; }
.card__body + .card__body { margin-top: -8px; }

.form { display: flex; flex-direction: column; gap: 24px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 13px; font-weight: 500; color: var(--text-body); }
.field input,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  outline: none;
  resize: none;
  background: var(--field-bg);
  border: 1.5px solid var(--field-border);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  transition: border-color 180ms var(--ease);
}
.field input::placeholder,
.field textarea::placeholder { color: var(--muted); opacity: .75; }
.field input:focus,
.field textarea:focus { border-color: var(--field-border-focus); }

.form__fine { margin: -8px 0 0; font-size: 13px; line-height: 1.55; color: var(--muted); }
.form__fine a { text-decoration: underline; text-underline-offset: 2px; }
.form__status { margin: -8px 0 0; font-size: 14px; color: var(--error); }
.form__status:empty { display: none; }

.card .btn { align-self: flex-start; background: var(--modal-btn-bg); color: var(--modal-btn-ink); }
.card .btn:disabled { opacity: .35; cursor: default; }
.card .btn:disabled:active { transform: none; }

/* success replaces the form */
.card [data-success][hidden],
.card [data-form][hidden] { display: none; }
[data-success] { display: flex; flex-direction: column; gap: 24px; }

/* ---------- mobile (designed at 390px) ---------- */
@media (max-width: 600px) {
  html { background: var(--page-bg-mobile); background-color: var(--page-base); }
  .page { padding: 56px 24px 32px; }
  .logo { height: 58px; margin: -19px 0; }
  .hero { margin-top: 22px; gap: 8px; }
  .h1 { font-size: 31px; line-height: 1.2; }
  .h1 br { display: inline; }
  .lede { font-size: 14px; }
  .h2 { margin-top: 24px; font-size: 23px; }
  .tiles { margin-top: 26px; grid-template-columns: 1fr; gap: 14px; }
  .tiles > li { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
  .tiles > li:last-child { padding-bottom: 0; border-bottom: 0; }
  .tile { gap: 12px; }
  .tile__text { gap: 6px; }
  .tile__title { font-size: 25px; }
  .tile__desc { font-size: 14px; line-height: 1.55; }
  .cta {
    margin-top: 32px;
    padding: 32px 24px;
    background: var(--cta-bg-mobile);
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  .cta__title { font-size: 23px; }
  .cta__side { padding-top: 0; gap: 20px; align-items: stretch; }
  .cta__body { font-size: 14px; line-height: 1.55; color: var(--cta-body-mobile); }
  .cta .btn { width: 100%; }
  .overlay { padding: 20px; }
  .card { width: 100%; padding: 28px 24px 24px; }
}

/* tablets: two columns read better than three squeezed ones */
@media (min-width: 601px) and (max-width: 1000px) {
  .page { padding: 64px 48px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
  .cta { grid-template-columns: 1fr; row-gap: 20px; padding: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .tile__img, .tile__soon, .btn, .overlay, .card { transition: none; }
}
