/* ═══════════════════════════════════════════════════
   Unit 6 — Design System
   ═══════════════════════════════════════════════════ */

:root {
  color-scheme: light;

  /* Palette */
  --bg:           #fafaf8;
  --bg-elevated:  #f4f4f0;
  --surface:      #efefeb;
  --line:         #e0e0da;
  --line-strong:  #c8c8c0;
  --text:         #111110;
  --text-muted:   #444440;
  --text-soft:    #888882;
  --accent:       #222220;
  --accent-hover: #444440;
  --accent-light: rgba(34, 34, 32, 0.06);
  --accent-mid:   rgba(34, 34, 32, 0.12);
  --positive:     #4a7c59;
  --negative:     #c4503a;

  /* Typography */
  --font-body:    'Manrope', sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
  --font-accent:  'Fraunces', serif;

  /* Spacing (8pt grid) */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;
  --space-5xl: 128px;

  /* Easing */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; }

/* ── Grain Overlay ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px;
}

/* ── Layout ── */
.shell {
  margin: 0 auto;
  width: min(1120px, calc(100% - 80px));
}

.shell--narrow {
  margin: 0 auto;
  width: min(720px, calc(100% - 80px));
}

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

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

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 80ms; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 160ms; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 240ms; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 320ms; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 400ms; }

.reveal-stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ── Nav ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 28px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: min(1120px, calc(100% - 80px));
  margin: 0 auto;
  background: var(--bg);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: var(--text);
  border-radius: 100px;
  transition: background 0.25s var(--ease-smooth), transform 0.25s var(--ease-smooth);
}

.nav-cta:hover {
  background: var(--accent);
  transform: translateY(-1px);
}

/* ── Hero (Hiring) ── */
.hiring-hero {
  min-height: 85dvh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 120px 0 var(--space-4xl);
  position: relative;
  overflow: hidden;
}


.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--accent-light);
  border: 1px solid var(--accent-mid);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-xl);
  width: fit-content;
}

.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-soft);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.5); }
}

.hero-heading {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 8vw, 7rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  font-weight: 700;
  margin-bottom: var(--space-xl);
  max-width: 900px;
}

.hero-heading em {
  font-family: var(--font-accent);
  font-style: normal;
  font-weight: 400;
  color: var(--text-muted);
}

.hero-sub {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: var(--text-muted);
  max-width: 540px;
  line-height: 1.65;
  margin-bottom: var(--space-2xl);
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  background: var(--text);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: 100px;
  transition: all 0.3s var(--ease-smooth);
  position: relative;
  overflow: hidden;
}

.hero-cta::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: translateY(100%);
  transition: transform 0.35s var(--ease-out);
  border-radius: 100px;
}

.hero-cta span {
  position: relative;
  z-index: 1;
}

.hero-cta svg {
  position: relative;
  z-index: 1;
  transition: transform 0.3s var(--ease-out);
}

.hero-cta:hover::after {
  transform: translateY(0);
}

.hero-cta:hover svg {
  transform: translateX(4px);
}

.hero-line {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
}


/* ── Section Shared ── */
.section {
  padding: var(--space-5xl) 0;
  border-bottom: 1px solid var(--line);
}

.section-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-4xl);
  align-items: start;
}

.section-label {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
  padding-top: 6px;
  position: sticky;
  top: 96px;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.03em;
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: var(--space-md);
}

.section-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 520px;
}

/* ── Message Section ── */
.message-section {
  padding: var(--space-5xl) 0;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.message-kicker {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: var(--space-lg);
}

.message-quote {
  font-family: var(--font-accent);
  font-size: clamp(1.5rem, 3.5vw, 2.4rem);
  line-height: 1.3;
  color: var(--text);
  max-width: 760px;
  margin: 0 auto;
  position: relative;
  padding: 0 var(--space-xl);
}

.message-quote::before {
  content: '\201C';
  position: absolute;
  top: -0.15em;
  left: -0.1em;
  font-size: 4em;
  color: var(--accent-mid);
  font-family: var(--font-accent);
  line-height: 1;
}

.message-author {
  margin-top: var(--space-xl);
  font-size: 0.88rem;
  color: var(--text-soft);
  font-weight: 500;
}

/* ── Values Table ── */
.values-table {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.values-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.values-header-cell {
  padding: 20px 28px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}

.values-header-cell svg {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.values-header-cell--positive {
  background: var(--text);
  color: #fff;
}

.values-header-cell--negative {
  background: var(--text-muted);
  color: rgba(255, 255, 255, 0.8);
}

.values-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  transition: background 0.2s var(--ease-smooth);
}

.values-row:hover {
  background: var(--surface);
}

.values-cell {
  padding: 20px 28px;
  font-size: 0.95rem;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 12px;
}

.values-cell svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.values-cell--positive {
  color: var(--text);
  font-weight: 500;
  background: rgba(255, 255, 255, 0.5);
}

.values-cell--positive svg {
  color: var(--positive);
}

.values-cell--negative {
  color: var(--text-soft);
  background: var(--bg-elevated);
}

.values-cell--negative svg {
  color: var(--negative);
  opacity: 0.5;
}

/* ── Glass Card (shared) ── */
.glass-card {
  position: relative;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.02),
    0 4px 16px rgba(0, 0, 0, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: all 0.35s var(--ease-out);
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.02),
    0 8px 32px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.6);
}

/* ── Benefits Cards ── */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

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

.benefit-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg);
  color: var(--text);
}

.benefit-icon svg {
  width: 28px;
  height: 28px;
  stroke-width: 1.5;
}

.benefit-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
}

.benefit-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Requirements Grid ── */
.requirements-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.requirement-item {
  padding: var(--space-xl);
}

.requirement-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  color: var(--text);
}

.requirement-icon svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.5;
}

.requirement-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-sm);
}

.requirement-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Application Form ── */
.form-section {
  padding: var(--space-5xl) 0;
  background: var(--bg);
}

.form-intro {
  text-align: center;
  margin-bottom: var(--space-4xl);
}

.form-intro .section-heading {
  margin-bottom: var(--space-md);
}

.form-intro .section-heading em {
  font-family: var(--font-accent);
  font-style: normal;
  font-weight: 400;
  color: var(--text-muted);
}

.form-card {
  max-width: 640px;
  margin: 0 auto;
  padding: var(--space-2xl);
}

.form-group {
  margin-bottom: var(--space-xl);
  position: relative;
}

.form-label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: var(--space-sm);
}

.form-label .required {
  color: var(--accent);
  margin-left: 2px;
}

.form-hint {
  display: block;
  font-size: 0.82rem;
  color: var(--text-soft);
  margin-bottom: var(--space-sm);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 14px 18px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  outline: none;
  transition: all 0.25s var(--ease-smooth);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-soft);
  opacity: 0.6;
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
  border-color: var(--line-strong);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
  background: #fff;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888882' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

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

/* File upload */
.form-upload {
  position: relative;
  border: 2px dashed var(--line);
  border-radius: 12px;
  padding: var(--space-xl);
  text-align: center;
  cursor: pointer;
  transition: all 0.25s var(--ease-smooth);
  background: var(--bg);
}

.form-upload:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.form-upload.dragover {
  border-color: var(--accent);
  background: var(--accent-light);
  transform: scale(1.01);
}

.form-upload input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-md);
  background: var(--accent-light);
  border-radius: 12px;
  color: var(--accent);
}

.upload-text {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.upload-text strong {
  color: var(--accent);
  font-weight: 600;
}

.upload-hint {
  font-size: 0.78rem;
  color: var(--text-soft);
  margin-top: var(--space-xs);
}

.upload-preview {
  display: none;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--accent-light);
  border-radius: 8px;
  margin-top: var(--space-md);
}

.upload-preview.active {
  display: flex;
}

.upload-preview-name {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-preview-size {
  font-size: 0.78rem;
  color: var(--text-soft);
  flex-shrink: 0;
}

.upload-remove {
  color: var(--text-soft);
  padding: 4px;
  cursor: pointer;
  transition: color 0.2s;
}

.upload-remove:hover {
  color: var(--negative);
}

/* Divider */
.form-divider {
  height: 1px;
  background: var(--line);
  margin: var(--space-xl) 0;
}

/* Submit */
.form-submit {
  width: 100%;
  padding: 18px 36px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--text);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s var(--ease-smooth);
}

.form-submit::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: translateY(100%);
  transition: transform 0.35s var(--ease-out);
}

.form-submit span {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.form-submit:hover::after {
  transform: translateY(0);
}

.form-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.form-submit:active {
  transform: translateY(0);
}

.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.form-submit:disabled::after {
  display: none;
}

/* Success state */
.form-success {
  display: none;
  text-align: center;
  padding: var(--space-3xl) var(--space-xl);
}

.form-success.active {
  display: block;
  animation: fadeUp 0.6s var(--ease-out);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-lg);
  background: var(--positive);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.success-heading {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.success-text {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
}

/* Error state */
.form-error {
  display: none;
  padding: var(--space-md) var(--space-lg);
  background: rgba(196, 80, 58, 0.08);
  border: 1px solid rgba(196, 80, 58, 0.2);
  border-radius: 10px;
  color: var(--negative);
  font-size: 0.9rem;
  margin-bottom: var(--space-lg);
}

.form-error.active {
  display: block;
  animation: fadeUp 0.3s var(--ease-out);
}

.field-error {
  font-size: 0.8rem;
  color: var(--negative);
  margin-top: var(--space-xs);
  display: none;
}

.form-group.has-error .form-input,
.form-group.has-error .form-select,
.form-group.has-error .form-textarea {
  border-color: var(--negative);
}

.form-group.has-error .field-error {
  display: block;
}

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--line);
  padding: var(--space-xl) 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.footer-links {
  display: flex;
  gap: var(--space-lg);
}

.footer-link {
  font-size: 0.82rem;
  color: var(--text-soft);
  transition: color 0.2s;
}

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

.footer-copy {
  font-size: 0.78rem;
  color: var(--text-soft);
  letter-spacing: 0.04em;
}

/* ═══════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════ */

@media (max-width: 900px) {
  .section-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .section-label {
    position: static;
  }

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

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

@media (max-width: 760px) {
  .shell { width: min(1120px, calc(100% - 40px)); }
  .shell--narrow { width: min(720px, calc(100% - 40px)); }
  .nav { padding: 0 20px; height: 64px; }

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

  .hiring-hero {
    min-height: 75dvh;
    padding-bottom: var(--space-3xl);
  }

  .values-header,
  .values-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .values-header-cell:last-child {
    border-radius: 0;
  }

  .values-row {
    margin-bottom: 0;
    border-bottom: 1px solid var(--line);
  }

  .values-cell--negative {
    border-left: 3px solid var(--text-soft);
  }

  .values-cell--positive {
    border-left: 3px solid var(--positive);
  }

  .form-card {
    padding: var(--space-lg);
    border-radius: 12px;
  }

  .footer {
    flex-direction: column;
    gap: var(--space-md);
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .hero-heading { font-size: 2.8rem; }

  .hero-cta {
    width: auto;
  }
}
