/* Surah55 — Design System */
:root {
  --color-bg: #ffffff;
  --color-text: #121210;
  --color-text-muted: #3a3a36;
  --color-accent: #2563eb;
  --color-accent-light: #dbeafe;
  --color-border: #e8e8e8;
  --color-surface: #f9fafb;
  --font-family: 'Cormorant Garamond', serif;
  --container-max: 1200px;
  --container-wide: 1400px;
  --header-height: 72px;
  --player-height: clamp(6.5rem, 12vh, 8.5rem);
  --viewport-height: 100vh;
  --radius: 8px;
  --radius-lg: 16px;
  --header-glass-radius: 20px;
  --header-solid-radius: 999px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
  --transition: 0.25s ease;
}

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

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

body {
  margin: 0;
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  padding-bottom: var(--player-height);
}

body.nav-open { overflow: hidden; }

.site-card {
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: var(--viewport-height);
  width: 100%;
  background: var(--color-bg);
}

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

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

a:hover { color: #1d4ed8; }

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

.container--narrow { max-width: 720px; }

.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;
}

/* Loaders */
.app-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: var(--color-bg);
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.app-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loader-text {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
}

.page-loader {
  position: absolute;
  top: var(--header-height);
  left: 0;
  right: 0;
  z-index: 900;
  height: 3px;
  background: transparent;
  pointer-events: none;
}

.page-loader-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--color-accent), #60a5fa);
  transition: width 0.3s ease;
}

.page-loader.is-active .page-loader-bar {
  width: 70%;
  animation: loadBar 1.2s ease-in-out infinite alternate;
}

@keyframes spin { to { transform: rotate(360deg); } }

@keyframes loadBar {
  0% { width: 20%; }
  100% { width: 85%; }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 800;
  flex-shrink: 0;
  background: transparent;
  border-bottom: none;
  padding: 0;
}

.site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: none;
  height: var(--header-height);
  margin: 0;
  padding: 0 1.5rem;
  gap: 1rem;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: none;
}

.site-header .nav-actions {
  border-left-color: rgba(0, 0, 0, 0.06);
}

.logo {
  font-size: 1.375rem;
  font-weight: 700;
  color: #121210;
  letter-spacing: -0.02em;
}

.logo:hover { color: #0a0a08; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #121210;
  transition: transform var(--transition), opacity var(--transition);
  margin: 0 auto;
}

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

.site-nav a {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1f1f1c;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: #121210;
}

.nav-actions {
  display: flex;
  gap: 1.25rem;
  padding-left: 1rem;
  border-left: 1px solid transparent;
  transition: border-color var(--transition);
}

.nav-link-muted {
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  color: #3a3a36 !important;
}

.site-nav a.nav-link-muted:hover {
  color: #121210 !important;
}

.site-nav__head {
  display: none;
}

.nav-close {
  display: none;
}

/* Main */
.main-content {
  flex: 1;
  outline: none;
  background: #fff;
}

.main-content:not(:has(.hero)) {
  padding-top: var(--header-height);
}

/* Hero */
.hero {
  position: relative;
  margin-top: calc(-1 * var(--header-height));
  padding-top: var(--header-height);
  padding-bottom: clamp(2rem, 4vh, 3rem);
  min-height: var(--viewport-height);
  overflow: hidden;
  background: #fff;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: #fff;
  background-image: url('/assets/hero/hero.png?v=2751997');
  background-position: center bottom;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  overflow: hidden;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 80%,
    rgba(255, 255, 255, 0.5) 92%,
    #fff 100%
  );
  pointer-events: none;
}

.hero-inner {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  z-index: 2;
  transform: translateY(-50%);
  width: 100%;
  max-width: min(820px, 72%);
  margin-left: clamp(1.5rem, 4vw, 3rem);
  padding-right: 1.5rem;
  text-align: left;
}

.hero-text {
  font-size: clamp(1.5rem, 3.2vw, 2.25rem);
  font-weight: 700;
  line-height: 1.45;
  margin: 0;
  color: #1f1f1c;
  text-align: left;
}

.hero-text .highlight {
  font-style: normal;
  color: var(--color-accent);
  font-weight: 800;
}

/* Global audio player */
.global-player-mount {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 850;
}

.hero-player.is-global {
  position: relative;
  width: 100%;
  height: var(--player-height);
  background: transparent;
  border-top: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.hero-player__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.hero-player.is-wave-loading .hero-player__canvas {
  opacity: 0.55;
}

.hero-player__play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #1f1f1c;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(63, 63, 58, 0.06);
  transition: background var(--transition), transform var(--transition), border-color var(--transition);
}

.hero-player__play:hover {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(255, 255, 255, 0.75);
}

.hero-player.is-global .hero-player__play {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(63, 63, 58, 0.12);
  box-shadow: 0 4px 16px rgba(63, 63, 58, 0.1);
}

.hero-player.is-global .hero-player__play:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(63, 63, 58, 0.18);
}

.hero-player__play:active {
  transform: translate(-50%, -50%) scale(0.96);
}

.hero-player__icon {
  display: block;
}

.hero-player__icon--pause {
  display: none;
}

.hero-player.is-playing .hero-player__icon--play {
  display: none;
}

.hero-player.is-playing .hero-player__icon--pause {
  display: block;
}

.hero-player__times {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.5rem;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  padding: 0 clamp(0.75rem, 2.5vw, 1.5rem);
  pointer-events: none;
}

.hero-player__time {
  font-size: 0.6875rem;
  font-variant-numeric: tabular-nums;
  color: rgba(18, 18, 16, 0.78);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.hero-player audio {
  display: none;
}

/* Side frequency waves while audio plays */
.side-waves {
  position: fixed;
  inset: 0;
  z-index: 700;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.side-waves.is-active {
  opacity: 1;
  visibility: visible;
}

.side-waves__canvas {
  position: fixed;
  top: 0;
  width: 88px;
  height: 100vh;
  height: 100dvh;
}

.side-waves__canvas--left { left: 0; }
.side-waves__canvas--right { right: 0; }

body.is-audio-playing .site-header {
  box-shadow: none;
}

@media (max-width: 768px) {
  .side-waves__canvas {
    width: 60px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .side-waves {
    display: none;
  }
}

@media (max-width: 768px) {
  :root {
    --player-height: clamp(6.5rem, 16vh, 8rem);
  }

  .hero {
    padding-bottom: clamp(2rem, 4vh, 2.5rem);
  }

  .hero-player__play {
    width: 48px;
    height: 48px;
  }
}

/* Sections */
.section-preview {
  padding: clamp(3rem, 6vw, 5rem) 0;
}

.section-preview--alt {
  background: var(--color-surface);
}

.preview-header,
.preview-footer {
  display: flex;
  justify-content: flex-end;
}

.preview-header {
  margin-bottom: 1rem;
}

.preview-footer {
  margin-top: 1.25rem;
}

.section-link {
  font-size: 0.875rem;
  font-weight: 500;
}

.section-title {
  font-size: clamp(1.25rem, 2.5vw, 1.625rem);
  font-weight: 600;
  margin: 0 0 1.5rem;
  letter-spacing: -0.02em;
}

.subsection-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1.25rem;
}

/* Slideshow */
.slideshow {
  position: relative;
}

.slideshow-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.slideshow-header .section-title { margin: 0; }

.slide-counter {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

.slideshow-viewport {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.slides-track {
  flex: 1;
  position: relative;
  min-height: 320px;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(12px);
  transition: opacity 0.5s ease, transform 0.5s ease, visibility 0.5s;
}

.slide.is-active {
  position: relative;
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.slide-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.slideshow--steps .slide-step-wrap {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.slideshow--steps .slide-text {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 0;
}

.slideshow--steps .slide-visual {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.slideshow--image-left .slide-content {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto 1fr;
}

.slideshow--image-left .slide-visual {
  grid-column: 1;
  grid-row: 1 / span 2;
  order: unset;
}

.slideshow--image-left:not(.slideshow--steps) .slide-text {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
}

.slideshow--image-left:not(.slideshow--steps) .slide-visual {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.slideshow--image-left .slide-step-wrap {
  grid-column: 2;
  grid-row: 1;
}

.slideshow--image-left .slide-text {
  grid-column: 2;
  grid-row: 2;
}

.slideshow--steps .slide-body {
  text-align: center;
  max-width: 36ch;
  margin: 0 auto;
}

@media (min-width: 901px) {
  .slideshow--steps .slide-body {
    font-size: 1.875rem;
    line-height: 1.75;
    max-width: 40ch;
  }

  .slideshow:not(.slideshow--steps) .slide-body {
    font-size: 1.5rem;
    line-height: 1.75;
  }

  .slideshow--steps .slide-step-label {
    font-size: 1rem;
  }

  .slideshow--steps .slide-step-number {
    font-size: 3.5rem;
  }
}

.slide-text p.slide-body {
  font-size: clamp(1.125rem, 1.85vw, 1.375rem);
  margin: 0;
  color: var(--color-text);
  line-height: 1.75;
}

.slide-step {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0;
  line-height: 1;
}

.slide-step-label {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.slide-step-number {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-text);
}

.slide-heading {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 600;
  margin: 0 0 0.75rem;
}

.slide-visual img {
  width: 100%;
  border-radius: 0;
  box-shadow: none;
  background: none;
}

.slide-btn {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-bg);
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.slide-btn::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid rgba(37, 99, 235, 0.4);
  pointer-events: none;
  animation: slideEchoOut 2.4s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.slide-btn--prev {
  animation: slideNudgePrev 2.4s ease-in-out infinite;
}

.slide-btn--next {
  animation: slideNudgeNext 2.4s ease-in-out infinite;
}

.slide-btn--next::after {
  animation-delay: 0.2s;
}

.slide-btn:hover,
.slide-btn:focus-visible {
  animation: none;
  background: var(--color-surface);
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.slide-btn:hover::after,
.slide-btn:focus-visible::after {
  animation: none;
  opacity: 0;
}

.slide-btn:active {
  transform: scale(0.95);
}

@keyframes slideEchoOut {
  0% {
    transform: scale(1);
    opacity: 0.55;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

@keyframes slideNudgePrev {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-5px); }
}

@keyframes slideNudgeNext {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(5px); }
}

.slide-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.slide-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--color-border);
  cursor: pointer;
  padding: 0;
  transition: background var(--transition), transform var(--transition);
}

.slide-dot.is-active {
  background: var(--color-accent);
  transform: scale(1.25);
}

/* Study case profiles */
.study-preview-intro {
  color: var(--color-text-muted);
  max-width: 640px;
  margin: 0 0 1.75rem;
}

.study-profiles-row {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  padding: 0.25rem 0 1rem;
  margin: 0;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.study-profiles-row .study-profile-card {
  flex: 0 0 min(280px, 78vw);
  scroll-snap-align: start;
}

.study-profiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.study-profile-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 1.25rem;
  padding-top: 1.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  box-shadow:
    0 2px 8px rgba(63, 63, 58, 0.07),
    0 1px 2px rgba(63, 63, 58, 0.05);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.study-profile-card:hover {
  border-color: rgba(63, 63, 58, 0.2);
  box-shadow:
    0 10px 32px rgba(63, 63, 58, 0.12),
    0 4px 10px rgba(63, 63, 58, 0.08);
  transform: translateY(-2px);
  color: inherit;
}

.study-profile-card__file-tag {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 3.25rem;
  padding: 0.375rem 0.5rem 0.5rem;
  background: linear-gradient(165deg, #ebe3d4 0%, #d8ccb8 48%, #c9bca6 100%);
  border: 1px solid #a89578;
  border-top: none;
  border-right: none;
  border-radius: 0 0 0 0.375rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    -2px 2px 6px rgba(63, 63, 58, 0.12);
  transform: rotate(0deg);
  z-index: 1;
}

.study-profile-card__file-tag::before {
  content: '';
  position: absolute;
  top: 0;
  left: -0.5rem;
  width: 0.5rem;
  height: 0.5rem;
  background: linear-gradient(135deg, transparent 50%, #a89578 50%);
}

.study-profile-card__file-tag-caption {
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5c5348;
  line-height: 1;
  margin-bottom: 0.125rem;
}

.study-profile-card__file-tag-number {
  font-size: 1.125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  color: #3a342c;
  line-height: 1;
  font-family: 'Courier New', Courier, monospace;
}

.study-profile-card__avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 1rem;
  border: 2px solid var(--color-border);
  background: var(--color-surface);
}

.study-profile-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.study-profile-card__name {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--color-text);
}

.study-profile-card__bio {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--color-text-muted);
  margin: 0 0 1rem;
  flex: 1;
}

.study-profile-card__cta {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-accent);
}

.study-profile-card:hover .study-profile-card__cta {
  text-decoration: underline;
}

.study-profile {
  margin-top: 0.5rem;
}

.study-profile__label {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0 0 1.25rem;
}

.study-profile__header {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--color-border);
}

.study-profile__avatar {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-border);
  background: var(--color-surface);
}

.study-profile__name {
  margin-bottom: 0.75rem;
}

.study-profile__bio {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-text-muted);
  margin: 0 0 1rem;
}

.study-profile__reference {
  margin: 0.25rem 0 0;
}

.study-profile__reference-label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-text);
  margin: 0 0 0.375rem;
}

.study-profile__reference-url {
  display: block;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--color-text-muted);
  text-decoration: none;
  word-break: break-word;
}

.study-profile__reference-url:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

.study-profile__story {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.study-profile__section h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
}

.study-profile__section p {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--color-text-muted);
}

/* Begin experience */
.begin-section {
  padding: clamp(3rem, 6vw, 5rem) 0;
  background: var(--color-surface);
}

.begin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.begin-visual img {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
}

.begin-text .section-title { margin-bottom: 1rem; }

.begin-text p {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  margin: 0 0 1rem;
  color: var(--color-text-muted);
}

.begin-text p:last-child { margin-bottom: 0; }

/* Contact + Blog */
.contact-blog-section {
  padding: clamp(3rem, 6vw, 5rem) 0;
  border-top: 1px solid var(--color-border);
}

.contact-blog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

/* Forms */
.contact-form .page-title,
.contact-form .subsection-title { margin-bottom: 1.5rem; }

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.375rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-light);
}

.form-group textarea { resize: vertical; min-height: 100px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: #1d4ed8;
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

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

.btn-secondary:hover:not(:disabled) {
  border-color: rgba(63, 63, 58, 0.25);
  background: var(--color-surface);
}

.form-hint {
  font-weight: 400;
  color: var(--color-text-muted);
  font-size: 0.8125rem;
}

.form-status {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
}

.form-status.is-loading { color: var(--color-text-muted); }
.form-status.is-success { color: #059669; }
.form-status.is-error { color: #dc2626; }

.contact-alt {
  margin-top: 2rem;
  text-align: center;
  color: var(--color-text-muted);
}

/* Blog */
.blog-list--grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.blog-list--grid .blog-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg);
  box-shadow:
    0 2px 8px rgba(63, 63, 58, 0.07),
    0 1px 2px rgba(63, 63, 58, 0.05);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.blog-list--grid .blog-card:hover {
  border-color: rgba(63, 63, 58, 0.2);
  box-shadow:
    0 10px 32px rgba(63, 63, 58, 0.12),
    0 4px 10px rgba(63, 63, 58, 0.08);
  transform: translateY(-2px);
}

.blog-list--grid .blog-card h2 {
  font-size: 1.125rem;
  margin: 0.375rem 0 0.625rem;
}

.blog-list--grid .blog-card p {
  flex: 1;
  line-height: 1.6;
}

.blog-list--grid .read-more {
  margin-top: auto;
  padding-top: 1rem;
}

.blog-list--compact .blog-card {
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-border);
}

.blog-list--compact .blog-card:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.blog-card time {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.blog-card h2,
.blog-card h4 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0.25rem 0 0.5rem;
}

.blog-card h2 a,
.blog-card h4 a { color: var(--color-text); }

.blog-card h2 a:hover,
.blog-card h4 a:hover { color: var(--color-accent); }

.blog-card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

.read-more {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
}

/* Page sections */
.page-section {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.page-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 1.5rem;
}

.page-intro {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  max-width: 640px;
  margin: -0.5rem 0 2.5rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}

/* Vertical slides (dedicated pages) */
.vertical-slides {
  display: flex;
  flex-direction: column;
  gap: clamp(2.5rem, 5vw, 4rem);
}

.vertical-slide {
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--color-border);
}

.vertical-slide:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.vertical-slide-text .slide-step {
  margin-bottom: 1.25rem;
}

.vertical-slide-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.vertical-slide-text h2 {
  font-size: clamp(1.375rem, 2.2vw, 1.625rem);
  font-weight: 600;
  margin: 0 0 0.75rem;
}

.vertical-slide-text p {
  margin: 0;
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  line-height: 1.75;
  color: var(--color-text-muted);
}

.vertical-slide-visual img {
  width: 100%;
  border-radius: 0;
  box-shadow: none;
  background: none;
}

/* Study cases — legacy aliases removed; see study-profile-* */

/* Blog post full */
.blog-post-full time {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.blog-post-full p {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--color-text-muted);
}

.error-msg {
  text-align: center;
  padding: 4rem 1.5rem;
  color: #dc2626;
}

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  gap: 2rem 3rem;
  align-items: start;
  padding: clamp(2.5rem, 5vw, 3.5rem) 0 2rem;
}

.footer-brand {
  max-width: 320px;
}

.footer-logo {
  display: inline-block;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: -0.02em;
  margin-bottom: 0.625rem;
}

.footer-logo:hover {
  color: var(--color-accent);
}

.footer-tagline {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-text-muted);
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.625rem 1.5rem;
}

.footer-nav a {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--color-accent);
}

.footer-contact {
  text-align: right;
}

.footer-email {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
}

.footer-email:hover {
  color: var(--color-accent);
}

.footer-bottom {
  padding: 1.25rem 0 2rem;
  border-top: 1px solid var(--color-border);
}

.footer-copy {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* Admin */
.admin-page .page-title {
  margin-bottom: 0.5rem;
}

.admin-intro {
  margin: 0 0 1.75rem;
  color: var(--color-text-muted);
}

.admin-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.admin-form {
  margin-bottom: 2.5rem;
}

.admin-posts {
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.admin-post-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.admin-post-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
}

.admin-post-item__meta {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.admin-post-item__link {
  flex-shrink: 0;
  font-size: 0.875rem;
  font-weight: 500;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-inner {
    max-width: 100%;
    padding-left: 1.5rem;
  }

  .slide-content,
  .vertical-slide-body,
  .begin-grid,
  .contact-blog-grid {
    grid-template-columns: 1fr;
  }

  .vertical-slide-body .vertical-slide-visual { order: -1; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .site-nav__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: -0.5rem 0 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
  }

  .site-nav__title {
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted);
  }

  .nav-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: -0.5rem -0.75rem -0.5rem 0;
    padding: 0;
    border: none;
    border-radius: var(--radius);
    background: transparent;
    color: var(--color-text);
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
  }

  .nav-close:hover {
    background: var(--color-surface);
    color: var(--color-accent);
  }

  .site-nav {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 100dvh;
    z-index: 900;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: calc(var(--header-height) + 1rem) 1.5rem 2rem;
    background: #fff;
    border-radius: 0;
    transform: translateX(100%);
    transition: transform var(--transition);
    overflow-y: auto;
  }

  .site-nav.is-open { transform: translateX(0); }

  body.nav-open .site-header {
    z-index: 1000;
  }

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

  .nav-actions {
    border-left: none;
    padding-left: 0;
    margin-top: 0.5rem;
    flex-direction: column;
    gap: 0;
  }

  .nav-actions a {
    border-bottom: 1px solid var(--color-border);
  }

  body.nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }

  body.nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .slideshow-viewport {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: center;
    column-gap: 1rem;
    row-gap: 1rem;
  }

  .slides-track {
    grid-column: 1 / -1;
    grid-row: 1;
    min-height: auto;
    padding-bottom: 0;
    touch-action: pan-y;
    width: 100%;
  }

  .slide-btn {
    display: flex;
    width: 48px;
    height: 48px;
    grid-row: 2;
  }

  .slide-btn--prev {
    grid-column: 1;
    justify-self: end;
  }

  .slide-btn--next {
    grid-column: 2;
    justify-self: start;
  }

  .slide-content {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.25rem;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
  }

  .slide-step-wrap {
    order: 1;
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .slideshow:not(.slideshow--steps) .slide-visual {
    order: 1;
  }

  .slideshow:not(.slideshow--steps) .slide-text {
    order: 2;
  }

  .slideshow--steps .slide-step-wrap {
    order: 1;
  }

  .slideshow--steps .slide-visual {
    order: 2;
  }

  .slideshow--steps .slide-text {
    order: 3;
  }

  .slide-step {
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
  }

  .slide-visual {
    width: 100%;
  }

  .slide-visual img {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
  }

  .slide-text {
    text-align: center;
    width: 100%;
  }

  .slideshow--steps .slide-text,
  .slideshow--image-left .slide-text {
    align-items: center;
    min-height: auto;
  }

  .slideshow--steps .slide-body,
  .slideshow--image-left .slide-body {
    max-width: none;
    text-align: center;
  }

  .slideshow--steps .slide-step-wrap,
  .slideshow--image-left .slide-step-wrap,
  .slideshow--steps .slide-text,
  .slideshow--steps .slide-visual,
  .slideshow--image-left .slide-visual,
  .slideshow--image-left .slide-text {
    grid-column: unset;
    grid-row: unset;
  }

  .preview-header,
  .preview-footer { justify-content: flex-start; }

  .study-profile__header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .study-profiles-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .footer-contact {
    text-align: left;
  }

  .admin-panel__header {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (min-width: 1400px) {
  .container { max-width: var(--container-wide); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  html { scroll-behavior: auto; }
}
