/* ===================================================
   REIFENGOTT — Design System & Styles
   Production-ready, zero external dependencies
   =================================================== */

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --- Design Tokens --- */
:root {
  /* Colors */
  --bg: #0a0e17;
  --bg-subtle: #0f1522;
  --panel: rgba(20, 28, 45, 0.85);
  --panel-solid: #141c2d;
  --text: #f0f2f5;
  --text-secondary: #c8cdd6;
  --muted: #8a94a6;
  --primary: #2979ff;
  --primary-dark: #1565c0;
  --primary-glow: rgba(41, 121, 255, 0.25);
  --accent-green: #4caf50;
  --border: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.12);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Radii */
  --radius-sm: 0.375rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px var(--primary-glow);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Typography */
  --font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 2rem;
  --font-size-4xl: 2.75rem;
  --font-size-5xl: 3.5rem;

  /* Layout */
  --container-max: 1200px;
  --header-height: 72px;
  --header-height-scrolled: 56px;
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Global --- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + var(--space-2xl));
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--text);
}

/* --- Skip to Content (Accessibility) --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  background: var(--primary);
  color: var(--text);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  z-index: 10000;
  font-weight: 600;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-md);
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

/* --- Header (floating pill) --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 1rem 0;
  pointer-events: none;
  transition: padding var(--transition-base);
}

.header__pill {
  max-width: var(--container-max);
  margin: 0 auto;
  height: var(--header-height);
  display: flex;
  align-items: center;
  background: rgba(10, 14, 23, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 0 var(--space-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  pointer-events: auto;
  transition: height var(--transition-base), background var(--transition-base), border-radius var(--transition-base);
}

.header--scrolled {
  padding-top: 0.5rem;
}

.header--scrolled .header__pill {
  height: var(--header-height-scrolled);
  background: rgba(10, 14, 23, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}

.header__logo-icon {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: var(--font-size-sm);
  color: white;
}

.header__logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.header__logo-brand {
  font-size: var(--font-size-lg);
  font-weight: 800;
  letter-spacing: 0.05em;
}

.header__logo-sub {
  font-size: var(--font-size-xs);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-2xl);
}

.header__nav-links {
  display: flex;
  list-style: none;
  gap: var(--space-xl);
}

.header__nav-link {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  font-weight: 500;
  transition: color var(--transition-fast);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.header__nav-link:hover {
  color: var(--text);
}

/* Mobile nav toggle */
.header__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  z-index: 1001;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.header__burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.header__burger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.header__burger.active span:nth-child(2) {
  opacity: 0;
}

.header__burger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.2;
}

.btn--primary {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-glow);
}

.btn--primary:hover {
  background: var(--primary-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 0 30px var(--primary-glow);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-light);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn--sm {
  padding: 0.5rem 1rem;
  font-size: var(--font-size-xs);
}

.btn__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* --- Badge --- */
.badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: calc(var(--space-xs) + 5px);
  padding: 0.375rem 0.4375rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge--green {
  background: rgba(76, 175, 80, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  position: relative;
}

.badge__dot::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: currentColor;
  animation: badge-ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes badge-ping {

  75%,
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* --- Section --- */
.section {
  padding: var(--space-4xl) 0;
}

.section__label {
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--primary);
  margin-bottom: var(--space-sm);
}

.section__title {
  font-size: var(--font-size-3xl);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: var(--space-md);
}

/* Anchor targets: prevent fixed header from covering section titles */
.section__title[id] {
  scroll-margin-top: calc(var(--header-height) + var(--space-2xl));
}

.section__subtitle {
  font-size: var(--font-size-base);
  color: var(--muted);
  max-width: 520px;
  line-height: 1.6;
}

/* --- Hero --- */
.hero {
  padding-top: 108px;
  padding-bottom: var(--space-3xl);
  min-height: 85vh;
  display: flex;
  align-items: center;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
}

.hero__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.hero__title {
  font-size: var(--font-size-5xl);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.hero__title em {
  font-style: italic;
  background: linear-gradient(135deg, var(--primary), #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__description {
  font-size: var(--font-size-base);
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 460px;
}

.hero__actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.hero__meta {
  display: flex;
  gap: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
  margin-top: var(--space-sm);
}

.hero__meta-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
}

.hero__meta-icon {
  width: 18px;
  height: 18px;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}

.hero__meta-label {
  font-size: var(--font-size-xs);
  color: var(--muted);
  margin-bottom: 2px;
}

.hero__meta-value {
  font-size: var(--font-size-sm);
  font-weight: 500;
}

.hero__image-wrapper {
  position: relative;
  max-width: 80%;
  margin-left: auto;
}

/* Glow behind hero image */
.hero__image-wrapper::before {
  content: '';
  position: absolute;
  inset: -20px;
  background: linear-gradient(135deg, rgba(41, 121, 255, 0.2), transparent);
  border-radius: 2.5rem;
  transform: rotate(3deg) scale(0.95);
  filter: blur(40px);
  opacity: 0.6;
  z-index: -1;
}

/* --- Image Frame (reusable) --- */
.image-frame {
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border);
}

.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease-out;
  display: block;
}

.image-frame:hover img {
  transform: scale(1.05);
}

/* Vignette effect */
.image-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 80px 30px rgba(0, 0, 0, 0.7);
  pointer-events: none;
  z-index: 1;
}

.hero__image-frame {
  aspect-ratio: 3 / 4;
  border-radius: 2rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.hero__image-frame img {
  object-fit: cover;
  object-position: center top;
}

/* --- Gallery / Portfolio --- */
.gallery {
  background: var(--bg-subtle);
}

.gallery__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: var(--space-2xl);
  gap: var(--space-xl);
}

.gallery__description {
  text-align: right;
  max-width: 360px;
  font-size: var(--font-size-sm);
  color: var(--muted);
  line-height: 1.6;
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: auto auto;
  gap: var(--space-lg);
}

.gallery__item:nth-child(1) {
  grid-column: 1 / 6;
  grid-row: 1 / 3;
}

.gallery__item:nth-child(2) {
  grid-column: 6 / 9;
  grid-row: 1 / 2;
}

.gallery__item:nth-child(3) {
  grid-column: 9 / 13;
  grid-row: 1 / 2;
}

.gallery__item:nth-child(4) {
  grid-column: 6 / 13;
  grid-row: 2 / 3;
}

.gallery__item {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease-out;
  display: block;
}

.gallery__item:hover img {
  transform: scale(1.08);
}

/* Vignette effect */
.gallery__item::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 80px 30px rgba(0, 0, 0, 0.7);
  pointer-events: none;
  z-index: 1;
}

/* Gallery hover overlay with label */
.gallery__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-lg);
  z-index: 1;
}

.gallery__item:hover .gallery__overlay {
  opacity: 1;
}

.gallery__overlay-text {
  color: white;
  font-weight: 700;
  font-size: var(--font-size-lg);
}

.gallery__item:nth-child(1) {
  min-height: 420px;
}

.gallery__item:nth-child(2),
.gallery__item:nth-child(3) {
  min-height: 200px;
}

.gallery__item:nth-child(4) {
  min-height: 220px;
}

/* --- Contact --- */
.contact-wrapper {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 2.5rem;
  padding: var(--space-3xl) var(--space-2xl);
  overflow: hidden;
}

/* Decorative background blob */
.contact-wrapper::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(41, 121, 255, 0.08), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.contact__header {
  text-align: center;
  margin-bottom: var(--space-3xl);
  position: relative;
  z-index: 1;
}

.contact__header .section__subtitle {
  margin: var(--space-sm) auto 0;
}

.contact__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  position: relative;
  z-index: 1;
}

.contact-card {
  background: var(--panel);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  text-align: center;
  transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
}

.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  background: rgba(255, 255, 255, 0.04);
}

.contact-card__icon {
  width: 56px;
  height: 56px;
  background: rgba(41, 121, 255, 0.15);
  border: 1px solid rgba(41, 121, 255, 0.2);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-lg);
  color: var(--primary);
  transition: transform 0.3s ease;
}

.contact-card:hover .contact-card__icon {
  transform: scale(1.1);
}

.contact-card__icon svg {
  width: 24px;
  height: 24px;
}

.contact-card__title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.contact-card__text {
  font-size: var(--font-size-sm);
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.contact-card__link {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  transition: color var(--transition-fast);
}

.contact-card__link:hover {
  color: var(--text);
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: var(--space-xl) 0;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  color: var(--text);
}

.footer__logo-icon {
  width: 28px;
  height: 28px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.65rem;
  color: white;
}

.footer__logo-text {
  font-weight: 700;
  font-size: var(--font-size-sm);
  letter-spacing: 0.04em;
}

.footer__links {
  display: flex;
  list-style: none;
  gap: var(--space-xl);
}

.footer__link {
  color: var(--muted);
  font-size: var(--font-size-sm);
  transition: color var(--transition-fast);
}

.footer__link:hover {
  color: var(--text);
}

.footer__copy {
  font-size: var(--font-size-xs);
  color: var(--muted);
}

/* --- Subpage Content (Impressum / Datenschutz) --- */
.subpage {
  padding-top: calc(var(--header-height) + var(--space-2xl));
  padding-bottom: var(--space-4xl);
  min-height: 70vh;
}

.subpage__title {
  font-size: var(--font-size-4xl);
  font-weight: 800;
  margin-bottom: var(--space-2xl);
}

.subpage__content {
  max-width: 760px;
}

.subpage__content h2 {
  font-size: var(--font-size-xl);
  font-weight: 700;
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
}

.subpage__content p {
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  line-height: 1.7;
}

.subpage__content ul {
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  padding-left: var(--space-xl);
}

.subpage__content li {
  margin-bottom: var(--space-sm);
}

.subpage__content a {
  color: var(--primary);
}

.subpage__content a:hover {
  color: var(--text);
}

/* --- Ambient Background --- */
.ambient-glow {
  position: fixed;
  top: 0;
  right: 0;
  width: 50%;
  height: 100vh;
  opacity: 0.15;
  background: radial-gradient(ellipse at center, rgba(41, 121, 255, 0.3), var(--bg) 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: -1;
}

/* --- Focus Styles (Accessibility) --- */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

/* ===================================================
   Responsive
   =================================================== */

/* Tablet */
@media (max-width: 768px) {
  :root {
    --font-size-5xl: 2.5rem;
    --font-size-4xl: 2rem;
    --font-size-3xl: 1.5rem;
  }

  .container {
    padding: 0 var(--space-lg);
  }

  .header {
    padding: 0.5rem 0.5rem 0;
  }

  .header__pill {
    padding: 0 var(--space-md);
  }

  .header__inner {
    padding: 0 var(--space-md);
  }

  .contact-wrapper {
    border-radius: var(--radius-xl);
    padding: var(--space-2xl) var(--space-lg);
  }

  .hero__grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .hero__image-wrapper {
    order: -1;
    max-width: 100%;
    margin: 0 auto;
  }

  .hero__image-frame {
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-xl);
  }

  .hero__image-frame img {
    object-position: center center;
  }

  .hero {
    min-height: auto;
    padding-top: calc(var(--header-height) + var(--space-xl));
    padding-bottom: var(--space-2xl);
  }

  .hero__description {
    max-width: 100%;
  }

  .hero__meta {
    flex-direction: column;
    gap: var(--space-md);
  }

  .gallery__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .gallery__description {
    text-align: left;
  }

  .gallery__grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }

  .gallery__item {
    min-height: 0;
  }

  .gallery__item img {
    object-position: center center;
  }

  .gallery__item:nth-child(1) {
    grid-column: 1 / 3;
    grid-row: auto;
    min-height: 280px;
  }

  .gallery__item:nth-child(2) {
    grid-column: 1 / 2;
    grid-row: auto;
    min-height: 180px;
  }

  .gallery__item:nth-child(3) {
    grid-column: 2 / 3;
    grid-row: auto;
    min-height: 180px;
  }

  .gallery__item:nth-child(4) {
    grid-column: 1 / 3;
    grid-row: auto;
    min-height: 200px;
  }

  .contact__grid {
    grid-template-columns: 1fr;
  }

  .contact-card {
    padding: var(--space-xl);
  }

  .header__nav-links {
    display: none;
  }

  .header__burger {
    display: flex;
  }

  /* Mobile nav overlay — disable pill's backdrop-filter so fixed positioning works */
  html.nav-open .header__pill {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: transparent;
    border-color: transparent;
    box-shadow: none;
  }

  html.nav-open .header__burger {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1100;
  }

  .header__nav.active {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--space-xl);
    background: rgba(10, 14, 23, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overscroll-behavior: contain;
    z-index: 1000;
  }

  .header__nav.active .header__nav-links {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--space-2xl);
  }

  .header__nav.active .header__nav-link {
    font-size: var(--font-size-2xl);
  }

  .header__nav.active .btn--primary {
    margin-top: var(--space-lg);
    padding: 0.875rem 2rem;
    font-size: var(--font-size-base);
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
    gap: var(--space-lg);
  }

  .footer__links {
    justify-content: center;
  }

  /* Subpage adjustments */
  .subpage {
    padding-top: calc(var(--header-height) + var(--space-2xl) + var(--space-sm));
  }

  .subpage__title {
    font-size: var(--font-size-3xl);
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }

  .subpage__content {
    max-width: 100%;
  }
}

/* Mobile */
@media (max-width: 480px) {
  :root {
    --font-size-5xl: 2rem;
    --font-size-4xl: 1.75rem;
    --font-size-3xl: 1.375rem;
  }

  .container {
    padding: 0 var(--space-md);
  }

  .section {
    padding: var(--space-3xl) 0;
  }

  /* Subpage adjustments specifically for mobile */
  .subpage {
    padding-top: calc(var(--header-height) + var(--space-2xl)) !important;
  }

  .hero {
    padding-top: calc(var(--header-height) + var(--space-lg));
  }

  .hero__image-frame {
    aspect-ratio: 3 / 2;
  }

  .contact-wrapper {
    border-radius: var(--radius-lg);
    padding: var(--space-xl) var(--space-md);
  }

  .contact-card {
    padding: var(--space-lg);
  }

  .hero__actions {
    flex-direction: column;
  }

  .hero__actions .btn {
    justify-content: center;
    width: 100%;
  }

  .gallery__grid {
    grid-template-columns: 1fr;
  }

  .gallery__item:nth-child(1),
  .gallery__item:nth-child(2),
  .gallery__item:nth-child(3),
  .gallery__item:nth-child(4) {
    grid-column: 1 / -1;
    min-height: 220px;
  }

  .header__inner {
    padding: 0 var(--space-sm);
  }

  .header__logo-sub {
    display: none;
  }

  .subpage__title {
    font-size: var(--font-size-2xl);
  }
}

/* Ultra-small screens */
@media (max-width: 360px) {
  :root {
    --font-size-5xl: 1.75rem;
    --font-size-4xl: 1.5rem;
    --font-size-3xl: 1.25rem;
    --font-size-2xl: 1.25rem;
  }

  .container {
    padding: 0 var(--space-sm);
  }

  .header__pill {
    padding: 0 var(--space-sm);
  }

  .header__inner {
    padding: 0 var(--space-xs);
  }

  .hero__image-frame {
    border-radius: var(--radius-lg);
  }

  .contact-wrapper {
    border-radius: var(--radius-md);
    padding: var(--space-lg) var(--space-sm);
  }

  .contact-card {
    padding: var(--space-md);
  }

  .gallery__item:nth-child(1),
  .gallery__item:nth-child(2),
  .gallery__item:nth-child(3),
  .gallery__item:nth-child(4) {
    min-height: 180px;
  }

  .btn {
    padding: 0.625rem 1.25rem;
    font-size: var(--font-size-xs);
  }

  .hero__meta-item {
    gap: var(--space-xs);
  }
}