/* Fenster Profi Fit
   Palette taken from the RAL colours real windows are made in. */

/* Fonts are hosted here, not loaded from Google, so no visitor data leaves this site. */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("fonts/archivo-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;
}

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("fonts/archivo-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;

  --verkehrsweiss: #f4f5f1;   /* RAL 9016, standard PVC frame white */
  --lichtgrau: #d0d4cf;       /* RAL 7035, sills and dividers */
  --anthrazit: #383e42;       /* RAL 7016, the German window frame colour */
  --anthrazit-hell: #5b6368;
  --glas: #c9ded7;            /* float glass, seen face on */
  --glas-kante: #4f7a70;      /* float glass, seen at the edge */
  --signalgelb: #f2a900;      /* RAL 1003, only on things you can act on */
  --signalgelb-tief: #d99700;
  --weiss: #ffffff;

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;

  /* Classical scale: 14 / 18 / 21 / 24 / 36 / 48 / 72 */
  --t-small: 0.875rem;
  --t-body: 1.125rem;
  --t-lead: 1.3125rem;
  --t-h3: 1.5rem;
  --t-h2: clamp(2.25rem, 1.6rem + 2.4vw, 3rem);
  --t-h1: clamp(2.25rem, 1.2rem + 5vw, 4.5rem);

  --wide: 118%;
  --gutter: clamp(1rem, 0.4rem + 3vw, 3rem);
  --max: 76rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--verkehrsweiss);
  color: var(--anthrazit);
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.55;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  /* keeps the footer at the bottom on short pages */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}

main {
  flex: 1 0 auto;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-stretch: var(--wide);
  line-height: 1.1;
  text-wrap: balance;
  hyphens: auto;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--signalgelb);
  outline-offset: 3px;
  border-radius: 2px;
}

.nowrap {
  white-space: nowrap;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 10;
  padding: 0.5rem 1rem;
  background: var(--anthrazit);
  color: var(--weiss);
}

.skip:focus {
  top: 1rem;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Buttons: yellow means "you can act here", same as the window handle */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.75rem 1.5rem;
  border: 0;
  border-radius: 3px;
  background: var(--signalgelb);
  color: var(--anthrazit);
  font: inherit;
  font-weight: 700;
  font-stretch: var(--wide);
  text-decoration: none;
  cursor: pointer;
  box-shadow: inset 0 -3px 0 var(--signalgelb-tief);
}

.button:hover {
  background: #ffb914;
}

.button:active {
  box-shadow: none;
  transform: translateY(1px);
}

.button--small {
  min-height: 2.75rem;
  padding: 0.5rem 1.125rem;
  font-size: var(--t-small);
}

.button--block {
  width: 100%;
}

/* Header */

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding-block: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  margin-right: auto;
  text-decoration: none;
}

.brand__mark {
  width: 2rem;
  height: 2rem;
  flex: none;
}

.brand__name {
  font-weight: 800;
  font-stretch: 112%;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

.site-nav {
  display: flex;
  gap: 1.75rem;
}

.site-nav a {
  font-weight: 500;
  text-decoration: none;
  text-underline-offset: 0.3em;
}

.site-nav a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

/* Hero */

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding-block: clamp(2.5rem, 7vw, 6rem) clamp(3.5rem, 8vw, 7rem);
}

.hero h1 {
  font-size: var(--t-h1);
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: -0.025em;
  line-height: 1;
}

.hero__lede {
  max-width: 34em;
  margin-top: 1.75rem;
  font-size: var(--t-lead);
  line-height: 1.5;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 2rem;
  margin-top: 2.5rem;
}

.link-phone {
  display: grid;
  text-decoration: none;
  line-height: 1.25;
}

.link-phone__label {
  font-size: var(--t-small);
  color: var(--anthrazit-hell);
}

.link-phone__number {
  font-weight: 700;
  font-stretch: var(--wide);
  font-variant-numeric: tabular-nums;
}

.link-phone:hover .link-phone__number {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}

/* The window: a Dreh-Kipp sash you can operate with its handle */

.window {
  --frame: clamp(10px, 1.6vw, 16px);
  --profile: clamp(12px, 2vw, 20px);
  --open-speed: 650ms;
  margin: 0;
  justify-self: center;
  width: min(100%, 25rem);
}

.window__wall {
  padding-inline: 6%;
}

.window__frame {
  position: relative;
  aspect-ratio: 5 / 7;
  border: var(--frame) solid var(--anthrazit);
  border-radius: 2px;
  background: var(--anthrazit);
  perspective: 1400px;
  perspective-origin: 50% 50%;
  box-shadow:
    0 0 0 1px rgba(56, 62, 66, 0.25),
    0 24px 40px -24px rgba(56, 62, 66, 0.45);
}

/* What you see through the opening once the sash moves */
.window__outside {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 22% at 30% 28%, rgba(255, 255, 255, 0.9), transparent 70%),
    radial-gradient(ellipse 45% 16% at 78% 46%, rgba(255, 255, 255, 0.7), transparent 70%),
    linear-gradient(180deg, #a9cfe0 0%, #cfe5ec 62%, #e7f1ef 100%);
  /* shadow the sash casts into the opening */
  box-shadow: inset 0 14px 14px -10px rgba(35, 40, 43, 0.45);
}

.window__sash {
  position: absolute;
  inset: 0;
  border: var(--profile) solid var(--anthrazit);
  border-radius: 1px;
  background: var(--anthrazit);
  transform-style: preserve-3d;
  transition: transform var(--open-speed) cubic-bezier(0.3, 0.7, 0.2, 1) 120ms;
  /* the seam between sash and frame */
  box-shadow:
    0 0 0 1px #23282b,
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* Eye above the window for the tilt, so the gap at the top is visible.
   The hinge only changes while the sash is closed, so this never jumps. */
.window__frame:has(.window__sash[data-hinge="bottom"]) {
  perspective-origin: 50% -40%;
}

.window__sash[data-hinge="side"] {
  transform-origin: 0 50%;
}

.window__sash[data-hinge="bottom"] {
  transform-origin: 50% 100%;
}

.window__sash[data-state="dreh"] {
  transform: rotateY(-34deg);
}

.window__sash[data-state="kipp"] {
  transform: rotateX(-16deg);
}

.window__glass {
  position: absolute;
  inset: 0;
  /* the black gasket line between profile and glass */
  outline: 2px solid #23282b;
  background:
    linear-gradient(115deg, transparent 0 34%, rgba(255, 255, 255, 0.55) 34% 41%, transparent 41% 46%, rgba(255, 255, 255, 0.3) 46% 49%, transparent 49%),
    linear-gradient(180deg, rgba(79, 122, 112, 0.18), rgba(79, 122, 112, 0.32)),
    linear-gradient(180deg, #a9cfe0 0%, #cfe5ec 62%, #e7f1ef 100%);
}

.window__handle {
  --turn: 0deg;
  position: absolute;
  top: 50%;
  right: calc(var(--profile) * -0.5);
  width: 3rem;
  height: 3rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  translate: 50% -50%;
  cursor: pointer;
  z-index: 1;
}

.window__rosette {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1.125rem;
  height: 2.25rem;
  border-radius: 0.5625rem;
  background: var(--signalgelb);
  translate: -50% -50%;
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.35);
}

.window__lever {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.75rem;
  height: 3.75rem;
  margin-left: -0.375rem;
  margin-top: -0.375rem;
  border-radius: 0.375rem;
  background: var(--signalgelb);
  transform-origin: 50% 0.375rem;
  transform: rotate(var(--turn));
  transition: transform 260ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
    inset 0 -2px 0 var(--signalgelb-tief),
    0 3px 5px rgba(0, 0, 0, 0.35);
}

/* Handle pointing down = closed, sideways = Dreh, up = Kipp */
.window__sash[data-state="dreh"] .window__handle {
  --turn: 90deg;
}

.window__sash[data-state="kipp"] .window__handle {
  --turn: 180deg;
}

.window__handle:hover .window__rosette,
.window__handle:hover .window__lever {
  background: #ffb914;
}

.window__handle:focus-visible {
  outline-offset: 0;
  border-radius: 50%;
}

.window__sill {
  height: 0.875rem;
  margin-inline: -6%;
  border-radius: 0 0 2px 2px;
  background: var(--lichtgrau);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.7),
    0 10px 18px -12px rgba(56, 62, 66, 0.5);
}

.window__caption {
  display: grid;
  gap: 0.25rem;
  max-width: 24rem;
  min-height: 6.5em;
  margin-top: 1.5rem;
  margin-inline: 6%;
  font-size: var(--t-small);
  line-height: 1.5;
}

.window__hint {
  font-weight: 700;
}

.window__tip {
  color: var(--anthrazit-hell);
}

/* Services */

.services {
  padding-block: clamp(3.5rem, 8vw, 7rem);
  background: var(--weiss);
}

.services h2 {
  font-size: var(--t-h2);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.group {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: 1rem clamp(2rem, 5vw, 5rem);
  padding-block: 2rem 2.5rem;
  border-top: 3px solid var(--anthrazit);
}

.group__title {
  font-size: var(--t-body);
  font-weight: 700;
  font-stretch: 100%;
  line-height: 1.4;
  color: var(--glas-kante);
}

.group__items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem clamp(2rem, 4vw, 3.5rem);
}

.service h4 {
  font-size: var(--t-h3);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.service p {
  max-width: 36em;
  margin-top: 0.75rem;
}

.service--lead {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.75rem clamp(2rem, 4vw, 3.5rem);
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--lichtgrau);
}

.service--lead h4 {
  grid-column: 1 / -1;
  font-size: clamp(1.75rem, 1.3rem + 1.5vw, 2.25rem);
  font-weight: 800;
}

.service--lead p {
  margin-top: 0;
  font-size: var(--t-lead);
  line-height: 1.5;
}

.tasks {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tasks li {
  position: relative;
  text-wrap: pretty;
  padding: 0.5rem 0 0.5rem 1.75rem;
  border-bottom: 1px solid var(--lichtgrau);
}

.tasks li:first-child {
  padding-top: 0.25rem;
}

.tasks li:last-child {
  border-bottom: 0;
}

/* a tiny window pane as list marker */
.tasks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: calc(0.5rem + 0.35em);
  width: 0.75rem;
  height: 0.9rem;
  border: 2px solid var(--anthrazit);
  background: var(--glas);
}

.tasks li:first-child::before {
  top: calc(0.25rem + 0.35em);
}

/* Contact */

.contact {
  padding-block: clamp(3.5rem, 8vw, 7rem);
  background: var(--anthrazit);
  color: var(--verkehrsweiss);
}

.contact__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3rem clamp(2rem, 6vw, 6rem);
  align-items: start;
}

.contact h2 {
  font-size: var(--t-h2);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.contact__text > p {
  margin-top: 1rem;
  font-size: var(--t-lead);
}

.contact__phone {
  display: inline-block;
  margin-top: 2rem;
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.25rem);
  font-weight: 800;
  font-stretch: var(--wide);
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  color: var(--signalgelb);
}

.contact__mail {
  display: block;
  margin-top: 0.25rem;
  text-underline-offset: 0.25em;
}

.contact__phone:hover {
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 0.2em;
}

.contact__subhead {
  margin-top: 3rem;
  font-size: var(--t-body);
  font-weight: 700;
}

.contact__area {
  max-width: 34em;
  margin-top: 0.75rem;
}

.steps {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding: 0.625rem 0 0.625rem 2.75rem;
  border-top: 1px solid rgba(244, 245, 241, 0.18);
  counter-increment: step;
  text-wrap: pretty;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.625rem;
  width: 1.75rem;
  font-weight: 800;
  font-stretch: var(--wide);
  color: var(--glas);
}

/* Form: a light panel, like a sheet held against the dark wall */

.form {
  display: grid;
  gap: 1.25rem;
  padding: clamp(1.25rem, 3vw, 2.25rem);
  border-radius: 3px;
  background: var(--verkehrsweiss);
  color: var(--anthrazit);
}

.field {
  display: grid;
  gap: 0.375rem;
}

.field label {
  font-weight: 600;
}

.field__help,
.form__note {
  font-size: var(--t-small);
  color: var(--anthrazit-hell);
}

.form__note {
  margin-top: -0.5rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.625rem 0.875rem;
  border: 2px solid #9aa19f;
  border-radius: 3px;
  background: var(--weiss);
  color: var(--anthrazit);
  font: inherit;
  font-size: 1rem;
}

.field textarea {
  resize: vertical;
  line-height: 1.5;
}

.field select {
  appearance: none;
  padding-right: 2.5rem;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--anthrazit) 50%),
    linear-gradient(135deg, var(--anthrazit) 50%, transparent 50%);
  background-position:
    calc(100% - 1.25rem) 55%,
    calc(100% - 0.875rem) 55%;
  background-size: 0.375rem 0.375rem;
  background-repeat: no-repeat;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #7d8584;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--anthrazit-hell);
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  border-color: var(--anthrazit);
  outline-offset: 1px;
}

.field [aria-invalid="true"] {
  border-color: #b3261e;
}

.form__error {
  padding: 0.75rem 1rem;
  border-left: 4px solid #b3261e;
  background: #fbeceb;
  color: #7d1a15;
  font-size: var(--t-small);
}

/* Footer */

.site-footer {
  background: var(--anthrazit);
  color: var(--lichtgrau);
  font-size: var(--t-small);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 1rem 2.5rem;
  padding-block: 1.5rem 2rem;
  border-top: 1px solid rgba(244, 245, 241, 0.18);
}

.site-footer__name {
  margin-right: auto;
}

.site-footer nav {
  display: flex;
  gap: 1.5rem;
}

/* quieter than the legal links */
.site-footer__credit {
  color: #a7aeab;
}

.site-footer__credit a {
  color: inherit;
}

.site-footer__credit a:hover {
  color: var(--verkehrsweiss);
}

.site-footer a {
  text-underline-offset: 0.25em;
}

.site-footer a[aria-current="page"] {
  color: var(--verkehrsweiss);
  text-decoration-thickness: 2px;
}

/* On the legal pages nothing dark sits above the footer, so it needs no divider */
.site-footer--plain .site-footer__inner {
  padding-top: 2rem;
  border-top: 0;
}

/* Legal pages: Impressum, Datenschutz */

.legal {
  padding-block: clamp(2.5rem, 6vw, 5rem) clamp(4rem, 8vw, 7rem);
}

.legal__body {
  max-width: 42rem;
  hyphens: auto;
  overflow-wrap: break-word;
}

.legal h1 {
  font-size: var(--t-h2);
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: -0.02em;
}

.legal__updated {
  margin-top: 0.75rem;
  color: var(--anthrazit-hell);
}

.legal h2 {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 3px solid var(--anthrazit);
  font-size: var(--t-h3);
  font-weight: 700;
}

.legal h3 {
  margin-top: 2rem;
  font-size: var(--t-body);
  font-weight: 700;
  font-stretch: 100%;
}

.legal p,
.legal ul,
.legal address {
  margin-top: 0.875rem;
}

.legal ul {
  padding-left: 1.25rem;
}

.legal li + li {
  margin-top: 0.375rem;
}

.legal address {
  font-style: normal;
}

.legal a {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.legal a:hover {
  text-decoration-thickness: 2px;
}

.legal__lead {
  font-size: var(--t-lead);
  line-height: 1.5;
}

/* Responsive */

@media (max-width: 60rem) {
  .group {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 52rem) {
  .hero__inner,
  .contact__inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .window {
    width: min(100%, 21rem);
  }
}

@media (max-width: 40rem) {
  .site-nav {
    display: none;
  }

  .group__items,
  .service--lead {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .window__sash,
  .window__lever {
    transition: none;
  }
}
