:root {
  --ink: #0c1a22;
  --ink-soft: #11242e;
  --foam: #f4f6f5;
  --mist: #9fb3bb;
  --hairline: rgba(244,246,245,0.12);
  --aegean: #5b9bb5;
  --sand: #e3c08f;
  --sand-ink: #1c130a;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background: radial-gradient(120% 140% at 85% -10%, var(--ink-soft) 0%, var(--ink) 55%);
  color: var(--foam);
  min-height: 100vh;
}

/* ─── HERO ──────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 32px;
  opacity: 0;
  transform: translateY(12px);
  animation: fadeInUp 0.8s ease-out 0.2s forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* MEANDER */
.meander {
  position: absolute;
  bottom: -60px;
  right: -60px;
  width: 520px;
  height: 360px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Cpath d='M0 36 L0 12 L12 12 L12 36 L24 36 L24 12 L36 12 L36 36 L48 36' fill='none' stroke='%239fb3bb' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: repeat;
  opacity: 0.07;
  pointer-events: none;
}

/* TOPBAR */
.topbar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 56px;
}

.wordmark {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: lowercase;
  color: var(--mist);
}

.status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--mist);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
}

/* HEADLINE */
.headline {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 380;
  font-size: clamp(2.1rem, 5.6vw, 3.6rem);
  line-height: 1.18;
  max-width: 600px;
}

.headline .accent {
  color: var(--sand);
}

/* SIGNATURE */
.signature-wrap {
  width: clamp(200px, 32vw, 320px);
  margin: 22px 0 40px;
}

.signature-line {
  fill: none;
  stroke: var(--aegean);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 620;
  stroke-dashoffset: 620;
  animation: draw 1.5s ease 0.35s forwards;
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

/* SPEC ROW */
.spec-row {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  margin-bottom: 44px;
}

.spec {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.spec-value {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 15px;
}

.spec-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  color: var(--mist);
}

.spec-divider {
  width: 1px;
  background: var(--hairline);
}

/* BUTTONS */
.cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  padding: 13px 22px;
  border-radius: 8px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--sand);
  color: var(--sand-ink);
}

.btn-secondary {
  border: 1px solid var(--hairline);
  color: var(--foam);
  background: transparent;
}

/* ─── ABOUT ─────────────────────────────────────── */
.about {
  background: var(--ink);
  border-top: 1px solid var(--hairline);
}

.about-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 96px 32px;
}

.about-eyebrow {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--mist);
  margin-bottom: 36px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
  align-items: start;
}

.about-heading {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 360;
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  line-height: 1.22;
  color: var(--foam);
  position: sticky;
  top: 32px;
}

.about-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.about-body {
  font-size: 15px;
  line-height: 1.75;
  color: rgba(244, 246, 245, 0.75);
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  padding: 5px 12px;
  border-radius: 99px;
  border: 1px solid var(--hairline);
  color: var(--mist);
  letter-spacing: 0.04em;
}

/* ─── MODAL ─────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 26, 34, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

@media (min-width: 540px) {
  .modal-backdrop {
    align-items: center;
  }
}

.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--ink-soft);
  border: 1px solid var(--hairline);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 500px;
  padding: 28px 28px 36px;
  transform: translateY(24px);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 540px) {
  .modal {
    border-radius: 20px;
    transform: translateY(16px) scale(0.98);
  }
}

.modal-backdrop.is-open .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--mist);
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--mist);
  padding: 4px;
  display: flex;
  align-items: center;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}

.modal-close:hover {
  color: var(--foam);
  background: var(--hairline);
}

.modal-close svg {
  width: 18px;
  height: 18px;
}

.modal-title {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 360;
  font-size: 1.75rem;
  line-height: 1.2;
  margin-bottom: 6px;
}

.modal-subtitle {
  font-size: 13px;
  color: rgba(244, 246, 245, 0.55);
  margin-bottom: 28px;
}

/* FORM */
.modal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--mist);
}

.field-input {
  background: rgba(244, 246, 245, 0.05);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  color: var(--foam);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
  width: 100%;
}

.field-input::placeholder {
  color: rgba(159, 179, 187, 0.45);
}

.field-input:focus {
  border-color: var(--aegean);
  background: rgba(91, 155, 181, 0.06);
}

.field-textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.6;
}

.modal-submit {
  width: auto;
  max-width: 320px;
  justify-content: center;
  margin-top: 4px;
}

/* SUCCESS STATE */
.modal-success {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 0 8px;
  gap: 10px;
}

.modal-success.is-visible {
  display: flex;
}

.success-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 4px;
}

.success-heading {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 360;
  font-size: 1.4rem;
}

.success-sub {
  font-size: 13px;
  color: rgba(244, 246, 245, 0.55);
}

/* ERROR / FALLBACK STATE */
.modal-error {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 0 8px;
  gap: 10px;
}

.modal-error.is-visible {
  display: flex;
}

.error-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 4px;
}

.error-heading {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 360;
  font-size: 1.4rem;
}

.error-sub {
  font-size: 13px;
  line-height: 1.55;
  color: rgba(244, 246, 245, 0.55);
  max-width: 340px;
}

.error-mailto {
  margin-top: 6px;
}

/* ─── MOBILE ─────────────────────────────────────── */
@media (max-width: 520px) {
  .hero-inner { padding: 48px 24px; }

  .cta-row {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .about-inner {
    padding: 72px 24px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .about-heading {
    position: static;
    font-size: 1.5rem;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .modal {
    padding: 24px 20px 32px;
  }
}

/* ─── REDUCED MOTION ─────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .signature-line {
    animation: none;
    stroke-dashoffset: 0;
  }

  .btn,
  .modal-backdrop,
  .modal,
  .modal-close,
  .field-input {
    transition: none;
  }
}

.modal-form.is-hidden {
  display: none;
}

body.modal-open {
  overflow: hidden;
}
/* slow-update fallback for signature */
.signature-line {
  animation: none;
  stroke-dashoffset: 0;
}

/* --- LANGUAGE SWITCHER --- */
.lang-switch {
  background: transparent;
  border: 1px solid var(--hairline);
  color: var(--mist);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
  margin-left: 12px;
}

.lang-switch:hover {
  color: var(--foam);
  border-color: var(--aegean);
}

/* --- MODAL POP-UP ANIMATION FIX --- */
.modal {
  transform: translateY(24px) scale(0.98);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
}

.modal-backdrop.is-open .modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Ensure modal submit appears as a normal button */
.modal-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 8px;
}