/* ==========================================================================
   Daniel Steven — Independent Engineer
   Shared stylesheet for index / contact / impressum / privacy-policy
   ========================================================================== */

/* ── FONT (local variable font, no internet connection required) ─────────── */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 100 900;          /* one file covers every weight the site uses */
  font-display: swap;
  src: url('fonts/montserrat-variable.woff') format('woff');
}

/* ── TOKENS ──────────────────────────────────────────────────────────────── */
:root {
  --charcoal:   #36454F;
  --deep:       #4A6B7D;
  --blue-grey:  #6F8EA8;
  --muted:      #8A9BA8;
  --light-grey: #CED5DB;
  --off-white:  #F2F2F2;
  --white:      #FFFFFF;
  --body:       #4A555D;
  --font:       'Montserrat', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--charcoal);
  background: var(--white);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }

/* Keyboard focus */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--deep);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── NAV ─────────────────────────────────────────────────────────────────── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--white);
  box-shadow: 0 1px 6px rgba(54,69,79,.10);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 48px; height: 70px;
  transition: height .25s ease, box-shadow .25s ease;
}
nav.scrolled { height: 54px; box-shadow: 0 2px 14px rgba(54,69,79,.14); }
nav.scrolled .nav-logo img { height: 31px; }
.nav-logo img { height: 40px; display: block; transition: height .25s ease; }
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a {
  text-decoration: none; color: var(--charcoal);
  font-size: .85rem; font-weight: 500; letter-spacing: .04em;
  padding-bottom: 3px; border-bottom: 2px solid transparent;
  transition: border-color .2s, color .2s;
}
.nav-links a:hover, .nav-links a.active { border-bottom-color: var(--blue-grey); color: var(--deep); }

/* Reading progress — sits on the bottom edge of the nav bar */
.scroll-progress {
  position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--blue-grey), var(--deep));
  transition: width .1s linear;
}

/* Hamburger */
.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--charcoal); border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── HOME HERO ───────────────────────────────────────────────────────────── */
#home {
  position: relative; min-height: 460px; overflow: hidden;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center;
  padding: 90px 24px 74px; color: var(--white);
  background: var(--charcoal);
}
.hero-bg {
  position: absolute; inset: -2%;
  background-position: center; background-size: cover; background-repeat: no-repeat;
}
#home .hero-bg {
  animation: heroDrift 28s ease-in-out infinite alternate;
  will-change: transform;
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(36,52,63,.62) 0%, rgba(36,52,63,.48) 100%);
}
@keyframes heroDrift {
  from { transform: scale(1); }
  to   { transform: scale(1.07); }
}
.hero-inner { position: relative; z-index: 1; }
.hero-name { font-size: clamp(2rem,5vw,3.1rem); font-weight: 700; letter-spacing: .02em; line-height: 1.2; }
.hero-tagline {
  margin-top: 16px; font-size: clamp(.9rem,2vw,1.1rem); font-weight: 400;
  color: rgba(255,255,255,.87); max-width: 540px; margin-inline: auto;
}
.hero-cta {
  margin-top: 28px; display: inline-block; padding: 13px 34px;
  background: var(--blue-grey); color: var(--white); border-radius: 3px;
  font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  text-decoration: none;
  transition: background .2s, transform .2s, box-shadow .2s;
}
.hero-cta:hover {
  background: var(--deep); transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(20,30,38,.35);
}
.hero-icons { display: flex; gap: 16px; margin-top: 22px; justify-content: center; }
.hero-icons a {
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; transition: transform .2s, opacity .2s;
}
.hero-icons a:hover { transform: translateY(-3px); opacity: .85; }

/* Page-load sequence */
.hero-inner > * { opacity: 0; animation: riseIn .8s cubic-bezier(.22,.8,.3,1) forwards; }
.hero-inner > *:nth-child(1) { animation-delay: .10s; }
.hero-inner > *:nth-child(2) { animation-delay: .26s; }
.hero-inner > *:nth-child(3) { animation-delay: .42s; }
.hero-inner > *:nth-child(4) { animation-delay: .56s; }
@keyframes riseIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

/* ── SUBPAGE HERO ────────────────────────────────────────────────────────── */
.page-hero {
  position: relative; overflow: hidden;
  padding: 86px 24px 68px; text-align: center; color: var(--white);
  background: var(--charcoal);
}
.page-hero > h1,
.page-hero > .hero-icons { position: relative; z-index: 1; }
.page-hero .hero-bg::after { background: linear-gradient(to bottom, rgba(36,52,63,.58) 0%, rgba(36,52,63,.46) 100%); }
.page-hero.privacy .hero-bg::after { background: linear-gradient(to bottom, rgba(36,52,63,.70) 0%, rgba(36,52,63,.58) 100%); }
.page-hero h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; letter-spacing: .02em; }
.page-hero .hero-icons { margin-top: 20px; }

/* ── WAVE DIVIDERS (flattened) ───────────────────────────────────────────── */
.wave-divider {
  position: relative; z-index: 1;
  display: block; width: 100%;
  line-height: 0; margin: 0 0 -1px; padding: 0;
}
/* Hero waves sit on the bottom edge of the hero, full bleed, no overhang */
.hero-bottom-wave,
.page-hero-wave {
  position: absolute; left: 0; right: 0; bottom: -1px;
  width: 100%; margin: 0; padding: 0;
  display: block; line-height: 0; z-index: 2;
}
.wave-divider svg { display: block; width: 100%; }

/* ── SECTIONS ────────────────────────────────────────────────────────────── */
.container { max-width: 1040px; margin: 0 auto; padding: 0 32px; }
.section-label {
  font-size: .72rem; font-weight: 700; letter-spacing: .15em;
  text-transform: uppercase; color: var(--blue-grey); margin-bottom: 8px;
}
.section-title { font-size: clamp(1.55rem,3.5vw,2.1rem); font-weight: 700; color: var(--charcoal); line-height: 1.25; }
.section-intro { margin-top: 13px; color: var(--body); font-size: .93rem; max-width: 620px; }

/* ── ABOUT ───────────────────────────────────────────────────────────────── */
#about { background: var(--white); padding: 74px 0; }
.about-grid { display: grid; grid-template-columns: 320px 1fr; gap: 56px; align-items: start; }
.about-photo {
  width: 100%; height: auto; aspect-ratio: 1/1; object-fit: cover; object-position: center 8%;
  border-radius: 4px; display: block;
}
.about-heading { font-size: clamp(1.35rem,3vw,1.85rem); font-weight: 700; color: var(--charcoal); line-height: 1.25; margin-top: 6px; }
.about-sub { font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--blue-grey); margin-top: 14px; }
.about-text { margin-top: 14px; color: var(--body); font-size: .93rem; line-height: 1.75; }
.credentials { margin-top: 26px; display: flex; flex-direction: column; gap: 9px; }
.credential-item { display: flex; align-items: flex-start; gap: 12px; font-size: .92rem; color: var(--charcoal); }
.credential-item::before {
  content: ''; display: block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--blue-grey); margin-top: 8px; flex-shrink: 0;
}

/* ── KEY FIGURES ─────────────────────────────────────────────────────────── */
.figures {
  display: flex; align-items: stretch;
  margin-top: 36px;
}
.figure { padding-right: 46px; }
.figure + .figure { padding-right: 0; padding-left: 46px; border-left: 1px solid var(--light-grey); }
.figure-value {
  font-size: 2.15rem; font-weight: 700; color: var(--deep);
  line-height: 1; font-variant-numeric: tabular-nums;
}
.figure-label { margin-top: 10px; font-size: .78rem; color: var(--muted); line-height: 1.5; }

/* ── SERVICES ────────────────────────────────────────────────────────────── */
#services { background: var(--off-white); padding: 78px 0 74px; }
.services-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; margin-top: 44px; }
.service-card {
  position: relative; background: var(--white); border-radius: 4px;
  padding: 28px 22px 26px;
  box-shadow: 0 2px 10px rgba(54,69,79,.07);
  transition: transform .25s ease, box-shadow .25s ease;
}
.service-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--blue-grey), var(--deep));
  border-radius: 4px 4px 0 0;
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s ease;
}
.service-card:hover { transform: translateY(-5px); box-shadow: 0 10px 26px rgba(54,69,79,.13); }
.service-card:hover::before { transform: scaleX(1); }
.service-icon { color: var(--blue-grey); margin-bottom: 16px; display: block; transition: color .25s; }
.service-card:hover .service-icon { color: var(--deep); }
.service-title { font-size: .97rem; font-weight: 700; color: var(--charcoal); line-height: 1.3; }
.service-desc { margin-top: 10px; font-size: .82rem; color: var(--body); line-height: 1.65; }

/* ── MY APPROACH ─────────────────────────────────────────────────────────── */
#my-approach { background: var(--charcoal); color: var(--white); padding: 78px 0 74px; }
#my-approach .section-label { color: var(--blue-grey); }
#my-approach .section-title { color: var(--white); }
.approach-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 40px; margin-top: 52px; }
.approach-card { border-top: 2px solid var(--blue-grey); padding-top: 24px; }
.approach-heading { font-size: 1rem; font-weight: 700; color: var(--white); line-height: 1.35; margin-bottom: 13px; }
.approach-text { font-size: .86rem; color: rgba(255,255,255,.74); line-height: 1.75; }

/* ── PROJECT REFERENCES ──────────────────────────────────────────────────── */
#project-references { background: var(--off-white); padding: 78px 0 80px; }
.projects-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 48px; margin-top: 48px; }
.project-card {
  padding: 18px 0 18px 22px;
  border-left: 2px solid var(--light-grey);
  transition: border-color .25s ease;
}
.project-card:hover { border-left-color: var(--blue-grey); }
.project-name { font-size: 1.25rem; font-weight: 700; color: var(--charcoal); transition: color .25s ease; }
.project-card:hover .project-name { color: var(--deep); }
.project-type {
  font-size: .7rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
  color: var(--blue-grey); margin-top: 8px;
}
.project-meta { font-size: .86rem; color: var(--body); margin-top: 10px; }
.project-roles { margin-top: 9px; padding-left: 16px; font-size: .86rem; color: var(--body); line-height: 1.7; }
.project-roles li { margin-bottom: 2px; }

/* ── CONTACT PAGE ────────────────────────────────────────────────────────── */
.content-section { background: var(--white); padding: 72px 0 88px; }
.content-section .container--narrow { max-width: 820px; text-align: center; }
.contact-photo {
  width: 220px; height: 220px; object-fit: cover; object-position: center 10%;
  border-radius: 50%; display: block; margin: 0 auto 26px;
}
.contact-name { font-size: 1.5rem; font-weight: 700; color: var(--charcoal); }
.contact-title { font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--blue-grey); margin-top: 6px; }
.contact-items { display: flex; flex-direction: column; gap: 14px; max-width: 380px; margin: 34px auto 0; }
.contact-item {
  display: flex; align-items: center; gap: 16px; text-align: left;
  padding: 16px 20px; border: 1px solid var(--light-grey); border-radius: 4px;
  text-decoration: none; color: var(--charcoal); background: var(--white);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.contact-item:hover {
  border-color: var(--blue-grey); transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(54,69,79,.10);
}
.contact-icon {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%;
  background: var(--off-white); color: var(--deep);
  display: flex; align-items: center; justify-content: center;
}
.contact-item-label { font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.contact-item-value { font-size: .93rem; font-weight: 500; }

/* ── LEGAL PAGES ─────────────────────────────────────────────────────────── */
.content-body h2 {
  font-size: 1.35rem; font-weight: 700; color: var(--charcoal);
  margin: 40px 0 16px; padding-bottom: 8px; border-bottom: 2px solid var(--light-grey);
}
.content-body h2:first-child { margin-top: 0; }
.content-body h3 { font-size: 1rem; font-weight: 700; color: var(--charcoal); margin: 24px 0 8px; }
.content-body p { font-size: .92rem; color: var(--body); margin-bottom: 14px; line-height: 1.8; }
.content-body p.upper { text-transform: uppercase; font-size: .82rem; color: #666; letter-spacing: .02em; }
.content-body a { color: var(--blue-grey); text-decoration: none; word-break: break-word; }
.content-body a:hover { text-decoration: underline; }
.content-body .addr { margin-bottom: 14px; }

/* ── FOOTER ──────────────────────────────────────────────────────────────── */
footer { background: var(--light-grey); padding: 40px 32px 28px; text-align: center; }
footer img { height: 33px; opacity: .75; margin-bottom: 18px; display: inline-block; mix-blend-mode: multiply; }
.footer-links { display: flex; justify-content: center; gap: 28px; list-style: none; margin-bottom: 16px; flex-wrap: wrap; }
.footer-links a { text-decoration: none; font-size: .8rem; color: var(--charcoal); opacity: .7; transition: opacity .2s; }
.footer-links a:hover { opacity: 1; }
.footer-copy { font-size: .76rem; color: var(--muted); }
.footer-social { display: flex; gap: 12px; justify-content: center; margin-top: 14px; }
.footer-social a { display: flex; opacity: 1; transition: opacity .2s, transform .2s; }
.footer-social a:hover { opacity: .65; transform: translateY(-2px); }

/* ── SCROLL REVEAL (only active when JavaScript is available) ────────────── */
.js .reveal {
  opacity: 0; transform: translateY(14px);
  transition: opacity .65s cubic-bezier(.22,.8,.3,1), transform .65s cubic-bezier(.22,.8,.3,1);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ── RESPONSIVE ──────────────────────────────────────────────────────────── */
@media (max-width: 940px) {
  .services-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .approach-grid { grid-template-columns: 1fr; gap: 28px; }
  .about-grid    { grid-template-columns: 1fr; gap: 34px; }
  .about-photo   { max-width: 300px; }
  .projects-grid { grid-template-columns: 1fr; gap: 18px; }
  nav { padding: 0 20px; }
}
@media (max-width: 700px) {
  .nav-links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 16px 28px 24px;
    gap: 18px;
    box-shadow: 0 6px 16px rgba(54,69,79,.12);
    list-style: none;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .contact-photo { width: 180px; height: 180px; }
}
@media (max-width: 560px) {
  .services-grid { grid-template-columns: 1fr; }
  .figure { padding-right: 30px; }
  .figure + .figure { padding-left: 30px; }
}

/* ── REDUCED MOTION ──────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-bg { animation: none; }
  .hero-inner > * { opacity: 1; animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
