/* Floa — Hackathon Registration SPA */

:root {
  --floa-blue: #009FFF;
  --floa-blue-dark: #007ACC;
  --text-primary: #292929;
  --text-muted: #525252;
  --bg-page: #FFFFFF;
  --bg-section: #F7F7F7;
  --border: #DCDCDC;
  --footer-bg: #292929;
  --error: #C0392B;
  --success: #1E7E34;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  --radius: 4px;
  --max-content: 1200px;
  --max-form: 720px;
  --header-height: 88px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-page);
}

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

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

a:hover {
  text-decoration: underline;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--bg-page);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}

.site-header__inner {
  width: 100%;
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header__logo img {
  height: 56px;
  width: auto;
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-header__nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
}

.site-header__nav a:hover {
  color: var(--floa-blue);
  text-decoration: none;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  border: 2px solid transparent;
  border-radius: 9999px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  text-decoration: none;
}

.btn--sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn:focus-visible {
  outline: 2px solid var(--floa-blue);
  outline-offset: 2px;
}

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

.btn--primary:hover {
  background: var(--floa-blue-dark);
  border-color: var(--floa-blue-dark);
  text-decoration: none;
  color: #fff;
}

.btn--secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border);
  border-radius: 9999px;
}

.btn--secondary:hover {
  border-color: var(--text-muted);
  background: var(--bg-section);
}

.btn--ghost {
  background: transparent;
  color: var(--floa-blue);
  border-color: transparent;
  padding: 8px 12px;
  border-radius: var(--radius);
}

.btn--ghost:hover {
  background: var(--bg-section);
}

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

/* Views */

.view {
  display: none;
}

.view--active {
  display: block;
}

/* Landing */

.hero {
  background: var(--bg-section);
  padding: 80px 24px;
  border-bottom: 1px solid var(--border);
}

.hero__inner {
  max-width: var(--max-content);
  margin: 0 auto;
}

.hero__label {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--floa-blue);
  margin-bottom: 16px;
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(32px, 3.5vw, 48px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  max-width: 800px;
}

.hero__vision {
  margin: 0 0 32px;
  padding: 20px 24px;
  border-left: 4px solid var(--floa-blue);
  background: var(--bg-page);
  font-size: 18px;
  font-style: italic;
  font-weight: 500;
  color: var(--text-primary);
  max-width: 720px;
  line-height: 1.5;
}

.hero__lead {
  margin: 0 0 32px;
  font-size: 16px;
  color: var(--text-muted);
  max-width: 640px;
}

.hero__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}

.fact-card {
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.fact-card__value {
  display: block;
  font-size: 20px;
  font-weight: 600;
  color: var(--floa-blue);
  margin-bottom: 4px;
}

.fact-card__label {
  font-size: 13px;
  color: var(--text-muted);
}

.section {
  padding: 64px 24px;
}

.section--alt {
  background: var(--bg-section);
}

.section__inner {
  max-width: var(--max-content);
  margin: 0 auto;
}

.section h2 {
  margin: 0 0 12px;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.section__intro {
  margin: 0 0 32px;
  font-size: 16px;
  color: var(--text-muted);
  max-width: 720px;
}

.section__note {
  margin: 24px 0 0;
  font-size: 14px;
  color: var(--text-muted);
  font-style: italic;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.info-grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.info-grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.info-card {
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.section--alt .info-card {
  background: var(--bg-page);
}

.info-card__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--floa-blue);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border-radius: 50%;
  margin-bottom: 12px;
}

.info-card__tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--floa-blue);
  margin-bottom: 8px;
}

.info-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
}

.info-card p {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
}

.info-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
}

.info-card ul li {
  padding-left: 14px;
  position: relative;
  margin-bottom: 6px;
}

.info-card ul li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--floa-blue);
  font-size: 11px;
}

/* Phase breadcrumb */

.phase-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
}

.phase-breadcrumb__item {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  background: var(--bg-page);
}

.phase-breadcrumb__sep {
  color: var(--border);
  font-size: 12px;
}

/* Timeline */

.timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.timeline__item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  background: var(--bg-page);
}

.section--alt .timeline__item {
  background: var(--bg-page);
}

.timeline__meta {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.timeline__day {
  color: var(--floa-blue);
}

.timeline__slot {
  color: var(--text-muted);
}

.timeline__title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
}

.timeline__copy {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.cta-section {
  text-align: center;
  padding: 64px 24px;
  border-top: 1px solid var(--border);
}

.cta-section h2 {
  margin: 0 0 12px;
  font-size: 32px;
  font-weight: 600;
}

.cta-section p {
  margin: 0 0 24px;
  font-size: 16px;
  color: var(--text-muted);
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.cta-section .cta-group {
  justify-content: center;
}

/* Demo mode controls (footer) */
.demo-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 20px;
  opacity: 0.35;
  font-family: "Courier New", Courier, monospace;
  font-size: 11px;
  transition: opacity 0.2s;
}

.demo-controls:not([hidden]) {
  opacity: 0.45;
}

.demo-controls:hover {
  opacity: 0.65;
}

.demo-toggle {
  display: inline-flex;
  align-items: center;
  margin-top: 0;
  cursor: pointer;
  opacity: 1;
}

.demo-exe {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: rgba(112, 255, 112, 0.55);
  cursor: pointer;
  text-shadow: 0 0 6px rgba(57, 255, 20, 0.25);
  transition: color 0.2s, text-shadow 0.2s;
}

.demo-exe:hover {
  color: rgba(112, 255, 112, 0.9);
  text-shadow: 0 0 10px rgba(57, 255, 20, 0.45);
}

.demo-exe:focus-visible {
  outline: 2px solid rgba(57, 255, 20, 0.5);
  outline-offset: 2px;
}

.demo-progress {
  color: rgba(112, 255, 112, 0.5);
  letter-spacing: 0.02em;
  min-height: 1em;
}

.demo-progress:empty {
  display: none;
}

.demo-hint {
  flex: 1 1 100%;
  color: rgba(112, 255, 112, 0.45);
  font-style: italic;
  animation: demoHintFade 3s ease-out forwards;
}

@keyframes demoHintFade {
  0%, 70% { opacity: 1; }
  100% { opacity: 0; }
}

.demo-toggle:hover {
  opacity: 1;
}

.demo-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.demo-toggle__track {
  display: block;
  width: 36px;
  height: 20px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
  position: relative;
  transition: background 0.2s;
}

.demo-toggle__track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}

.demo-toggle input:checked + .demo-toggle__track {
  background: rgba(57, 255, 20, 0.25);
}

.demo-toggle input:checked + .demo-toggle__track::after {
  transform: translateX(16px);
  background: rgba(57, 255, 20, 0.7);
}

.demo-toggle input:focus-visible + .demo-toggle__track {
  outline: 2px solid rgba(255, 255, 255, 0.4);
  outline-offset: 2px;
}

/* Wizard */

.wizard {
  padding: 40px 24px 80px;
}

.wizard__inner {
  max-width: var(--max-form);
  margin: 0 auto;
}

.wizard__header {
  margin-bottom: 32px;
}

.wizard__back {
  margin-bottom: 16px;
}

.wizard__title {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 600;
}

.wizard__subtitle {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

/* Progress */

.progress {
  margin-bottom: 32px;
}

.progress__bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress__fill {
  height: 100%;
  background: var(--floa-blue);
  border-radius: 2px;
  transition: width 0.3s ease;
  width: 25%;
}

.progress__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Form */

.form-panel {
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.form-step {
  display: none;
}

.form-step--active {
  display: block;
}

.form-group {
  margin-bottom: 28px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label,
.form-group .form-label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
}

.form-group .form-help {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--floa-blue);
  box-shadow: 0 0 0 3px rgba(0, 159, 255, 0.15);
}

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

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23525252' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.radio-group,
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radio-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.radio-option:hover {
  border-color: var(--floa-blue);
  background: rgba(0, 159, 255, 0.04);
}

.radio-option input[type="radio"] {
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--floa-blue);
}

.radio-option span {
  font-size: 14px;
  line-height: 1.5;
}

.radio-option:has(input:checked) {
  border-color: var(--floa-blue);
  background: rgba(0, 159, 255, 0.06);
}

/* Rating scale (Q12 / Q16) */

.rating-scale {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 16px 0 12px;
  position: relative;
}

.rating-scale::before {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  top: 50%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  transform: translateY(-50%);
  z-index: 0;
}

.rating-scale__btn {
  flex: 1;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

.rating-scale__dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg-page);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  transition: transform 0.15s ease, border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
}

.rating-scale__btn:hover .rating-scale__dot {
  border-color: var(--floa-blue);
  transform: scale(1.08);
}

.rating-scale__btn:focus-visible .rating-scale__dot {
  outline: 2px solid var(--floa-blue);
  outline-offset: 2px;
}

.rating-scale__btn--selected .rating-scale__dot {
  background: var(--floa-blue);
  border-color: var(--floa-blue);
  color: #fff;
  transform: scale(1.12);
  box-shadow: 0 4px 12px rgba(0, 159, 255, 0.35);
}

.rating-scale__label {
  min-height: 48px;
  margin: 0;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  background: rgba(0, 159, 255, 0.06);
  border: 1px solid rgba(0, 159, 255, 0.2);
  border-radius: var(--radius);
  line-height: 1.45;
  transition: opacity 0.2s;
}

.rating-scale__label:empty {
  opacity: 0;
  min-height: 0;
  padding: 0;
  border: none;
  background: none;
}

.rating-scale__hint {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 8px;
}

.form-group--error .rating-scale__dot {
  border-color: var(--error);
}

.form-error {
  display: none;
  margin-top: 6px;
  font-size: 13px;
  color: var(--error);
}

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

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

.form-group--hidden {
  display: none;
}

.form-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  gap: 16px;
}

.form-nav__right {
  display: flex;
  gap: 12px;
  margin-left: auto;
}

/* Alert boxes */

.alert {
  padding: 16px 20px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  font-size: 14px;
}

.alert--warning {
  background: #FFF8E6;
  border: 1px solid #E8D48B;
  color: #6B5A1E;
}

.alert--error {
  background: #FDEDEC;
  border: 1px solid #F5C6CB;
  color: var(--error);
}

.alert--success {
  background: #E8F5E9;
  border: 1px solid #A5D6A7;
  color: var(--success);
}

/* Result views */

.result-view {
  padding: 80px 24px;
  text-align: center;
}

.result-view__inner {
  max-width: 560px;
  margin: 0 auto;
}

.result-view__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.result-view__icon--success {
  background: rgba(0, 159, 255, 0.12);
  color: var(--floa-blue);
}

.result-view h1 {
  margin: 0 0 16px;
  font-size: 28px;
  font-weight: 600;
}

.result-view p {
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 16px;
}

.result-view .btn {
  margin-top: 32px;
}

/* Footer */

.site-footer {
  background: var(--footer-bg);
  color: rgba(255, 255, 255, 0.85);
  padding: 40px 24px;
  font-size: 13px;
  line-height: 1.7;
}

.site-footer__inner {
  max-width: var(--max-content);
  margin: 0 auto;
}

.site-footer__logo {
  margin-bottom: 20px;
}

.site-footer__logo img {
  height: 40px;
}

.site-footer p {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.7);
}

.site-footer__legal {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

/* Utility */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden-form {
  display: none;
}

@media (max-width: 600px) {
  .site-header__logo img {
    height: 48px;
  }

  .site-header__nav a:not(.btn) {
    display: none;
  }

  .hero {
    padding: 48px 20px;
  }

  .section {
    padding: 48px 20px;
  }

  .form-panel {
    padding: 20px;
  }

  .rating-scale__dot {
    width: 34px;
    height: 34px;
    font-size: 13px;
  }

  .rating-scale::before {
    left: 17px;
    right: 17px;
  }

  .form-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .form-nav__right {
    margin-left: 0;
    flex-direction: column;
  }

  .form-nav .btn {
    width: 100%;
  }
}
