/* ===== Brand font (self-hosted) ===== */
@font-face {
  font-family: "Syne";
  src: url("assets/fonts/Syne-VariableFont_wght.ttf") format("truetype");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

/* ===== Design tokens (from Design System: Colors, Typography) ===== */
:root {
  /* Himmel & Jord Yellow */
  --yellow-900: #4c460a;
  --yellow-800: #797114;
  --yellow-700: #a59b1f;
  --yellow-600: #d2c629;
  --yellow-500: #fff033;   /* brand yellow */
  --yellow-400: #fff685;
  --yellow-300: #fff9ad;
  --yellow-200: #fffcd6;
  --yellow-100: #fffdeb;

  /* Neutral gray */
  --gray-900: #090b11;
  --gray-800: #1d212d;
  --gray-700: #333a4c;
  --gray-600: #494f61;
  --gray-500: #697187;
  --gray-400: #898fa0;
  --gray-300: #a9aeba;
  --gray-200: #cbced4;
  --gray-100: #edeef0;

  --black: #000;
  --white: #fff;

  /* Feedback colours (sampled from the Input field screenshot) */
  --error: #f04438;
  --error-border: #f8989a;
  --success: #2ba677;
  --success-border: #7ec9ad;

  /* Semantic aliases */
  --yellow: var(--yellow-500);
  --ink: var(--gray-900);
  --ink-soft: var(--gray-600);
  --bg-alt: var(--gray-100);
  --line: var(--gray-300);

  /* Typography: Syne everywhere */
  --font: "Syne", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-h1: clamp(2.5rem, 1.4rem + 4.6vw, 4.5rem);   /* 72px max */
  --fs-h2: clamp(2rem, 1.2rem + 3.2vw, 3.5rem);     /* 56px max */
  --fs-h3: clamp(1.75rem, 1.2rem + 1.7vw, 2.5rem);  /* 40px max */
  --fs-body-l: 1.25rem;    /* 20px */
  --fs-body-m: 1rem;       /* 16px */
  --fs-body-s: .875rem;    /* 14px */
  --fs-button: .9375rem;   /* 15px, measured from the hero mockup (type table says 20px) */
  --fs-menu: 1rem;         /* 16px */
  --fs-link: .875rem;      /* 14px */
  --lh-head: 1.1;
  --lh-body: 1.3;
  --ls-head: -.01em;
  --ls-body: .005em;
  --ls-ui: .02em;

  --container: 1160px;   /* 1120px content + 2 x 20px gutter (mockups: content from x=160 to x=1280) */
  --gutter: 20px;
  --header-h: 80px;
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  font-size: var(--fs-body-m);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  color: var(--ink);
  background: var(--white);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-weight: 500; line-height: var(--lh-head); letter-spacing: var(--ls-head); margin: 0; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p { margin: 0 0 1em; }
strong { font-weight: 700; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; box-shadow: 0 0 0 6px var(--yellow); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--yellow); padding: .75rem 1rem; z-index: 100; }
.skip-link:focus { left: 0; }

/* ===== Highlight: yellow bar behind the upper part of the heading; wraps with the text ===== */
.hl {
  background-image: linear-gradient(var(--yellow), var(--yellow));
  background-repeat: no-repeat;
  background-size: 100% 60%;
  background-position: 0 0;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding: 0 .12em;
}

/* ===== Buttons (Design System: Primary | Secondary | Outline | Disabled; Large + Small) ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px;
  padding: .75rem 2.25rem;
  font-family: var(--font);
  font-weight: 500;
  font-size: var(--fs-button);
  line-height: var(--lh-head);
  letter-spacing: var(--ls-ui);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  background: var(--yellow);
  border: 1px solid var(--yellow);
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s, transform .2s;
}
.btn:hover { background: var(--gray-900); border-color: var(--gray-900); color: var(--yellow); transform: translateY(-1px); }
.btn-secondary { background: var(--gray-900); border-color: var(--gray-900); color: var(--white); }
.btn-secondary:hover { background: var(--gray-700); border-color: var(--gray-700); }
.btn-outline { border-color: var(--black); }
.btn-outline:hover { border-color: var(--gray-900); }
.btn:disabled:hover, .btn[aria-disabled="true"]:hover { background: var(--gray-200); border-color: var(--gray-200); color: var(--gray-400); }
.btn:disabled, .btn[aria-disabled="true"] {
  background: var(--gray-200); border-color: var(--gray-200); color: var(--gray-400);
  cursor: not-allowed; transform: none;
}
.btn-small { min-height: 38px; padding: .5rem 1.5rem; font-size: .8125rem; }
.btn-block { width: 100%; }

/* ===== Header: logo + language switcher only, transparent over the hero ===== */
.site-header { position: absolute; top: 0; left: 0; right: 0; z-index: 20; height: var(--header-h); }
.site-header.solid { position: relative; background: var(--gray-100); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.logo { display: inline-block; line-height: 0; }
.logo img { height: 40px; width: auto; }
.lang { display: flex; gap: .5rem; }
.lang a {
  display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 .5rem;
  font-weight: 500; font-size: var(--fs-menu); line-height: 1; letter-spacing: var(--ls-ui);
  text-decoration: none; color: var(--ink);
  transition: background-color .2s;
}
.lang a:hover { background: var(--yellow-300); }
.lang a[aria-current="true"] { background: var(--yellow); }

/* ===== Hero: image is anchored to the bottom so its light-gray end flows into the About section ===== */
.hero {
  position: relative;
  height: clamp(560px, 55.56vw, 900px);   /* 1440 x 800 frame from the mockup */
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  color: var(--white);
  overflow: hidden;
  background: var(--gray-100) url("assets/img/hero-desktop.jpg") center bottom / cover no-repeat;
}
.hero::before { /* soft shade behind the headline for legibility */
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 45% 30% at 50% 42%, rgba(9,11,17,.35), transparent 70%);
}
.hero::after { /* smooth hand-over to the About section background (#EDEEF0) */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 16%;
  background: linear-gradient(to bottom, rgba(237,238,240,0), var(--gray-100));
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; padding: 4rem var(--gutter) 12rem; }
.hero h1 { text-shadow: 0 2px 28px rgba(9,11,17,.45); }
.hero .btn { position: absolute; z-index: 2; left: 50%; bottom: 64px; transform: translateX(-50%); white-space: nowrap; }
.hero .btn:hover { transform: translateX(-50%) translateY(-1px); }
@media (max-width: 720px) {
  .hero { height: min(92vh, 760px); background-image: url("assets/img/hero-mobile.jpg"); }
}

/* ===== Sections ===== */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-gray { background: var(--bg-alt); }
.section h2 { text-align: center; margin-bottom: 1.5rem; }
.section h2.left { text-align: left; }
.section-intro { max-width: 760px; margin: 0 auto 3rem; text-align: center; font-size: var(--fs-body-l); }

/* ===== About ===== */
.about-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; margin-top: 3rem; }
.about-photo { width: 100%; object-fit: cover; background: var(--gray-200); aspect-ratio: 3 / 4; }
.about-text .lead { font-weight: 700; font-size: var(--fs-body-l); }
@media (min-width: 900px) {
  .about-grid { grid-template-columns: 5fr 7fr; gap: 3rem; align-items: start; }
  .about-text { column-count: 2; column-gap: 2.5rem; }
  .about-text p { break-inside: avoid; }
}

/* ===== Values ===== */
.values { list-style: none; margin: 3rem 0 0; padding: 0; display: grid; gap: 3rem; grid-template-columns: 1fr; }
.value-number {
  display: inline-block;
  font-weight: 500;
  font-size: 3.5rem; line-height: 1;
  background: var(--yellow);
  padding: .12em .22em .06em;
  margin-bottom: 1.75rem;
}
.values h3 { margin-bottom: .75rem; }
@media (min-width: 800px) { .values { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; } }

/* ===== Project cards ===== */
.cards { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 800px) { .cards { grid-template-columns: 1fr 1fr; gap: 2rem; } }
.card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 2rem;
  display: flex; flex-direction: column;
  position: relative;
  transition: border-color .2s;
}
.card:hover { border-color: var(--ink); }
.card-logo { min-height: 64px; display: flex; align-items: center; margin-bottom: 1.25rem; font-weight: 700; font-size: var(--fs-body-l); }
.card-logo img { max-height: 56px; width: auto; }
.kicker { font-weight: 700; font-size: var(--fs-body-s); letter-spacing: var(--ls-ui); text-transform: uppercase; color: var(--ink-soft); margin-bottom: .75rem; }
.card p { color: var(--ink); }
.card-link {
  display: inline-flex; align-items: center; gap: .5rem;
  align-self: flex-start;
  margin-top: auto; padding-top: 1rem;
  font-weight: 500; font-size: var(--fs-link); letter-spacing: var(--ls-ui); line-height: var(--lh-head);
  text-transform: uppercase;
  color: var(--gray-600);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
  transition: color .2s;
}
.card-link .icon { width: 20px; height: 20px; flex: none; }
.card:hover .card-link, .card-link:hover { color: var(--ink); }
.card-link::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */

/* ===== Logo wall: 4 per row, full colour, not interactive ===== */
.logo-wall {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 2rem 1.5rem;
  grid-template-columns: repeat(2, 1fr);
}
/* Logos are drawn at the same visual weight: the display width (--w) is computed from each logo's
   aspect ratio so that every logo covers roughly the same area (wide ones are capped, square ones stay compact). */
.logo-wall { --k: .8; }
.logo-wall li { height: 112px; display: grid; place-items: center; padding: .25rem; pointer-events: none; user-select: none; -webkit-user-select: none; }
.logo-wall img {
  width: calc(var(--w) * var(--k) * 1px); max-width: 100%; height: auto;
  pointer-events: none; user-select: none; -webkit-user-select: none; -webkit-user-drag: none;
}
@media (min-width: 700px) { .logo-wall { grid-template-columns: repeat(4, 1fr); --k: 1; } .logo-wall li { height: 120px; } }

/* ===== Contact ===== */
.contact-grid { display: grid; gap: 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; } }
#contact .container > h2 { text-align: center; margin-bottom: 1.5rem; }
.contact-lead { max-width: 1000px; margin: -.5rem auto 3.5rem; text-align: center; font-size: var(--fs-body-m); line-height: 1.8; color: var(--gray-700); }
.contact-intro { color: var(--gray-700); }
@media (max-width: 699px) { .lead-br { display: none; } }
.contact-sub { font-size: clamp(1.75rem, 1.2rem + 1.7vw, 2.5rem); font-weight: 400; margin: 0 0 2rem; color: var(--ink); }
.models { list-style: none; margin: 0 0 2rem; padding: 0; }
.models li { padding: 1rem 0 1.1rem; border-top: 1px solid var(--gray-300); line-height: 1.45; }
.models li:last-child { border-bottom: 1px solid var(--gray-300); }
.models strong { display: block; margin-bottom: .35rem; font-size: 1.5rem; font-weight: 400; line-height: 1.2; letter-spacing: var(--ls-head); }
.contact-cta { font-size: 1.125rem; font-weight: 500; line-height: 1.45; margin: 0; color: var(--gray-700); }

.contact-form { background: var(--white); border: 1px solid var(--line); padding: 2rem; }
.field { margin-bottom: 1.25rem; }
.field label { display: block; font-size: var(--fs-body-s); font-weight: 400; color: var(--gray-600); margin-bottom: .4rem; }
.control { position: relative; }
.field input[type="text"], .field input[type="email"], .field textarea {
  width: 100%; font: inherit; letter-spacing: inherit; color: var(--ink);
  padding: .8rem 2.75rem .8rem .95rem;
  border: 1px solid var(--gray-300); background: var(--white); border-radius: 0;
  transition: border-color .2s, background-color .2s;
}
.field textarea { min-height: 8rem; padding-right: .95rem; resize: vertical; }
.field ::placeholder { color: var(--gray-500); opacity: 1; }
.field input[type="text"]:hover, .field input[type="email"]:hover, .field textarea:hover,
.field input[type="text"]:focus, .field input[type="email"]:focus, .field textarea:focus { border-color: var(--black); }
/* Softer focus for fields: black border (as in the Design System) plus a thin yellow ring */
.field input[type="text"]:focus-visible, .field input[type="email"]:focus-visible, .field textarea:focus-visible {
  outline: 2px solid var(--yellow); outline-offset: 0; box-shadow: none; border-color: var(--black);
}
.field input:disabled, .field textarea:disabled { background: var(--gray-100); border-color: var(--gray-600); color: var(--gray-500); cursor: not-allowed; }
.field.is-valid input { border-color: var(--success-border); }
.field.is-invalid input, .field.is-invalid textarea { border-color: var(--error-border); }
.state-icon { display: none; position: absolute; right: .8rem; top: 50%; width: 20px; height: 20px; margin-top: -10px; pointer-events: none; }
.field.is-valid .icon-ok { display: block; color: var(--success); }
.field.is-invalid .icon-err { display: block; color: var(--error); }
.error { color: var(--error); font-size: var(--fs-body-s); margin: .4rem 0 0; }

/* Checkbox (Design System: 20px square, black 1.5px border, check mark when selected) */
.field.check { display: grid; grid-template-columns: auto 1fr; gap: .25rem .75rem; align-items: start; }
.field.check input {
  -webkit-appearance: none; appearance: none;
  width: 20px; height: 20px; margin: .1rem 0 0;
  border: 1.5px solid var(--black); border-radius: 0; background: var(--white);
  cursor: pointer;
}
.field.check input:checked {
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.9997 15.1709L19.1921 5.97852L20.6063 7.39273L9.9997 17.9993L3.63574 11.6354L5.04996 10.2212L9.9997 15.1709Z'/%3E%3C/svg%3E") center / 18px no-repeat;
}
.field.check input:disabled { border-color: var(--gray-400); cursor: not-allowed; }
.field.check label { font-size: var(--fs-body-m); color: var(--ink); margin: 0; }
.field.check .error { grid-column: 2; }
.form-status { margin: 1rem 0 0; padding: .9rem 1rem; background: var(--yellow-200); border-left: 6px solid var(--yellow); font-weight: 500; }

/* ===== Footer ===== */
.site-footer { background: var(--gray-900); color: var(--white); padding: 5rem 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 2.5rem; flex-wrap: wrap; }
/* The logo is exactly as wide as the copyright line: the image does not count towards the
   column width (width 0 + min-width 100%), so the text decides and the logo stretches to it. */
.footer-brand { display: grid; width: max-content; gap: 1.25rem; }
.footer-brand img { width: 0; min-width: 100%; height: auto; display: block; }
.copyright { margin: 0; white-space: nowrap; font-size: .8125rem; color: var(--white); }
.footer-links { list-style: none; margin: 0; padding: 0; text-align: center; }
.footer-links a { display: inline-block; padding: .45rem 0; font-weight: 500; font-size: .9375rem; letter-spacing: var(--ls-ui); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; text-decoration-color: var(--yellow); text-underline-offset: 4px; }
.footer-contact { font-style: normal; text-align: right; display: grid; gap: .25rem; }
.footer-contact strong { font-size: 1.125rem; font-weight: 500; margin-bottom: .35rem; }
.footer-contact span, .footer-contact a { font-size: var(--fs-body-m); }
.footer-contact a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; justify-self: end; }
.footer-contact a:hover { text-decoration-color: var(--yellow); }
@media (max-width: 760px) {
  .site-footer { padding: 3.5rem 0; }
  .footer-inner { flex-direction: column; }
  .footer-links { text-align: left; }
  .footer-contact { text-align: left; }
  .footer-contact a { justify-self: start; }
}

/* ===== Legal pages (Impressum, Datenschutz) ===== */
.page-title { text-align: center; font-size: var(--fs-h2); margin: 3rem 0 2.5rem; }
.legal { padding-bottom: 5rem; }
.legal h2 { font-size: 1.375rem; font-weight: 700; letter-spacing: 0; line-height: 1.2; margin: 1.6rem 0 .4rem; }
.legal p { margin: 0 0 .75em; }
.legal ul { margin: 0 0 1em; padding-left: 1.25rem; list-style: square; }
.legal li { margin-bottom: .35rem; }
.legal a { text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* ===== Dev helper: outlines unconfirmed content. Delete this rule before launch. ===== */
[data-todo] { outline: 2px dashed #ff8a00; outline-offset: 2px; }

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