/* KNWBau
   Property development consortium for landowners. Native CSS for Infomaniak.
   Variance 7, motion 5, density 3.
   Ink carries text and buttons. Teal #35adc2 is used only for lines and markers.
   Radius 6px on images, buttons, inputs, panels.
   z-index: 10 header, 20 mobile nav, 30 skip link.
*/

@font-face {
  font-family: Geist;
  src: url("/assets/fonts/geist-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Geist;
  src: url("/assets/fonts/geist-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Geist;
  src: url("/assets/fonts/geist-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f4f6f7;
  --tint: #e7edf0;
  --surface: #fbfcfd;
  --ink: #132f3d;
  --muted: #4b6371;
  --line: #d2dbe0;
  --field-line: #8397a3;
  --accent: #35adc2;
  --button-bg: #153243;
  --button-text: #f4f6f7;
  --button-hover: #22495c;
  --shadow: 0 24px 48px rgb(19 47 61 / 14%);
  --radius: 6px;
  --header-h: 76px;
  --wrap: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e212b;
    --tint: #132d3a;
    --surface: #15313e;
    --ink: #e6edf0;
    --muted: #a9bcc6;
    --line: #2a4452;
    --field-line: #5d7a89;
    --button-bg: #35adc2;
    --button-text: #0e212b;
    --button-hover: #5bc0d1;
    --shadow: 0 24px 48px rgb(0 0 0 / 38%);
    color-scheme: dark;
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: Geist, "Segoe UI", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 500;
  color: var(--ink);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.4rem, 5.6vw, 5.25rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

h2 {
  font-size: clamp(1.85rem, 3vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

h3 {
  font-size: 1.1875rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
  text-wrap: pretty;
}

p + p {
  margin-top: 1rem;
}

h2 + p {
  margin-top: 1.25rem;
}

.muted {
  color: var(--muted);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 30;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}

.skip:focus {
  top: 0.75rem;
}

.wrap {
  width: min(var(--wrap), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

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

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--header-h);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: flex;
  align-items: center;
  line-height: 0;
}

.brand img,
.footer-brand {
  height: 26px;
  width: auto;
}

.brand-dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  .brand-light {
    display: none;
  }

  .brand-dark {
    display: block;
  }
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}

.site-nav a {
  position: relative;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
}

.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.45rem;
  height: 1px;
  background: var(--accent);
}

.nav-toggle {
  display: none;
  min-height: 44px;
  padding: 0 0.25rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

/* Shared pieces */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: var(--accent);
}

.lede {
  font-size: 1.1875rem;
  line-height: 1.5;
  color: var(--muted);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 1.6rem;
  border: 0;
  border-radius: var(--radius);
  background: var(--button-bg);
  color: var(--button-text);
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.button:hover {
  background: var(--button-hover);
}

.button:active {
  transform: scale(0.98);
}

.button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.text-link {
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
}

.section {
  padding: clamp(4.5rem, 10vw, 8rem) 0;
}

.section-tint {
  background: var(--tint);
}

.section-flush {
  padding-top: 0;
}

.prose {
  max-width: 65ch;
}

.media-frame {
  overflow: hidden;
  border-radius: var(--radius);
}

.media-frame img {
  width: 100%;
}

/* Home hero */

.hero {
  padding-top: clamp(2.5rem, 7vh, 4.5rem);
}

.hero-grid {
  display: grid;
  gap: 1.75rem;
}

.hero h1 {
  max-width: 10.5em;
}

.hero-aside {
  display: grid;
  gap: 1.5rem;
  justify-items: start;
}

.hero-aside .lede {
  max-width: 30ch;
}

.hero-media {
  margin-top: clamp(2.25rem, 5vh, 3.5rem);
}

.hero-media img {
  height: clamp(260px, 54vh, 600px);
  object-fit: cover;
  object-position: center 62%;
}

.hero-media-short img {
  height: clamp(240px, 46vh, 520px);
  object-position: center 55%;
}

/* Intro statement */

.statement {
  max-width: 19ch;
  font-size: clamp(1.9rem, 3.6vw, 3.25rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.intro-body {
  display: grid;
  gap: 1rem;
  margin-top: 2.5rem;
}

.intro-body p + p {
  margin-top: 0;
}

/* Image and copy */

.work-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

.work-media {
  position: relative;
  margin: 0;
  padding-bottom: 16%;
}

.work-media-single {
  padding-bottom: 0;
}

.work-photo {
  aspect-ratio: 945 / 502;
  object-fit: cover;
}

.work-sketch {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 46%;
  border-radius: var(--radius);
  box-shadow: 0 0 0 8px var(--bg), var(--shadow);
}

.work-copy p {
  color: var(--muted);
}

/* Region */

.region-grid {
  display: grid;
  gap: 3rem;
}

.region-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.region-list li {
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
  font-size: clamp(1.75rem, 3.4vw, 3rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

/* Seller */

.seller-grid {
  display: grid;
  gap: 2.5rem;
}

.seller-intro p {
  max-width: 44ch;
  color: var(--muted);
}

.benefits {
  list-style: none;
  margin: 0;
  padding: 0;
}

.benefits li {
  padding: 1.75rem 0;
  border-top: 1px solid var(--line);
}

.benefits li:last-child {
  border-bottom: 1px solid var(--line);
}

.benefits p {
  max-width: 48ch;
  margin-top: 0.5rem;
  color: var(--muted);
}

/* Closing panel */

.section-closing {
  padding-top: 0;
}

.panel {
  padding: clamp(2rem, 5vw, 4.5rem);
  border-radius: var(--radius);
  background: var(--tint);
}

.panel-grid {
  display: grid;
  gap: 2rem;
}

.guarantees {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem 3rem;
}

.guarantees li {
  position: relative;
  padding-left: 1.75rem;
}

.guarantees li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.8em;
  width: 1rem;
  height: 2px;
  background: var(--accent);
}

.panel-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.panel-simple .panel-cta {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

/* Sub pages */

.page-hero {
  padding: clamp(3rem, 9vh, 6rem) 0 clamp(3rem, 7vh, 4.5rem);
}

.page-hero h1 {
  max-width: 12em;
}

.page-lede {
  max-width: 44ch;
  margin-top: 1.75rem;
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  line-height: 1.5;
  color: var(--muted);
}

.page-hero .button {
  margin-top: 2rem;
}

/* Contact */

.contact-grid {
  display: grid;
  gap: 3rem;
  align-items: start;
}

.contact-grid h2 {
  margin-bottom: 1.75rem;
  font-size: clamp(1.5rem, 2.2vw, 1.9rem);
}

.facts {
  display: grid;
  gap: 2rem;
  margin: 0;
}

.facts dt,
.legal-grid h2 {
  margin-bottom: 0.6rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.facts dd {
  margin: 0;
  font-size: 1.1875rem;
  line-height: 1.55;
}

.facts a,
.legal-grid a {
  text-decoration: none;
}

.facts a:hover,
.legal-grid a:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 0.25em;
}

.form-panel {
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.field-row {
  display: grid;
  gap: 0 1.25rem;
}

.field {
  margin-bottom: 1.25rem;
}

.field label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
}

.optional {
  font-weight: 400;
  color: var(--muted);
}

input,
textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--field-line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  transition: border-color 0.2s ease;
}

input:hover,
textarea:hover {
  border-color: var(--ink);
}

input:focus-visible,
textarea:focus-visible {
  border-color: var(--ink);
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}

textarea {
  min-height: 10rem;
  resize: vertical;
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 0.5rem;
}

.form-note {
  max-width: 34ch;
  font-size: 0.9375rem;
  color: var(--muted);
}

.form-banner {
  margin-bottom: 1.5rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius);
  background: var(--bg);
}

.form-banner a {
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Impressum */

.legal-grid {
  display: grid;
  gap: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}

/* Footer */

.site-footer {
  padding: 4.5rem 0 2rem;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  gap: 2.5rem;
}

.footer-brand {
  margin-bottom: 1.25rem;
}

.footer-address {
  font-size: 0.9375rem;
  color: var(--muted);
}

.footer-links {
  display: grid;
  gap: 0.6rem;
  align-content: start;
}

.footer-links a {
  width: fit-content;
  font-size: 0.9375rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--ink);
}

.footer-bottom {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--muted);
}

/* Layout breakpoints */

@media (min-width: 768px) {
  .field-row {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }

  .legal-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) 20rem;
    align-items: end;
    gap: 4rem;
  }

  .intro-body {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 3.5rem;
    margin-left: 33.333%;
  }

  .work-grid {
    grid-template-columns: 7fr 5fr;
    gap: 5.5rem;
  }

  .work-grid-reverse {
    grid-template-columns: 5fr 7fr;
  }

  .work-sketch {
    right: -1.75rem;
  }

  .region-grid {
    grid-template-columns: 5fr 7fr;
    gap: 5rem;
    align-items: end;
  }

  .seller-grid {
    grid-template-columns: 5fr 6fr;
    gap: 6rem;
    align-items: start;
  }

  .seller-intro {
    position: sticky;
    top: calc(var(--header-h) + 2.5rem);
  }

  .panel-grid {
    gap: 2.5rem;
  }

  .guarantees {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 4rem;
    font-size: 1.125rem;
  }

  .panel-simple {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
  }

  .contact-grid {
    grid-template-columns: 5fr 7fr;
    gap: 5rem;
  }
}

@media (max-width: 959px) {
  .work-grid-reverse .work-media {
    order: -1;
  }
}

@media (max-width: 767px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
  }

  .site-nav {
    display: none;
    position: absolute;
    z-index: 20;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem var(--gutter) 1rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 1.0625rem;
  }

  .site-nav a:last-child {
    border-bottom: 0;
  }

  .site-nav a[aria-current="page"]::after {
    display: none;
  }

  .hero-media img,
  .hero-media-short img {
    height: 280px;
  }
}

/* Motion */

@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
    transition-delay: calc(var(--d, 0) * 90ms);
  }

  .js [data-reveal].is-visible,
  .revealed [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .js [data-reveal] .media-frame img {
    transform: scale(1.06);
    transition: transform 1.6s var(--ease);
  }

  .js [data-reveal].is-visible .media-frame img,
  .revealed [data-reveal] .media-frame img {
    transform: none;
  }

  .hero-media img {
    animation: settle 1.8s var(--ease) both;
  }
}

@keyframes settle {
  from {
    transform: scale(1.06);
  }

  to {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button,
  input,
  textarea {
    transition: none;
  }
}
