:root {
  --bg: #FFFFFF;
  --bg-soft: #F2EBEE;
  --bg-soft-2: #ECE4E8;
  --ink: #0A0A0A;
  --ink-2: #1A1A1A;
  --muted: #6B6470;
  --line: #E4DAE0;
  --line-dark: #2A2024;
  --accent: #E04B7C;
  --accent-2: #8B5BD9;
}

* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter Tight', 'Inter', system-ui, -apple-system, sans-serif;
  font-feature-settings: 'ss01';
  letter-spacing: -0.005em;
}

/* Page-line canvas — sits behind sections, draws only the continuing curve */
.page-line {
  position: absolute;
  inset: 0 0 auto 0;
  width: 100%;
  pointer-events: none;
  z-index: 0;
}
.page-line-canvas { display: block; width: 100%; }
body > div { position: relative; z-index: 1; }

/* Sections — pinkish lavender extends to dark on the HOME page only, so the page-line is visible through.
   Other pages (careers) keep the original lavender bg + dark text. */
.section-lavender {
  background: var(--bg-soft);
  position: relative;
}
.section-lavender > * { position: relative; z-index: 1; }

.home-page .section-lavender {
  background: transparent;
  color: #f5f4f1;
}
.home-page .section-lavender h1,
.home-page .section-lavender h2,
.home-page .section-lavender h3,
.home-page .section-lavender .h-display { color: #f5f4f1 !important; }
.home-page .section-lavender p,
.home-page .section-lavender .foot-link,
.home-page .section-lavender address,
.home-page .section-lavender dt,
.home-page .section-lavender dd { color: rgba(245,244,241,0.82) !important; }
.home-page .section-lavender .eyebrow { color: rgba(245,244,241,0.55) !important; }
/* Inner white panels keep their own dark text */
.home-page .section-lavender .bg-white { color: var(--ink); }
.home-page .section-lavender .bg-white h1,
.home-page .section-lavender .bg-white h2,
.home-page .section-lavender .bg-white h3,
.home-page .section-lavender .bg-white p,
.home-page .section-lavender .bg-white .h-display,
.home-page .section-lavender .bg-white .category-card > div:not(.icon-badge) { color: var(--ink) !important; }
.home-page .section-lavender .bg-white .icon-badge { color: #fff !important; }

/* Whole page on home goes dark so the canvas line is visible across all transparent sections */
body.home-active { background: #040404; }

.font-display { font-family: 'Inter Tight','Inter',sans-serif; font-weight: 500; letter-spacing: -0.035em; line-height: 0.98; }
.h-display { font-family: 'Inter Tight','Inter',sans-serif; font-weight: 500; line-height: 0.98; letter-spacing: -0.04em; }
.font-mono-tiny { font-family: 'JetBrains Mono', ui-monospace, monospace; font-feature-settings: 'tnum'; }

/* --- Reveal animations --- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1.1s cubic-bezier(.2,.65,.2,1), transform 1.1s cubic-bezier(.2,.65,.2,1);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .9s cubic-bezier(.2,.65,.2,1), transform .9s cubic-bezier(.2,.65,.2,1);
}
.reveal-stagger.in > * { opacity: 1; transform: none; }
.reveal-stagger.in > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 80ms; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 160ms; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 240ms; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: 320ms; }

/* --- Nav --- */
.nav-wrap {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background .4s ease, border-color .4s ease;
  border-bottom: 1px solid transparent;
}
.nav-wrap.theme-dark { color: #fff; }
.nav-wrap.theme-light { color: var(--ink); }
.nav-wrap.theme-light.scrolled {
  background: rgba(255,255,255,0.88);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--line);
}
.nav-wrap.theme-dark.scrolled {
  background: rgba(10,10,10,0.7);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
}

.nav-link {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  opacity: 0.85;
  transition: opacity .3s ease;
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: none; cursor: pointer; color: inherit;
}
.nav-link:hover, .nav-link.active { opacity: 1; }

.badge-circle {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 26px; padding: 0 6px;
  border-radius: 999px;
  font-size: 11px; font-weight: 600;
}
.nav-wrap.theme-dark .badge-circle { background: #fff; color: #0A0A0A; }
.nav-wrap.theme-light .badge-circle { background: var(--ink); color: #fff; }

/* --- Scroll progress bar --- */
.scroll-progress-bar {
  position: absolute; left: 0; right: 0; top: 0; height: 2px;
  pointer-events: none;
}
.scroll-progress-bar .bar {
  height: 100%; width: 100%;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  transform-origin: 0 50%;
  transform: scaleX(0);
  transition: transform .12s linear;
}

/* --- Pill buttons --- */
.btn-pill {
  display: inline-flex; align-items: center; gap: 12px;
  background: #fff; color: var(--ink);
  padding: 13px 22px 13px 24px;
  border-radius: 999px;
  font-size: 14px; font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap; cursor: pointer; border: none;
  transition: transform .35s cubic-bezier(.2,.65,.2,1), background .35s ease, color .35s ease;
}
.btn-pill:hover { transform: translateY(-2px); }
.btn-pill:disabled { opacity: 0.6; pointer-events: none; }
.btn-pill .icon-mark {
  width: 22px; height: 22px;
  background: var(--accent);
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
  flex: 0 0 auto;
}
.btn-pill.btn-pill-dark { background: var(--ink); color: #fff; }
.btn-pill.btn-pill-dark .icon-mark { background: var(--accent); }

.tag-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px; border: 1px solid var(--line);
  border-radius: 999px; font-size: 14px;
  background: transparent;
  transition: background .35s ease, transform .35s ease;
}
.tag-pill:hover { background: var(--bg-soft); transform: translateY(-1px); }

/* --- Hero headline (calmer, lighter weight, well-composed) --- */
.hero-headline {
  font-family: 'Inter Tight','Inter',sans-serif;
  font-weight: 400;
  font-size: clamp(32px, 5.4vw, 80px);
  line-height: 1.08;
  letter-spacing: -0.028em;
}
@media (max-width: 640px) {
  .hero-headline { font-size: clamp(28px, 8.5vw, 44px); line-height: 1.1; }
}
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: center;
  text-align: center;
}
.stat-cell { min-width: 0; display: flex; flex-direction: column; align-items: center; }
.stat-num {
  font-family: 'Inter Tight','Inter',sans-serif;
  font-size: clamp(34px, 4.6vw, 64px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  white-space: nowrap;
}
.stat-label {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: -0.005em;
}

@media (max-width: 640px) {
  .stats-row { gap: 12px; }
  .stat-num { font-size: clamp(22px, 8vw, 40px); }
  .stat-label { font-size: 10.5px; margin-top: 6px; }
}

/* --- Job rows --- */
.job-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 32px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: padding .35s cubic-bezier(.2,.65,.2,1);
  background: transparent;
  border-left: none; border-right: none; border-top: none;
  text-align: left;
  width: 100%;
}
.job-row .job-title {
  font-size: clamp(22px, 2vw, 26px);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: var(--ink);
}
.job-row .job-meta {
  font-size: 14px;
  color: var(--muted);
}
.job-row .job-team {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.job-row .job-arrow {
  width: 44px; height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink);
  transition: background .3s ease, color .3s ease, transform .35s cubic-bezier(.2,.65,.2,1), border-color .3s ease;
  flex: 0 0 auto;
}
.job-row:hover { padding-left: 14px; }
.job-row:hover .job-arrow { background: var(--ink); color: #fff; border-color: var(--ink); transform: rotate(-45deg); }

/* --- Image frame (B&W) --- */
.img-frame {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #1A1A1A;
}
.img-frame img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(100%) contrast(1.02);
  transition: filter .6s ease;
  will-change: transform;
}
.img-frame:hover img { filter: grayscale(100%) contrast(1.05); }

/* --- Icon badge --- */
.icon-badge {
  width: 88px; height: 88px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: transform .4s cubic-bezier(.2,.65,.2,1), background .3s ease;
}
.category-card { text-align: center; padding: 32px 16px; transition: transform .4s cubic-bezier(.2,.65,.2,1); }
.category-card:hover { transform: translateY(-6px); }
.category-card:hover .icon-badge { background: var(--accent); }

/* --- Sections (duplicate removed; canonical rule is at the top of this file) --- */
.section-lavender-2 { background: linear-gradient(180deg, var(--bg-soft), var(--bg-soft-2)); position: relative; }

/* --- Dark hero --- */
.hero-dark {
  background: #040404;
  color: #fff;
  position: relative;
  overflow: hidden;
}
/* Page backdrop — single canvas covering the whole document, sits behind everything */
.page-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.page-backdrop-canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.home-page { position: relative; min-height: 100vh; }
.home-page > *:not(.page-backdrop):not(.modal-backdrop) { position: relative; z-index: 1; }
.home-page .hero-dark { background: transparent; }
.hero-dark > .relative { z-index: 10; }
.ribbon-wrap { position: absolute; inset: 0; pointer-events: none; overflow: hidden; will-change: transform; }
.ribbon-wrap svg { width: 100%; height: 100%; display: block; }
@keyframes ribbon-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-14px, 8px) scale(1.015); }
}
.ribbon-anim { animation: ribbon-drift 22s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }

/* Soft breathing sphere — calm, not jiggly */
@keyframes orb-breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.03); }
}
.orb-elastic {
  animation: orb-breathe 12s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
  will-change: transform;
}

/* Very subtle drifting glow inside lavender sections */
.lavender-glow {
  position: absolute; inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.lavender-glow svg { width: 100%; height: 100%; display: block; }
@keyframes lg-drift-a { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(70px, 30px); } }
@keyframes lg-drift-b { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-60px, -36px); } }
@keyframes lg-drift-c { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(30px, -50px); } }
.lg-a { animation: lg-drift-a 32s ease-in-out infinite; transform-box: fill-box; will-change: transform; }
.lg-b { animation: lg-drift-b 42s ease-in-out infinite; transform-box: fill-box; will-change: transform; animation-delay: -8s; }
.lg-c { animation: lg-drift-c 50s ease-in-out infinite; transform-box: fill-box; will-change: transform; animation-delay: -16s; }

/* --- Scroll spinner (geometric mark, rotates with scroll velocity) --- */
.scroll-spinner {
  display: inline-block;
  color: currentColor;
  will-change: transform;
}

/* --- Geometric corner decoration --- */
.geo-corner {
  position: absolute; pointer-events: none;
  width: 320px; height: 320px;
  background:
    radial-gradient(circle at center, transparent 35%, rgba(224,75,124,0.06) 35.5%, transparent 36%),
    radial-gradient(circle at center, transparent 55%, rgba(139,91,217,0.05) 55.5%, transparent 56%),
    radial-gradient(circle at center, transparent 75%, rgba(0,0,0,0.04) 75.5%, transparent 76%);
}
.geo-corner.top-left { top: -160px; left: -160px; }
.geo-corner.top-right { top: -160px; right: -160px; }
.geo-corner.bottom-right { bottom: -160px; right: -160px; }

/* Subtle dotted grid background for premium tech feel */
.tech-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle, rgba(0,0,0,0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, transparent, #000 25%, #000 75%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 25%, #000 75%, transparent);
  opacity: 0.6;
}

html { scroll-behavior: smooth; }
::selection { background: var(--accent); color: #fff; }
.eyebrow { font-size: 12px; letter-spacing: 0.04em; color: var(--muted); font-weight: 500; display: inline-flex; align-items: center; gap: 8px; }

/* --- Footer --- */
.foot-link { color: var(--ink); opacity: 0.7; transition: opacity .3s ease; }
.foot-link:hover { opacity: 1; }

/* --- Perla creator program pages (unlisted) --- */
.perla-page { min-height: 100vh; display: flex; flex-direction: column; background: #FBF8F9; }
.perla-page main { flex: 1; }
.perla-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(251,248,249,0.85);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.perla-wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.perla-wordmark .wm-text {
  font-size: 20px; font-weight: 600; letter-spacing: -0.02em; line-height: 1;
}
.perla-pearl {
  width: 22px; height: 22px; border-radius: 999px; display: inline-block;
  background: radial-gradient(circle at 32% 28%, #ffffff 0%, #F2EBEE 28%, #E9C2D2 55%, #B98AB0 78%, #5C3B9E 100%);
  box-shadow: 0 1px 3px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.55);
}
.perla-hero {
  padding: 80px 0 56px;
}
.perla-hero h1 {
  font-family: 'Inter Tight','Inter',sans-serif;
  font-weight: 700;
  font-size: clamp(40px, 6.2vw, 84px);
  line-height: 1.0;
  letter-spacing: -0.035em;
  color: var(--ink);
}
.perla-hero .eyebrow-tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin-bottom: 24px;
}
.perla-hero .eyebrow-tag .dot {
  width: 6px; height: 6px; border-radius: 999px; background: var(--accent);
}
.perla-hero p.lead {
  margin-top: 22px;
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 640px;
}
.perla-hero .pay-pill {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 26px;
  padding: 12px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
}
.perla-hero .pay-pill strong { color: var(--ink); font-weight: 700; }
.perla-section { padding: 56px 0; border-top: 1px solid var(--line); }
.perla-section h2 {
  font-family: 'Inter Tight','Inter',sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 3.8vw, 48px);
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--ink);
  margin-bottom: 20px;
}
.perla-section p {
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--ink-2);
  margin-bottom: 14px;
  max-width: 720px;
}
.perla-cta-row { padding: 56px 0 100px; text-align: left; }
.perla-cta-row .helper { margin-top: 14px; font-size: 13.5px; color: var(--muted); }
.perla-footer {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 28px 0;
}
.perla-footer .row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 13px; color: var(--muted);
}
.perla-footer a { color: var(--muted); transition: color .2s ease; }
.perla-footer a:hover { color: var(--ink); }

/* --- Apply form --- */
.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  margin-top: 36px;
  transition: color .2s ease;
}
.back-link:hover { color: var(--ink); }
.apply-card {
  background: transparent;
  margin-top: 28px;
  padding: 0;
  display: flex; flex-direction: column; gap: 26px;
}
.apply-card .group-title {
  font-size: 22px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink);
  padding-top: 16px;
  border-top: 1px solid var(--line);
  margin-top: 8px;
}
.apply-card .group-desc {
  font-size: 14.5px; color: var(--ink-2); line-height: 1.55;
  margin-top: -10px; margin-bottom: 6px;
}
.field-label {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin-bottom: 8px;
}
.field-label .req { color: var(--accent); margin-left: 2px; }
.field-hint { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; margin-bottom: 8px; }
.apply-input {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  letter-spacing: -0.005em;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.apply-input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(0,0,0,0.04);
}

.pill-radio-group { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.pill-radio {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 16px 9px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-size: 14.5px; font-weight: 500;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
  min-width: 200px;
}
.pill-radio input { position: absolute; opacity: 0; pointer-events: none; }
.pill-radio .pill-icon {
  width: 22px; height: 22px; border-radius: 6px;
  background: var(--bg-soft);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--ink);
  flex: 0 0 auto;
}
.pill-radio:hover { border-color: var(--ink); }
.pill-radio.active { border-color: var(--ink); background: #fff; box-shadow: 0 0 0 3px rgba(0,0,0,0.04); }
.pill-radio.active .pill-icon { background: var(--ink); color: #fff; }

.file-drop {
  display: flex; align-items: center; justify-content: center;
  border: 1.5px dashed var(--line);
  border-radius: 14px;
  padding: 26px;
  text-align: center;
  cursor: pointer;
  background: #fff;
  color: var(--muted);
  font-size: 14.5px;
  transition: border-color .2s ease, background .2s ease;
}
.file-drop:hover { border-color: var(--ink); }
.file-drop input { display: none; }
.file-drop.has-file { color: var(--ink); border-color: var(--ink); background: var(--bg-soft); }
.file-drop .arrow-up { display: inline-block; margin-right: 8px; }

.submit-success {
  margin-top: 32px;
  padding: 28px 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
}
.submit-success h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.submit-success p { color: var(--ink-2); font-size: 15px; line-height: 1.6; }

@media (max-width: 640px) {
  .perla-hero { padding: 48px 0 36px; }
  .perla-section { padding: 40px 0; }
  .perla-cta-row { padding: 36px 0 64px; }
  .pill-radio { min-width: 0; width: 100%; }
}

/* --- Legal prose (Privacy policy / notice) --- */
.legal-prose { color: var(--ink-2); font-size: 15.5px; line-height: 1.7; letter-spacing: -0.003em; }
.legal-prose h2 {
  font-family: 'Inter Tight','Inter',sans-serif;
  font-weight: 700;
  font-size: clamp(22px, 2.2vw, 28px);
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
  margin-top: 48px;
  margin-bottom: 18px;
}
.legal-prose h2:first-child { margin-top: 0; }
.legal-prose h3 {
  font-family: 'Inter Tight','Inter',sans-serif;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-top: 28px;
  margin-bottom: 10px;
}
.legal-prose p { margin-bottom: 14px; }
.legal-prose ol, .legal-prose ul { margin: 10px 0 18px 22px; }
.legal-prose ol { list-style: decimal; }
.legal-prose ul { list-style: disc; }
.legal-prose ol > li, .legal-prose ul > li { margin-bottom: 10px; padding-left: 4px; }
.legal-prose ul ul, .legal-prose ol ul { list-style: circle; margin-top: 6px; margin-bottom: 6px; }
.legal-prose a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.legal-prose a:hover { color: var(--accent); }
.legal-prose strong { font-weight: 600; color: var(--ink); }
.legal-prose .dl-block { margin: 10px 0 18px; }
.legal-prose .dl-block dt { font-weight: 600; color: var(--ink); display: inline; }
.legal-prose .dl-block dd { display: inline; margin: 0; }
.legal-prose .dl-block .dl-row { margin-bottom: 8px; }

/* --- Forms --- */
.card-form {
  background: #fff;
  border-radius: 28px;
  padding: 32px;
  display: flex; flex-direction: column; gap: 18px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.03);
  border: 1px solid var(--line);
}
@media (min-width: 768px) { .card-form { padding: 40px 44px; gap: 22px; } }

.card-form-grid {
  display: grid; grid-template-columns: 1fr; gap: 18px;
}
@media (min-width: 700px) { .card-form-grid { grid-template-columns: 1fr 1fr; gap: 22px; } }

.form-label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 8px;
}
.form-label .req { color: var(--accent); }
.form-hint {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 6px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 400;
}
.form-input {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 15.5px;
  font-family: inherit;
  color: var(--ink);
  letter-spacing: -0.005em;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.form-input:focus {
  outline: none;
  background: #fff;
  border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(0,0,0,0.04);
}
.form-textarea { resize: vertical; min-height: 140px; line-height: 1.55; }

.form-actions {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-top: 8px; flex-wrap: wrap;
}

.form-status {
  font-size: 13.5px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
}
.form-status.sending { background: rgba(0,0,0,0.05); color: var(--ink-2); }
.form-status.sent { background: rgba(75,170,100,0.12); color: #1f6d3a; }
.form-status.error { background: rgba(224,75,124,0.12); color: #962a4a; }

.dot-spin {
  width: 10px; height: 10px; border-radius: 999px;
  border: 1.5px solid currentColor; border-top-color: transparent;
  animation: spin 0.9s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Modal --- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10,10,10,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fade-in .25s ease;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal-panel {
  background: #fff;
  border-radius: 28px;
  width: 100%; max-width: 720px;
  max-height: 92vh;
  overflow: auto;
  position: relative;
  animation: pop-in .35s cubic-bezier(.2,.7,.2,1);
  box-shadow: 0 30px 80px rgba(0,0,0,0.35);
}
@keyframes pop-in { from { opacity: 0; transform: translateY(20px) scale(0.98); } to { opacity: 1; transform: none; } }
.modal-head {
  padding: 32px 32px 18px;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px;
}
.modal-title {
  font-size: clamp(28px, 3.5vw, 38px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-top: 6px;
}
.modal-sub { font-size: 13px; color: var(--muted); margin-top: 8px; }
.modal-close {
  width: 38px; height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .2s ease;
  color: var(--ink);
}
.modal-close:hover { background: var(--bg-soft); }
.modal-body {
  padding: 16px 32px 32px;
  display: flex; flex-direction: column; gap: 18px;
}

@media (max-width: 768px) {
  .job-row { grid-template-columns: 1fr auto; gap: 16px; padding: 22px 0; }
  .job-row .job-team { display: none; }
  .modal-head, .modal-body { padding-left: 22px; padding-right: 22px; }
}

/* --- Mobile refinements --- */
@media (max-width: 640px) {
  /* Nav: tighten */
  .nav-wrap .max-w-\[1280px\] { padding-left: 18px; padding-right: 18px; }
  .btn-pill { padding: 11px 16px 11px 18px; font-size: 13px; gap: 8px; }
  .btn-pill .icon-mark { width: 20px; height: 20px; }

  /* Hero: tighter padding */
  .hero-dark { min-height: 86vh; padding-bottom: 60px; }

  /* Sections: less vertical padding */
  section { padding-top: 0; padding-bottom: 0; }

  /* Image frames smaller corners */
  .img-frame { border-radius: 22px; }

  /* Form: tighter */
  .card-form { padding: 22px; border-radius: 22px; }
  .card-form-grid { grid-template-columns: 1fr; gap: 14px; }
  .form-input { font-size: 15px; padding: 12px 14px; }
  .form-textarea { min-height: 120px; }
  .form-actions { flex-direction: column-reverse; align-items: stretch; }
  .form-actions .btn-pill { justify-content: center; }

  /* Modal: smaller header */
  .modal-panel { border-radius: 22px; }
  .modal-title { font-size: 26px; }
  .modal-head { padding: 22px 22px 12px; }
  .modal-body { gap: 14px; padding-bottom: 22px; }

  /* Icon badge smaller in category cards */
  .icon-badge { width: 64px; height: 64px; }
  .icon-badge svg { width: 26px; height: 26px; }
  .category-card { padding: 22px 8px; }

  /* Tech grid less visible */
  .tech-grid { background-size: 20px 20px; opacity: 0.4; }

  /* Atmosphere blobs less visible on mobile to preserve perf */
  .page-atmos .blob { filter: blur(60px); opacity: 0.8; }
}
