/* ==========================================================================
   Sara Hofmann — Freelance Engineer & Consultant
   Design tokens derived from the live sara-hofmann.de (Squarespace) site.
   Heading font "Cormorant Infant" matches the original 1:1 (Google Fonts).
   Body/UI font "Archivo" replaces the original's licensed "Aktiv Grotesk
   Extended" (Adobe Fonts) — closest free neo-grotesque with a similar
   extended/expanded width feel. See README for details.
   ========================================================================== */

@font-face {
  font-family: "Archivo";
  src: url("../assets/fonts/archivo-latin-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant Infant";
  src: url("../assets/fonts/cormorant-infant-latin-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
}

:root {
  --color-navy: #253551;
  --color-blue-mid: #31588a;
  --color-blue-glow: #6ea6d0;
  --color-cream: #e0e0db;
  --color-fog: #dde3e1;
  --color-white: #ffffff;
  --color-black: #000000;
  --color-text-muted: #5b5b56;

  --gradient-accent: linear-gradient(135deg, var(--color-navy), var(--color-blue-mid));
  --gradient-swirl: linear-gradient(120deg, var(--color-navy) 0%, var(--color-blue-mid) 55%, var(--color-blue-glow) 100%);

  --font-heading: "Cormorant Infant", Georgia, serif;
  --font-body: "Archivo", "Helvetica Neue", Arial, sans-serif;

  --container-width: 1180px;
  --header-height: 96px;
  --radius-pill: 999px;
  --transition: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--color-black);
  background: radial-gradient(ellipse 800px 600px at 105% -8%, rgba(110, 166, 208, 0.14), transparent 60%),
    radial-gradient(ellipse 650px 550px at -12% 18%, rgba(49, 88, 138, 0.14), transparent 58%),
    radial-gradient(ellipse 900px 650px at 50% 128%, rgba(37, 53, 81, 0.10), transparent 62%),
    var(--color-white);
  background-repeat: no-repeat;
  background-attachment: fixed;
}

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

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
.cv-badge:focus-visible,
.nav-toggle:focus-visible {
  outline: 2px solid var(--color-navy);
  outline-offset: 3px;
}

ul {
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 0.6em;
  color: var(--color-black);
}

h1 { font-size: clamp(2.4rem, 4vw, 3.4rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); }

p {
  margin: 0 0 1.1em;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 32px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-navy);
  color: var(--color-white);
  padding: 12px 20px;
  z-index: 1000;
  border-radius: 0 0 6px 0;
}
.skip-link:focus {
  left: 0;
}

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

/* ---------------------------------------------------------------------- */
/* Header                                                                  */
/* ---------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: var(--color-white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  border-bottom: 3px solid;
  border-image: var(--gradient-swirl) 1;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-height);
  padding: 12px 32px;
  max-width: var(--container-width);
  margin: 0 auto;
}

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

.brand img {
  height: 72px;
  width: auto;
}

.main-nav {
  flex: 1;
}

.main-nav__list {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
  flex-wrap: wrap;
}

.main-nav__list {
  position: relative;
}

.main-nav__list a {
  font-size: 1.02rem;
  padding: 6px 2px;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
  white-space: nowrap;
}

@media (max-width: 760px) {
  .main-nav__list a:hover,
  .main-nav__list a[aria-current="page"] {
    border-color: var(--color-navy);
  }
}

.nav-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--gradient-swirl);
  pointer-events: none;
  opacity: 0;
  transition: left 0.28s cubic-bezier(0.4, 0, 0.2, 1), width 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
}

.nav-indicator.is-ready {
  opacity: 1;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

.lang-picker {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95rem;
  color: var(--color-black);
  border: none;
  background: none;
  cursor: default;
}

.lang-picker svg {
  width: 16px;
  height: 16px;
}

.cv-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-accent);
  color: var(--color-white);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  transition: transform var(--transition);
}

.cv-badge:hover {
  transform: scale(1.06);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 26px;
  height: 2px;
  background: var(--color-navy);
  display: block;
}

/* ---------------------------------------------------------------------- */
/* Buttons                                                                 */
/* ---------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 34px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--color-navy);
  color: var(--color-navy);
}

.btn-outline:hover {
  background: var(--gradient-accent);
  border-color: var(--color-blue-mid);
  color: var(--color-white);
}

.btn-solid {
  background: var(--gradient-accent);
  border: 2px solid var(--color-navy);
  color: var(--color-white);
}

.btn-solid:hover {
  transform: translateY(-1px);
}

/* ---------------------------------------------------------------------- */
/* Brand flourishes — gradient text, wave divider, portrait ring            */
/* ---------------------------------------------------------------------- */

.gradient-text {
  background: var(--gradient-swirl);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.portrait-frame {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  padding: 8px;
  border-radius: 50%;
  background: conic-gradient(
    from 210deg,
    var(--color-navy),
    var(--color-blue-mid) 40%,
    var(--color-blue-glow) 65%,
    var(--color-blue-mid) 85%,
    var(--color-navy)
  );
  animation: gentle-float 5s ease-in-out infinite;
}

@keyframes gentle-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@media (prefers-reduced-motion: reduce) {
  .portrait-frame {
    animation: none;
  }
}

figure.portrait-frame img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 5px solid var(--color-white);
  box-sizing: border-box;
  object-fit: cover;
  object-position: top center;
}

/* ---------------------------------------------------------------------- */
/* Hero / generic sections                                                 */
/* ---------------------------------------------------------------------- */

.hero {
  padding: 72px 0 40px;
  text-align: center;
}

.hero--intro {
  max-width: 820px;
  margin: 0 auto;
  padding: 72px 32px 24px;
  text-align: center;
}

.hero--intro p {
  font-size: 1.25rem;
  font-family: var(--font-heading);
  line-height: 1.5;
}

section {
  padding: 56px 0;
}

.section-tight {
  padding: 24px 0 64px;
}

/* Card panel (cream service-page block) */
.card-panel {
  background: var(--color-cream);
  padding: 56px;
  max-width: 900px;
  margin: 0 auto;
  clip-path: polygon(28px 0, 100% 0, 100% calc(100% - 28px), calc(100% - 28px) 100%, 0 100%, 0 28px);
}

@media (max-width: 600px) {
  .card-panel {
    clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
  }
}

.card-panel h2 {
  margin-top: 0.6em;
}

.card-panel .cta {
  margin-top: 32px;
}

/* ---------------------------------------------------------------------- */
/* About page                                                              */
/* ---------------------------------------------------------------------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: start;
  padding: 24px 0 48px;
}

.about-grid figure {
  margin: 0;
}

.about-grid img {
  width: 100%;
  height: auto;
}

.about-lists {
  padding: 0 0 64px;
}

.about-lists ul {
  list-style: disc;
  padding-left: 1.3em;
  margin-bottom: 1.4em;
}

.about-lists li {
  margin-bottom: 0.6em;
}

/* ---------------------------------------------------------------------- */
/* Insights grid                                                           */
/* ---------------------------------------------------------------------- */

.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 48px 40px;
  padding: 40px 0 72px;
}

.insight-card {
  display: block;
  will-change: transform;
}

.insight-card__image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  margin-bottom: 18px;
  position: relative;
}

.insight-card__image::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-swirl);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.insight-card:hover .insight-card__image::after {
  transform: scaleX(1);
}

.insight-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.insight-card:hover .insight-card__image img {
  transform: scale(1.04);
}

.insight-card__date {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--color-blue-mid);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.insight-card__title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  text-align: center;
}

.insights-more {
  text-align: center;
  padding-bottom: 56px;
}

/* Article page */
.article {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 32px 96px;
}

.article__meta {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.6em;
}

.article__cover {
  margin: 0 0 40px;
}

.article__cover img {
  width: 100%;
  height: auto;
}

.article h2 {
  margin-top: 1.4em;
}

.article ul {
  list-style: disc;
  padding-left: 1.3em;
  margin-bottom: 1.4em;
}

.article li {
  margin-bottom: 0.5em;
}

.back-link {
  display: inline-block;
  margin-bottom: 24px;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--color-navy);
}

/* ---------------------------------------------------------------------- */
/* Contact page                                                            */
/* ---------------------------------------------------------------------- */

.contact-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  padding: 40px 0 96px;
}

.contact-intro h1 {
  margin-bottom: 0.3em;
}

.contact-icons {
  display: flex;
  gap: 16px;
  margin-top: 40px;
}

.contact-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-navy);
  color: var(--color-navy);
  transition: background var(--transition), color var(--transition);
}

.contact-icons a:hover {
  background: var(--color-navy);
  color: var(--color-white);
}

.contact-icons svg {
  width: 20px;
  height: 20px;
}

.form-field {
  margin-bottom: 24px;
}

.form-field label {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.form-section-title {
  margin-bottom: 0.6em;
}

.form-field .required {
  color: var(--color-text-muted);
  font-weight: 400;
  font-size: 0.85rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #c9c9c2;
  background: #fafaf8;
  font-family: var(--font-body);
  font-size: 1rem;
}

.form-field textarea {
  min-height: 140px;
  resize: vertical;
}

.form-privacy {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: -4px 0 24px;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.form-privacy input {
  flex: 0 0 auto;
  margin-top: 0.25em;
}

.form-privacy a,
.legal a {
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: 2px solid var(--color-navy);
  outline-offset: 1px;
}

.honeypot-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-success {
  max-width: 640px;
  margin: 0 auto;
  padding: 120px 32px;
  text-align: center;
}

/* ---------------------------------------------------------------------- */
/* Legal pages                                                             */
/* ---------------------------------------------------------------------- */

.legal {
  max-width: 800px;
  margin: 0 auto;
  padding: 56px 32px 96px;
}

.legal h2 {
  margin-top: 1.6em;
}

.legal p, .legal li {
  color: #262626;
}

.legal .updated {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 2.4em;
}

.legal address {
  font-style: normal;
  margin-bottom: 1.1em;
}

.legal .notice {
  padding: 18px 20px;
  border-left: 4px solid var(--color-blue-mid);
  background: var(--color-fog);
}

.legal .form-template {
  padding: 20px;
  border: 1px solid #c9c9c2;
  background: #fafaf8;
}

/* ---------------------------------------------------------------------- */
/* Footer                                                                  */
/* ---------------------------------------------------------------------- */

.site-footer {
  background: var(--color-fog);
  padding: 64px 0 32px;
  margin-top: 56px;
  clip-path: polygon(0 32px, 100% 0, 100% 100%, 0 100%);
}

@media (max-width: 600px) {
  .site-footer {
    padding: 44px 0 32px;
    clip-path: polygon(0 18px, 100% 0, 100% 100%, 0 100%);
  }
}

.footer-nav {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
  margin-bottom: 24px;
}

.footer-legal {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

.footer-bottom {
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.footer-bottom button {
  background: none;
  border: none;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
  padding: 0;
}

/* ---------------------------------------------------------------------- */
/* Responsive                                                              */
/* ---------------------------------------------------------------------- */

@media (max-width: 900px) {
  .about-grid,
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .card-panel {
    padding: 36px 28px;
  }
}

@media (max-width: 760px) {
  body.nav-open {
    overflow: hidden;
  }

  .main-nav {
    position: fixed;
    inset: var(--header-height) 0 0 0;
    background: var(--color-white);
    transform: translateY(-110%);
    transition: transform var(--transition);
    padding: 24px 32px;
    overflow-y: auto;
  }

  .main-nav.is-open {
    transform: translateY(0);
  }

  .main-nav__list {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .nav-toggle {
    display: flex;
  }

  .site-header__inner {
    padding: 10px 20px;
  }

  .brand img {
    height: 56px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .hero--intro,
  .article,
  .legal {
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 16px;
  }

  .card-panel {
    padding: 28px 20px;
  }
}

/* ---------------------------------------------------------------------- */
/* Interactive flourishes — scroll progress                                */
/* ---------------------------------------------------------------------- */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--gradient-swirl);
  z-index: 900;
}

.brand-watermark {
  position: fixed;
  top: -70px;
  right: -90px;
  width: 560px;
  max-width: 46vw;
  height: auto;
  opacity: 0.1;
  transform: rotate(-8deg);
  pointer-events: none;
  z-index: -1;
}

@media (max-width: 600px) {
  .brand-watermark {
    width: 380px;
    max-width: 70vw;
    top: -40px;
    right: -70px;
    opacity: 0.09;
  }
}

/* ---------------------------------------------------------------------- */
/* Scroll-reveal animations                                                */
/* ---------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .nav-indicator {
    transition: none;
  }
}
