@font-face {
  font-family: 'Russo One';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/russo-one-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Russo One';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/russo-one-latin.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;
}

:root {
  --bg:        #0e1216;
  --bg-raised: #151a20;
  --fg:        #e8ecf0;
  --muted:     #97a2ae;
  --accent:    #e8b64c;
  --line:      rgba(232,236,240,.12);
  --display:   'Russo One', 'Arial Black', sans-serif;
  --body:      ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --maxw:      68rem;

  /* type ramp — zwölf willkürliche Größen auf sechs Rollen zusammengezogen.
     --t-body ist der Anker, jede andere Rolle ein bewusster Schritt davon. */
  --t-eyebrow: .7rem;    /* Zeile über der Headline — bewusst leise */
  --t-label:   .74rem;   /* Rolle, Schrittnummer — versal, weit gesperrt */
  --t-fine:    .84rem;   /* Fußzeile, Kopf-Mail */
  --t-small:   .95rem;   /* Kartentext, Button, Wortmarke */
  --t-body:    1.0625rem;
  --t-title:   1.12rem;  /* Karten- und Schritt-Überschriften */
  --gutter:    clamp(1.25rem, 5vw, 3.5rem);
  --tap:       2.75rem;
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scrollbar-color: #39424c var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: var(--t-body);
  line-height: 1.65;
  overflow-wrap: break-word;
  /* lang="de" steht im <html>: deutsche Komposita dürfen trennen */
  -webkit-hyphens: auto;
  hyphens: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* faint blueprint grid + vignette */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(232,236,240,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232,236,240,.035) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(60% 50% at 50% 12%, rgba(232,182,76,.09), transparent 70%);
  pointer-events: none;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
/* an accent ring on an accent button is invisible */
.btn-primary:focus-visible { outline-color: var(--fg); }

/* ---------- topbar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .25rem 1rem;
  padding-block: .55rem;
  padding-inline:
    max(var(--gutter), env(safe-area-inset-left))
    max(var(--gutter), env(safe-area-inset-right));
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  min-height: var(--tap);
  gap: .5em;
  font-family: var(--display);
  font-size: var(--t-small);
  letter-spacing: .02em;
  color: var(--fg);
  text-decoration: none;
}
.brand-sub {
  display: none;
  color: var(--muted);
  font-size: .85em;
}
.topmail {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  min-height: var(--tap);
  padding-inline: .7rem;
  margin-right: -.7rem;
  font-size: var(--t-fine);
  color: var(--muted);
  text-decoration: none;
  transition: color .2s ease;
}
.topmail .full { display: none; }
.topmail:active { color: var(--accent); }
@media (hover: hover) {
  .topmail:hover {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: .4em;
  }
}

main { flex: 1; }

/* ---------- sections ---------- */

section {
  display: grid;
  grid-template-columns: minmax(0, var(--maxw));
  justify-content: center;
  padding-block: clamp(3.25rem, 7vw, 5.5rem);
  padding-inline:
    max(var(--gutter), env(safe-area-inset-left))
    max(var(--gutter), env(safe-area-inset-right));
}
.band.alt { background: var(--bg-raised); border-block: 1px solid var(--line); }

/* Display- und UI-Text wird nie getrennt; Überschriften brechen ausgewogen,
   statt ein einzelnes Wort auf der letzten Zeile stehen zu lassen */
h1, h2, h3, .kicker, .btn, .brand, .topmail, .role, footer p {
  -webkit-hyphens: manual;
  hyphens: manual;
}
h1, h2, h3, .kicker { text-wrap: balance; }
p { text-wrap: pretty; }

h2 {
  font-family: var(--display);
  font-weight: 400;
  /* floor lowered with the h1: on a phone the h1 is sized to hold one line, so
     a 1.5rem h2 would sit almost level with it and flatten the hierarchy */
  font-size: clamp(1.25rem, 3.6vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: 0;
  margin: 0 0 2rem;
  max-width: 24ch;
}

.prose { max-width: 62ch; }
.prose p { margin: 0 0 1.15rem; color: #cfd6de; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--fg); font-weight: 600; }

/* ---------- hero ---------- */

/* the hero and the closing call are the two generous intervals; the bands
   between them sit tighter, so the page has a cadence instead of eight slabs */
.hero {
  padding-top: clamp(4rem, 12vw, 9rem);
  padding-bottom: clamp(4.5rem, 10vw, 8rem);
}

.kicker {
  margin: 0 0 1.6rem;
  font-family: var(--display);
  font-size: var(--t-eyebrow);
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--accent);
}
.kicker::before { content: "❯ "; }

h1 {
  font-family: var(--display);
  margin: 0;
  /* "Individuelle Software" needs 11.02px of width per 1px of font-size, and the
     gutters leave 90vw: 7.8vw holds it on one line at every width down to 320px */
  font-size: clamp(1.55rem, 7.8vw, 5.2rem);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: 0;
  max-width: 24ch;
}
h1 span {
  display: block;
  margin-top: .18em;
  /* on phones the headline shrinks to fit one line; the subline must not follow
     it below the body text, so it keeps its own floor */
  font-size: max(1.05rem, .52em);
  color: var(--muted);
}

.lead {
  margin: 2rem 0 0;
  max-width: 54ch;
  /* Untergrenze über --t-body: der wichtigste Absatz der Seite darf auf dem
     Telefon nicht kleiner rendern als gewöhnlicher Fließtext */
  font-size: clamp(1.15rem, 1.7vw, 1.2rem);
  color: #cfd6de;
}

/* ---------- buttons ---------- */

.actions {
  margin: 2.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: .85rem 1rem;
}
.btn {
  display: inline-block;
  padding: .8rem 1.5rem;
  font-size: var(--t-small);
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--fg);
  text-decoration: none;
  border: 1px solid var(--line);
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #0e1216;
}
.btn:active { border-color: var(--accent); color: var(--accent); }
.btn-primary:active { background: transparent; }
@media (hover: hover) {
  .btn:hover { color: var(--accent); border-color: var(--accent); }
  .btn-primary:hover { background: transparent; color: var(--accent); }
}
@media (pointer: coarse) {
  .btn { padding: .95rem 1.6rem; }
  .actions { gap: 1rem; }
}

/* ---------- cards ---------- */

.cards {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 2.5rem;
}
.band .cards:first-of-type { margin-top: 0; }
.cards.two { grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr)); }
.cards.three { grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)); }

.card {
  background: var(--bg);
  padding: 1.75rem 1.6rem;
}
.band.alt .card { background: var(--bg-raised); }
.card h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: var(--t-title);
  line-height: 1.35;
  margin: 0 0 .7rem;
  color: var(--fg);
}
.card p { margin: 0; color: #b9c2cc; font-size: var(--t-small); }
.card .role {
  margin: -.4rem 0 .8rem;
  font-size: var(--t-label);
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent);
}

/* ---------- steps ---------- */

.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
}
.steps li { counter-increment: step; border-top: 2px solid var(--accent); padding-top: 1.1rem; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--display);
  font-size: var(--t-label);
  letter-spacing: .1em;
  color: var(--accent);
}
.steps h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: var(--t-title);
  margin: .45rem 0 .6rem;
}
.steps p { margin: 0; color: #b9c2cc; font-size: var(--t-small); }

/* ---------- cta ---------- */

.cta {
  padding-block: clamp(4.5rem, 10vw, 8rem);
  border-top: 1px solid var(--line);
  text-align: left;
}
.cta h2 { margin-bottom: 1.5rem; max-width: 28ch; }

/* ---------- footer ---------- */

footer {
  padding-top: 1.6rem;
  padding-bottom: max(1.6rem, env(safe-area-inset-bottom));
  padding-inline:
    max(var(--gutter), env(safe-area-inset-left))
    max(var(--gutter), env(safe-area-inset-right));
  border-top: 1px solid var(--line);
  background: var(--bg-raised);
}
footer p {
  max-width: var(--maxw);
  margin-inline: auto;
  margin-block: 0;
  font-size: var(--t-fine);
  line-height: 1.8;
  letter-spacing: .03em;
  color: var(--muted);
}

/* ---------- breakpoints ---------- */

/* the full company name fits beside the mail link */
@media (min-width: 30rem) {
  .brand-sub { display: inline; }
}

/* the full address fits instead of the short label */
@media (min-width: 34rem) {
  .topmail .short { display: none; }
  .topmail .full { display: inline; }
}

/* explicit track counts: auto-fit would lay four 29-character columns of body
   text, and for two cards it adds a third, empty track that draws a stray rule */
@media (min-width: 48rem) {
  .cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 60rem) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- headline rail ---------- */

/* Wide, the page was a 586px ribbon pinned left with the card grids running on
   to the full 1088px — text and cards had no shared right edge. The heading
   moves into its own rail, the prose takes a column exactly one measure wide,
   and grids span both. */
@media (min-width: 72rem) {
  .band,
  .cta {
    grid-template-columns:
      minmax(0, calc(var(--maxw) - 62ch - 4rem))
      minmax(0, 62ch);
    column-gap: 4rem;
    align-items: start;
  }
  .band > h2,
  .cta > h2 { grid-column: 1; grid-row: 1; margin-bottom: 0; }
  .band > .prose { grid-column: 2; grid-row: 1; max-width: none; }
  .cta > .actions { grid-column: 2; grid-row: 1; margin-top: 0; }
  .band > .cards,
  .band > .cards:first-of-type,
  .band > .steps {
    grid-column: 1 / -1;
    margin-top: clamp(2.5rem, 4vw, 3.5rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

/* ---------- user preferences ---------- */

@media (prefers-contrast: more) {
  :root {
    --line:  rgba(232,236,240,.42);
    --muted: #c6cfd9;
  }
  .prose p, .card p, .steps p, .lead { color: var(--fg); }
  .steps li { border-top-width: 3px; }
}

/* the card grid draws its lines with 1px background gaps — forced colors
   overrides backgrounds, so the cards need real borders there */
@media (forced-colors: active) {
  body::before, body::after { display: none; }
  .cards { gap: 0; border: 0; }
  .card { border: 1px solid CanvasText; }
  .btn { border: 1px solid ButtonBorder; }
  .steps li { border-top-color: CanvasText; }
  :focus-visible { outline-color: Highlight; }
}

/* a dark page prints as a black rectangle, or as light gray on white */
@media print {
  *, *::before, *::after {
    color: #000 !important;
    background: transparent !important;
  }
  html { scrollbar-color: auto; }
  body {
    font-size: 11pt;
    line-height: 1.5;
  }
  body::before, body::after, .topbar, .actions { display: none; }
  section {
    padding-block: 0 1.4rem;
    padding-inline: 0;
    break-inside: avoid;
  }
  .band.alt { border-block: 0; }
  .hero { padding-top: 0; }
  h1 { font-size: 24pt; }
  h2 { font-size: 15pt; margin-bottom: 1rem; }
  .cards {
    border: 0;
    gap: 0 1.5rem;
    margin-top: 1.2rem;
  }
  .card { padding: 0 0 1rem; break-inside: avoid; }
  .steps { gap: 1rem 1.5rem; }
  .steps li { border-top-color: #000; break-inside: avoid; }
  footer { border-top: 1px solid #000; padding-inline: 0; }
  /* on paper a mail link is only useful as its address */
  .cta::after {
    content: "mail@frankenburg.software · +49 5751 9934900";
    font-weight: 600;
  }
}
