/* =====================================================================
   Alpine Security Davos — "Swiss Editorial / Luxe" variant
   Hand-written CSS. One restrained brass accent, hairlines, big serif type.
   ===================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --bg:    #11100E;   /* warm near-black */
  --panel: #1A1813;
  --line:  rgba(242, 236, 224, .14);
  --line-strong: rgba(242, 236, 224, .28);
  --text:  #F2ECE0;   /* ivory */
  --muted: #A89C86;
  --brass: #B08D57;   /* single accent */

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --shell: 1280px;
  --gutter: clamp(20px, 5vw, 72px);

  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- 2. Reset / base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3 { margin: 0; font-weight: 400; }

ul, ol, dl, dd, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }

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

/* ---------- 3. Layout helpers ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(80px, 12vw, 160px); }

/* ---------- 4. Typography primitives ---------- */
.kicker {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0;
}

.section__title {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 300;
  font-size: clamp(2.1rem, 5.2vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--text);
}

.section__title em { font-style: italic; color: var(--brass); }

/* ---------- 5. Skip link ---------- */
.skip-link {
  position: absolute;
  left: 16px;
  top: -120px;
  z-index: 200;
  background: var(--text);
  color: var(--bg);
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 2px;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 16px; }

/* ---------- 6. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .02em;
  padding: 15px 30px;
  border: 1px solid transparent;
  border-radius: 0;
  cursor: pointer;
  transition: background-color .35s var(--ease), color .35s var(--ease),
              border-color .35s var(--ease);
}

.btn--primary {
  background: var(--brass);
  color: #161310;
  border-color: var(--brass);
}
.btn--primary:hover { background: #c49b62; border-color: #c49b62; }

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn--ghost:hover { border-color: var(--text); }

.btn--block { width: 100%; }

/* ---------- 7. Header / nav ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(17, 16, 14, .72);
  border-bottom: 1px solid transparent;
  transition: background-color .4s var(--ease), border-color .4s var(--ease);
}
.header.is-scrolled {
  background: rgba(17, 16, 14, .94);
  border-bottom-color: var(--line);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
}

.brand__logo { height: 36px; width: auto; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.4vw, 40px);
}

.nav__link {
  position: relative;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: .01em;
  padding-block: 6px;
  transition: color .3s var(--ease);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--ease);
}
.nav__link:hover,
.nav__link.is-active { color: var(--text); }
.nav__link:hover::after,
.nav__link.is-active::after { transform: scaleX(1); }

.nav__cta {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--text);
  padding: 11px 22px;
  border: 1px solid var(--line-strong);
  transition: border-color .3s var(--ease), background-color .3s var(--ease), color .3s var(--ease);
}
.nav__cta:hover { background: var(--brass); border-color: var(--brass); color: #161310; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
}
.nav-toggle__bar {
  display: block;
  width: 26px;
  height: 1.5px;
  background: var(--text);
  margin-inline: auto;
  transition: transform .35s var(--ease), opacity .25s var(--ease);
}
.nav-toggle.is-open .nav-toggle__bar:nth-child(1) { transform: translateY(3.75px) rotate(45deg); }
.nav-toggle.is-open .nav-toggle__bar:nth-child(2) { transform: translateY(-3.75px) rotate(-45deg); }

/* ---------- 8. Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(120px, 16vh, 200px) 40px;
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(100deg, rgba(17,16,14,.94) 0%, rgba(17,16,14,.74) 42%, rgba(17,16,14,.34) 75%, rgba(17,16,14,.5) 100%),
    linear-gradient(to top, rgba(17,16,14,.9) 0%, rgba(17,16,14,0) 38%);
}

.hero__inner { max-width: 1000px; }

.hero .kicker { margin-bottom: 26px; }

.hero__title {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 300;
  font-size: clamp(2.6rem, 7.2vw, 6.2rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--text);
  max-width: 16ch;
}
.hero__title em { font-style: italic; color: var(--brass); }

.hero__sub {
  margin-top: 30px;
  max-width: 46ch;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--muted);
  line-height: 1.6;
}

.hero__cta {
  margin-top: 44px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.hero__foot {
  margin-top: clamp(48px, 7vh, 90px);
  display: flex;
  align-items: center;
  gap: 22px;
}
.hero__foot-line { flex: 0 0 64px; height: 1px; background: var(--line-strong); }
.hero__foot-text {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: var(--muted);
  letter-spacing: -0.01em;
}

/* ---------- 9. Section head (numbered, editorial) ---------- */
.section__head {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  margin-bottom: clamp(48px, 7vw, 90px);
  max-width: 1000px;
}
.section__num {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(4rem, 12vw, 9rem);
  line-height: .8;
  color: var(--line);
  letter-spacing: -0.04em;
  user-select: none;
  pointer-events: none;
}
.section__head--bare .section__num { display: none; }
.section__heading .kicker { margin-bottom: 18px; }
.section__lede {
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
  color: var(--muted);
  max-width: 52ch;
  line-height: 1.6;
}

/* Place the big numeral as an offset editorial element on wider screens */
@media (min-width: 861px) {
  .section__head:not(.section__head--bare) {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "num heading"
      "num lede";
    column-gap: clamp(28px, 4vw, 60px);
    align-items: start;
  }
  .section__head .section__num { grid-area: num; align-self: start; }
  .section__head .section__heading { grid-area: heading; }
  .section__head .section__lede { grid-area: lede; padding-top: 8px; }
}

/* ---------- 10. Services editorial list ---------- */
.svc-list { border-top: 1px solid var(--line); }

.svc {
  position: relative;
  display: grid;
  grid-template-columns: clamp(56px, 7vw, 110px) 1fr;
  align-items: baseline;
  column-gap: clamp(20px, 4vw, 56px);
  padding-block: clamp(28px, 4vw, 46px);
  border-bottom: 1px solid var(--line);
  transition: padding-left .45s var(--ease);
}

.svc__index {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.4rem, 2.4vw, 2.1rem);
  color: var(--muted);
  letter-spacing: -0.02em;
  transition: color .4s var(--ease);
}

.svc__body { max-width: 60ch; }

.svc__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 3.4vw, 2.5rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--text);
}

.svc__desc {
  margin-top: 14px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.62;
}

/* growing brass underline under the row title */
.svc__rule {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 1px;
  width: 100%;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .55s var(--ease);
}
.svc:hover { padding-left: clamp(8px, 1.4vw, 20px); }
.svc:hover .svc__index { color: var(--brass); }
.svc:hover .svc__rule { transform: scaleX(1); }

/* ---------- 11. Quote band (alpine banner behind slogan) ---------- */
.quote-band {
  position: relative;
  padding-block: clamp(96px, 16vw, 200px);
  overflow: hidden;
  border-block: 1px solid var(--line);
}
.quote-band__media { position: absolute; inset: 0; z-index: -2; }
.quote-band__img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.quote-band__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(17,16,14,.92) 0%, rgba(17,16,14,.7) 55%, rgba(17,16,14,.55) 100%);
}

.pull-quote {
  position: relative;
  font-family: var(--serif);
  font-weight: 300;
  font-style: normal;
  font-size: clamp(2.2rem, 6vw, 5rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--text);
  max-width: 18ch;
}
.pull-quote em { font-style: italic; color: var(--brass); }
.pull-quote__mark {
  display: block;
  font-size: 1.4em;
  line-height: .4;
  color: var(--brass);
  margin-bottom: .1em;
}

/* ---------- 12. About ---------- */
.about__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
.about__figure {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: clamp(20px, 4vw, 48px);
}
.about__img { width: 100%; height: auto; object-fit: contain; }

.about__lead {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.2rem, 2.1vw, 1.6rem);
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--text);
}

.checklist {
  margin-top: clamp(28px, 4vw, 44px);
  border-top: 1px solid var(--line);
}
.checklist__item {
  position: relative;
  padding: 18px 0 18px 34px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 1.02rem;
}
.checklist__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 27px;
  width: 16px;
  height: 1px;
  background: var(--brass);
}

@media (min-width: 861px) {
  .about__grid { grid-template-columns: 0.9fr 1.1fr; }
}

/* ---------- 13. Einsätze gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(12px, 1.6vw, 22px);
}
.gallery__item {
  position: relative;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
}
.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .9s var(--ease), filter .6s var(--ease);
  filter: grayscale(.12);
}
.gallery__item:hover img { transform: scale(1.04); filter: grayscale(0); }

.gallery__cap {
  position: absolute;
  left: 18px;
  bottom: 16px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text);
  background: rgba(17, 16, 14, .55);
  padding: 7px 12px;
  border: 1px solid var(--line);
}

@media (min-width: 861px) {
  .gallery {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 240px;
  }
  .gallery__item--tall { grid-row: span 2; }
  .gallery__item--wide { grid-column: span 2; }
}

/* ---------- 14. Kontakt ---------- */
.kontakt__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(48px, 7vw, 90px);
  align-items: start;
}

.kontakt__lede {
  margin-top: clamp(24px, 4vw, 36px);
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 42ch;
}

.contact-facts { margin-top: clamp(32px, 5vw, 48px); border-top: 1px solid var(--line); }
.contact-facts__row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
  padding-block: 18px;
  border-bottom: 1px solid var(--line);
}
.contact-facts__row dt {
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 3px;
}
.contact-facts__row dd { color: var(--text); font-size: 1.02rem; line-height: 1.55; }
.contact-facts__row dd a { transition: color .3s var(--ease); }
.contact-facts__row dd a:hover { color: var(--brass); }

/* Form */
.kontakt__form-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: clamp(26px, 4vw, 52px);
}
.form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 3vw, 34px);
}
.field { margin-bottom: clamp(22px, 3vw, 32px); display: flex; flex-direction: column; }
.form__grid .field { margin-bottom: 0; }

.field label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

/* elegant underline inputs */
.field input,
.field select,
.field textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  padding: 10px 2px;
  border-radius: 0;
  transition: border-color .3s var(--ease);
}
.field textarea { resize: vertical; min-height: 110px; line-height: 1.55; }
.field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 14px) center, calc(100% - 8px) center;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
}
.field select option { background: var(--panel); color: var(--text); }

.field input::placeholder,
.field textarea::placeholder { color: rgba(168, 156, 134, .6); }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--brass);
}

.form-note {
  margin: 4px 0 18px;
  font-size: .95rem;
  color: var(--muted);
  min-height: 1.2em;
}
.form-note.is-err { color: #d98a6a; }
.form-note.is-ok { color: var(--brass); }

.form .btn--block { margin-top: 6px; }

@media (min-width: 1020px) {
  .kontakt__grid { grid-template-columns: 1fr 1.05fr; }
}

/* ---------- 15. Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding-block: clamp(56px, 8vw, 96px) 36px;
  background: var(--bg);
}
.footer__top {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(36px, 5vw, 64px);
  padding-bottom: clamp(40px, 6vw, 64px);
  border-bottom: 1px solid var(--line);
}
.footer__logo { height: 38px; width: auto; }
.footer__tagline {
  margin-top: 20px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 30ch;
  letter-spacing: -0.01em;
}
.footer__social { margin-top: 24px; display: flex; gap: 12px; }
.social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  color: var(--muted);
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.social:hover { color: var(--brass); border-color: var(--brass); }

.footer__h {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
.footer__nav,
.footer__contact { display: flex; flex-direction: column; gap: 12px; }
.footer__nav a,
.footer__contact a,
.footer__contact p {
  color: var(--text);
  font-size: .98rem;
  margin: 0;
  transition: color .3s var(--ease);
}
.footer__nav a:hover,
.footer__contact a:hover { color: var(--brass); }
.footer__contact p { color: var(--muted); line-height: 1.55; }

.footer__bottom {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.footer__copy { margin: 0; color: var(--muted); font-size: .88rem; }
.footer__legal { display: flex; gap: 24px; }
.footer__legal a { color: var(--muted); font-size: .88rem; transition: color .3s var(--ease); }
.footer__legal a:hover { color: var(--text); }

@media (min-width: 720px) {
  .footer__top { grid-template-columns: 1.6fr 1fr 1fr; }
}

/* ---------- 16. Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- 17. Focus visibility ---------- */
:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}
a:focus-visible,
.btn:focus-visible,
.nav__link:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 4px;
}

/* ---------- 18. Responsive: mobile nav (< 861px) ---------- */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }

  .nav {
    position: fixed;
    inset: 84px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 12px var(--gutter) 28px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity .35s var(--ease), transform .35s var(--ease), visibility .35s;
  }
  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
  }
  .nav__link {
    font-size: 1.4rem;
    font-family: var(--serif);
    font-weight: 300;
    letter-spacing: -0.01em;
    color: var(--text);
    padding-block: 16px;
    border-bottom: 1px solid var(--line);
  }
  .nav__link::after { display: none; }
  .nav__cta {
    margin-top: 22px;
    text-align: center;
    padding-block: 15px;
    border-color: var(--brass);
    background: var(--brass);
    color: #161310;
  }
}

/* ---------- 19. Small phones (< 520px) ---------- */
@media (max-width: 520px) {
  body { font-size: 16px; }
  .form__grid { grid-template-columns: 1fr; gap: 22px; }
  .form__grid .field { margin-bottom: 0; }
  .gallery { grid-template-columns: 1fr; }
  .contact-facts__row { grid-template-columns: 100px 1fr; gap: 12px; }
  .hero { min-height: auto; padding-block: 140px 64px; }
  .svc { grid-template-columns: 1fr; row-gap: 6px; }
  .svc__index { font-size: 1.1rem; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}
