/* SEAMUN I Chair Application — sister site to seamun.com */
:root {
  --apple-blue: #007aff;
  --apple-blue-hover: #0077ed;
  --label-primary: #1d1d1f;
  --label-secondary: #6e6e73;
  --label-tertiary: #aeaeb2;
  --separator: rgba(60, 60, 67, 0.29);
  --separator-opaque: #d1d1d6;
  --bg-grouped: #f2f2f7;
  --bg-elevated: #ffffff;
  --fill-tertiary: rgba(118, 118, 128, 0.12);
  --danger: #ff3b30;
  --success: #34c759;

  --bg: var(--bg-grouped);
  --text: var(--label-primary);
  --text-muted: var(--label-secondary);
  --border: var(--separator);
  --primary: var(--apple-blue);
  --primary-hover: var(--apple-blue-hover);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Inter, system-ui, sans-serif;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-pill: 980px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 8px 28px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.04);
  --ease-out: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-fluid: cubic-bezier(0.33, 1, 0.68, 1);
  --header-height: 3.5rem;
  --content-max: min(92vw, 42rem);
}

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

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

body {
  font-family: var(--font);
  color: var(--text);
  line-height: 1.65;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  min-height: 100vh;
  min-height: 100dvh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 55% at 50% -12%, rgba(0, 122, 255, 0.07), transparent 55%),
    linear-gradient(180deg, #f5f5f7 0%, var(--bg-grouped) 100%);
}

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

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

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

.container {
  width: min(92vw, 72rem);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: inherit;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.logo:hover {
  color: inherit;
}

.logo-image {
  width: 1.75rem;
  height: 1.75rem;
  object-fit: contain;
}

.logo-text {
  font-size: 0.95rem;
}

.header-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
}

.header-links a:not(.btn) {
  color: var(--text-muted);
}

.header-links a:not(.btn):hover {
  color: var(--text);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background-color 0.25s var(--ease-out), color 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}

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

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

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  color: #fff;
}

.btn-secondary {
  background: var(--fill-tertiary);
  color: var(--text);
  border-color: transparent;
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(118, 118, 128, 0.2);
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover:not(:disabled) {
  color: var(--text);
  background: var(--fill-tertiary);
}

.btn-header {
  min-height: 2.1rem;
  padding: 0.35rem 0.95rem;
  font-size: 0.8125rem;
  background: var(--primary);
  color: #fff;
}

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

/* Hero */
.hero {
  padding: clamp(2.25rem, 5vw, 3.75rem) 0 clamp(1.5rem, 3vw, 2rem);
}

.hero-panel {
  width: min(92vw, 42rem);
  margin-inline: auto;
  background: var(--bg-elevated);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-md);
  padding: clamp(1.75rem, 4vw, 2.5rem);
  animation: rise-in 0.55s var(--ease-fluid) both;
}

.hero-badge {
  display: inline-block;
  font-size: 0.8125rem;
  color: var(--primary);
  font-weight: 560;
  margin-bottom: 0.65rem;
  letter-spacing: -0.01em;
}

.hero-brand {
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin-bottom: 0.35rem;
}

.hero-title {
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 0.85rem;
}

.hero-lead {
  color: var(--text-muted);
  font-size: 0.975rem;
  margin-bottom: 1.15rem;
}

.hero-lead strong {
  color: var(--text);
  font-weight: 600;
}

.hero-meta {
  display: grid;
  gap: 0.65rem;
  margin-top: 1.25rem;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.meta-item {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.meta-item strong {
  display: block;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 0.1rem;
}

/* Progress */
.progress-wrap {
  width: min(92vw, 42rem);
  margin: 0 auto 1.25rem;
  animation: rise-in 0.5s var(--ease-fluid) 0.08s both;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.progress-track {
  height: 4px;
  border-radius: var(--radius-pill);
  background: rgba(118, 118, 128, 0.18);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--primary);
  border-radius: inherit;
  transition: width 0.35s var(--ease-fluid);
}

.draft-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.draft-status {
  font-size: 0.8125rem;
  color: var(--text-muted);
  min-height: 1.2em;
}

.draft-status.is-saved {
  color: var(--success);
}

.draft-status.is-restored {
  color: var(--primary);
}

.draft-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.btn-compact {
  min-height: 2.1rem;
  padding: 0.35rem 0.95rem;
  font-size: 0.8125rem;
}

/* Form shell */
.form-shell {
  width: min(92vw, 42rem);
  margin: 0 auto clamp(3rem, 6vw, 4.5rem);
  animation: rise-in 0.55s var(--ease-fluid) 0.12s both;
}

.step {
  display: none;
  background: var(--bg-elevated);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-md);
  padding: clamp(1.35rem, 3vw, 1.85rem);
}

.step.is-active {
  display: block;
  animation: step-in 0.35s var(--ease-fluid);
}

.step-heading {
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: -0.025em;
  margin-bottom: 0.35rem;
}

.step-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.35rem;
}

.step-desc a {
  font-weight: 500;
}

.field-stack {
  display: grid;
  gap: 1.15rem;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field label,
.field-label {
  font-size: 0.9rem;
  font-weight: 560;
  letter-spacing: -0.015em;
}

.field label .req,
.field-label .req {
  color: var(--danger);
  margin-left: 0.15rem;
}

.hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.hint ul {
  margin: 0.45rem 0 0 1.1rem;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="date"],
input[type="time"],
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--separator-opaque);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 0.9375rem;
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}

textarea {
  min-height: 7.5rem;
  resize: vertical;
  line-height: 1.5;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.18);
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea,
.choice-group.has-error {
  border-color: var(--danger);
}

.error-text {
  display: none;
  color: var(--danger);
  font-size: 0.8rem;
}

.field.has-error .error-text,
.choice-group.has-error + .error-text,
.choice-group.has-error .error-text {
  display: block;
}

.choice-group {
  display: grid;
  gap: 0.45rem;
  padding: 0.15rem;
  border-radius: var(--radius-md);
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--separator-opaque);
  border-radius: var(--radius-md);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s var(--ease-out), background-color 0.2s var(--ease-out);
}

.choice:hover {
  border-color: rgba(0, 122, 255, 0.35);
}

.choice:has(input:checked) {
  border-color: var(--primary);
  background: rgba(0, 122, 255, 0.05);
}

.choice input {
  margin-top: 0.2rem;
  accent-color: var(--primary);
}

.choice span {
  font-size: 0.9rem;
}

.choice-other {
  display: none;
  margin-top: 0.35rem;
}

.choice:has(input[data-other]:checked) + .choice-other,
.languages-other.is-visible {
  display: block;
}

.notice {
  background: rgba(0, 122, 255, 0.06);
  border: 1px solid rgba(0, 122, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 1rem 1.05rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.notice strong {
  color: var(--text);
}

.notice ul {
  margin: 0.55rem 0 0.55rem 1.1rem;
}

.committee-bands {
  display: grid;
  gap: 0.75rem;
  margin: 0.35rem 0 0.5rem;
}

.band {
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-lg);
  padding: 0.9rem 1rem;
  background: #fafafa;
}

.band h4 {
  font-size: 0.875rem;
  letter-spacing: -0.015em;
  margin-bottom: 0.35rem;
}

.band p {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.pref-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .pref-grid {
    grid-template-columns: 1fr 1fr;
  }

  .pref-grid .field:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

.step-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.step-actions .btn {
  min-width: 7.5rem;
}

.form-status {
  margin-top: 0.85rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.form-status.is-error {
  color: var(--danger);
}

.form-status.is-success {
  color: var(--success);
}

/* Success panel */
.success-panel {
  text-align: left;
}

.success-panel .step-heading {
  color: var(--text);
}

.check-mark {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(52, 199, 89, 0.12);
  color: var(--success);
  font-size: 1.25rem;
  margin-bottom: 0.85rem;
}

/* Footer */
.site-footer {
  padding: 2rem 0 2.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.footer-logo {
  width: 2rem;
  height: 2rem;
  margin: 0 auto 0.55rem;
  object-fit: contain;
}

.footer-tagline {
  font-weight: 560;
  color: var(--text);
  margin-bottom: 0.25rem;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes step-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 520px) {
  .header-links .hide-sm {
    display: none;
  }

  .step-actions {
    flex-direction: column-reverse;
  }

  .step-actions .btn {
    width: 100%;
  }
}
