/* ==========================================================================
   Projektarbeit Transportsystem – Seite im Stil eines technischen Zeichnungsblatts
   Farben nach dem Projektflyer (Salbeigrün) und dem Grün von Franken Apparatebau
   ========================================================================== */

@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("../fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url("../fonts/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("../fonts/barlow-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 500; font-display: swap; src: url("../fonts/barlow-condensed-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url("../fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("../fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); }

:root {
  --desk: #CAD7CE;        /* Salbeigrün aus dem Flyer – Hintergrund */
  --paper: #FFFFFF;       /* Zeichenblatt */
  --ink: #2C302E;         /* Text und Linien */
  --ink-2: #57605A;       /* Nebentext */
  --rule: #CBD3CE;        /* feine Tabellenlinien */
  --green: #7B9B83;       /* Grün von Franken Apparatebau */
  --green-dark: #3E6147;  /* Links, Fokus */

  --pad: clamp(1.1rem, 4vw, 3rem);
  --measure: 42rem;
  --cond: "Barlow Condensed", "Arial Narrow", sans-serif;
  --sans: "Barlow", system-ui, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--desk);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
}

h1, h2, h3 { font-family: var(--cond); margin: 0; }
p, dl, dd, ul, ol, figure, blockquote { margin: 0; }
img { max-width: 100%; height: auto; }

a { color: var(--green-dark); text-underline-offset: .18em; }

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

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Blatt mit Rahmenlinie ---------- */

.sheet {
  max-width: 68rem;
  margin: .5rem;
  padding: var(--pad);
  padding-bottom: 0;
  background: var(--paper);
  border: 2px solid var(--ink);
}

@media (min-width: 48rem) {
  .sheet { margin: 2rem auto; width: calc(100% - 4rem); }
}

.sheet-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0 1.5rem;
  font-size: .9rem;
  color: var(--ink-2);
}

/* ---------- Kopf ---------- */

.intro { margin-top: clamp(1.75rem, 6vw, 4rem); }

.intro h1 {
  font-size: clamp(2.75rem, 11.5vw, 7.5rem);
  font-weight: 700;
  line-height: .9;
  letter-spacing: -.015em;
}

.tagline {
  margin-top: .5rem;
  font-family: var(--cond);
  font-size: clamp(1.3rem, 3.2vw, 1.75rem);
  font-weight: 500;
  color: var(--ink-2);
}

.lead {
  margin-top: 1.25rem;
  max-width: var(--measure);
  font-size: clamp(1.125rem, 2.4vw, 1.3rem);
  line-height: 1.45;
}

.byline { margin-top: .75rem; color: var(--ink-2); max-width: var(--measure); }

/* ---------- Videos ---------- */

/* Titelbild */
.cover {
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
  margin-inline: calc(var(--pad) * -1);
}

.cover img { display: block; width: 100%; height: auto; }

@media (min-width: 48rem) {
  .cover { margin-inline: 0; }
}

/* Anforderungen */
.requirements .intro-text { margin-bottom: 1.5rem; }

.req-grid {
  display: grid;
  gap: 1.5rem 2rem;
}

@media (min-width: 52rem) {
  .req-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.req-grid article {
  padding-top: .8rem;
  border-top: 3px solid var(--green);
}

.req-grid h3 { font-size: 1.35rem; font-weight: 600; line-height: 1.2; margin-bottom: .5rem; }

.req-grid ul { padding-left: 1.1rem; }
.req-grid li + li { margin-top: .4rem; }
.req-grid li::marker { color: var(--green); }

.video-frame {
  position: relative;
  margin-inline: calc(var(--pad) * -1);
  aspect-ratio: var(--ratio, 16 / 9);
  max-height: 82svh;
  background: var(--ink);
}

@media (min-width: 48rem) {
  .video-frame { margin-inline: 0; }
}

.video-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--ink);
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: .9rem;
  width: 100%;
  padding: 1rem;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.play-overlay[hidden] { display: none; }

.play-icon {
  display: grid;
  place-items: center;
  width: clamp(4.5rem, 16vw, 6.5rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .85);
  transition: transform .15s ease-out;
}

.play-icon svg { width: 40%; margin-left: 8%; }

.play-overlay:hover .play-icon,
.play-overlay:focus-visible .play-icon { transform: scale(1.06); }

.play-overlay:focus-visible { outline-offset: -6px; outline-color: #fff; }

.play-label {
  padding: .2rem .65rem;
  background: var(--ink);
  font-family: var(--cond);
  font-size: 1.15rem;
  font-weight: 600;
}

.play-overlay.is-error { cursor: default; background: var(--ink); }
.play-overlay.is-error .play-label { max-width: 30rem; text-align: center; font-family: var(--sans); font-weight: 400; }

/* Kapitel (optional) */

.chapters ol {
  list-style: none;
  padding: 0;
  margin-top: .9rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem 1rem;
}

@media (min-width: 48rem) {
  .chapters ol { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.chapters button {
  width: 100%;
  min-height: 2.75rem;
  padding: .45rem 0 .2rem;
  border: 0;
  border-top: 3px solid var(--rule);
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}

.chapters button:hover { border-top-color: var(--ink-2); }
.chapters button[aria-current="true"] { border-top-color: var(--green); font-weight: 600; }
.tc { display: block; font-size: .85rem; color: var(--ink-2); font-weight: 400; }

/* ---------- Inhaltsblöcke ---------- */

.block { margin-top: clamp(3rem, 8vw, 5rem); }

.block h2 {
  font-size: clamp(1.75rem, 4.5vw, 2.4rem);
  font-weight: 600;
  line-height: 1.05;
  margin-bottom: 1.1rem;
}

.prose { max-width: var(--measure); }

/* Ausgangslage / Anforderungen / Lösung */

.story { max-width: 54rem; }

.story dt {
  font-family: var(--cond);
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 1.4rem;
}

.story dt:first-child { margin-top: 0; }
.story dd { max-width: var(--measure); }

.reqs { padding-left: 1.1rem; }
.reqs li + li { margin-top: .35rem; }
.reqs li::marker { color: var(--green); }
.reqs strong { font-weight: 600; }

@media (min-width: 48rem) {
  .story { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 1.5rem 2rem; }
  .story dt { margin-top: 0; padding-top: .05rem; }
}

/* ---------- Tabellen ---------- */

table { border-collapse: collapse; width: 100%; }

.compare th, .compare td, .datasheet th, .datasheet td {
  padding: .65rem 1rem .65rem 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

.compare { max-width: 54rem; }

.compare thead th {
  border-bottom: 2px solid var(--ink);
  font-size: .9rem;
  font-weight: 500;
  color: var(--ink-2);
  padding-top: 0;
}

.compare thead th:last-child { color: var(--ink); font-weight: 600; }
.compare tbody th { font-weight: 500; width: 32%; }
.compare td:nth-child(2) { color: var(--ink-2); }
.compare td:nth-child(3) { font-weight: 600; }
.fn { display: block; font-size: .85rem; font-weight: 400; color: var(--ink-2); }

.datasheet { max-width: 54rem; border-top: 2px solid var(--ink); }
.datasheet th { width: 40%; font-weight: 400; color: var(--ink-2); }
.datasheet td { font-weight: 500; }
.datasheet td.num { font-family: var(--cond); font-size: 1.3rem; font-weight: 600; line-height: 1.25; }

/* Handy: Vergleich untereinander statt in Spalten */
@media (max-width: 36rem) {
  .compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .compare, .compare tbody { display: block; }
  .compare tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .2rem 1rem;
    padding: .75rem 0;
    border-bottom: 1px solid var(--rule);
  }
  .compare tbody tr:first-child { border-top: 2px solid var(--ink); }
  .compare tbody th, .compare td { padding: 0; border: 0; width: auto; }
  .compare tbody th { grid-column: 1 / -1; font-weight: 600; }
  .compare td::before { display: block; font-size: .8rem; font-weight: 400; color: var(--ink-2); }
  .compare td:nth-child(2)::before { content: "Bisher"; }
  .compare td:nth-child(3)::before { content: "Neu"; }
  .datasheet th { width: 44%; }
}

/* ---------- Baugruppen ---------- */

.parts {
  display: grid;
  gap: 2.25rem 2rem;
}

@media (min-width: 52rem) {
  .parts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.part figure {
  aspect-ratio: 3 / 2;
  padding: .75rem;
  background: var(--desk);
  margin-bottom: 1rem;
}

.part img { display: block; width: 100%; height: 100%; object-fit: contain; }

.part h3 { font-size: 1.35rem; font-weight: 600; line-height: 1.2; margin-bottom: .4rem; }
.part p { max-width: var(--measure); }
.part p + p { margin-top: .6rem; }

/* ---------- Konstruktion ---------- */

.assemblies {
  margin-top: 1.75rem;
  display: grid;
  gap: 1.75rem 2.5rem;
}

@media (min-width: 52rem) {
  .assemblies { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.assemblies article { padding-top: .8rem; border-top: 3px solid var(--green); }
.assemblies h3 { font-size: 1.5rem; font-weight: 600; line-height: 1.15; }
.assemblies p { max-width: var(--measure); }

.figures {
  display: flex;
  flex-wrap: wrap;
  gap: .15rem 1.25rem;
  margin: .25rem 0 .6rem;
  font-family: var(--cond);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--green-dark);
}

.hint-line {
  margin-top: .6rem;
  padding-left: .75rem;
  border-left: 3px solid var(--green);
  font-size: .95rem;
}

.subhead { margin: 2.5rem 0 .75rem; font-size: 1.35rem; font-weight: 600; }

/* ---------- Partnerbetrieb ---------- */

.partner blockquote {
  margin-top: 1.5rem;
  padding-left: 1.1rem;
  border-left: 4px solid var(--green);
}

.partner blockquote p {
  font-family: var(--cond);
  font-size: clamp(1.6rem, 4.5vw, 2.25rem);
  font-weight: 600;
  line-height: 1.1;
}

.partner blockquote footer { margin-top: .4rem; font-size: .9rem; color: var(--ink-2); }

/* ---------- Team ---------- */

.team {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 1.25rem 2rem;
}

.team li {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: 1rem;
}

.team img {
  grid-row: 1 / span 2;
  width: 5.5rem;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  background: var(--rule);
}

.team .name { align-self: end; font-family: var(--cond); font-size: 1.3rem; font-weight: 600; line-height: 1.2; }
.team .role { align-self: start; color: var(--ink-2); }

@media (min-width: 52rem) {
  .team { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .team li { grid-template-columns: 1fr; }
  .team img { grid-row: auto; width: 9rem; margin-bottom: .75rem; }
}

/* ---------- Schriftfeld (unten rechts, an der Rahmenlinie) ---------- */

.titleblock-wrap {
  margin-top: clamp(3.5rem, 9vw, 6rem);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.titleblock {
  width: calc(100% + var(--pad));
  margin-right: calc(var(--pad) * -1);
  border-top: 2px solid var(--ink);
  border-left: 2px solid var(--ink);
  table-layout: fixed;
}

@media (min-width: 48rem) {
  .titleblock { width: 46rem; }
}

.titleblock .tb-label { width: 6rem; }

.titleblock th, .titleblock td {
  padding: .5rem .6rem .55rem;
  border: 1px solid var(--ink);
  vertical-align: top;
  text-align: left;
}

.titleblock tr:first-child > * { border-top: 0; }
.titleblock tr:last-child > * { border-bottom: 0; }
.titleblock tr > :last-child { border-right: 0; }

.titleblock th {
  font-size: .78rem;
  font-weight: 500;
  color: var(--ink-2);
  line-height: 1.3;
  padding-top: .6rem;
}

.titleblock td {
  font-family: var(--cond);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.tb-logos td {
  background: #fff;
  padding: .6rem .75rem;
}

.tb-logos .logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem 1.75rem;
}

.tb-logos img { height: 3.25rem; width: auto; }

.tb-online .online {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 1.3rem;
}

.tb-online a { color: var(--ink); }
.tb-online img { width: 5.5rem; height: auto; flex: none; }

.tb-title td {
  font-size: clamp(1.4rem, 3.6vw, 1.85rem);
  font-weight: 700;
  line-height: 1.05;
  padding-block: .65rem .75rem;
}

/* Schmale Handys: Schriftfeld zweispaltig untereinander */
@media (max-width: 30rem) {
  .titleblock, .titleblock tbody, .titleblock tr { display: block; }
  .titleblock tr {
    display: grid;
    grid-template-columns: 6rem minmax(0, 1fr);
  }
  .titleblock th, .titleblock td { border-width: 0 0 1px 0; }
  .titleblock th { border-right: 1px solid var(--ink); }
  .titleblock tr:last-child > * { border-bottom: 0; }
  .titleblock tr:first-child > * { border-top: 0; }
  .tb-logos td { grid-column: 1 / -1; border-bottom: 1px solid var(--ink); }
  .tb-logos img { height: 2.6rem; }
}

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