/* =========================================================
   FairChair — Light Theme (Tesla-inspired)

   BACKGROUNDS
   --fc-bg-base:       #ffffff
   --fc-bg-surface:    #f4f4f4
   --fc-bg-elevated:   #e8e8e8
   --fc-border:        #e0e0e0

   BRAND BLUE
   --fc-blue:          #3b82f6   primary
   --fc-blue-hover:    #2563eb   hover

   TYPOGRAPHY
   --fc-text-primary:  #171a20   headings  (Tesla near-black)
   --fc-text-secondary:#393c41   body
   --fc-text-muted:    #5c5e62   captions

   STATUS
   --fc-green:         #22c55e
   --fc-red:           #ef4444
   --fc-orange-status: #f97316
   ========================================================= */

:root {
  --fc-bg-base:        #ffffff;
  --fc-bg-surface:     #f4f4f4;
  --fc-bg-elevated:    #e8e8e8;
  --fc-border:         #e0e0e0;

  --fc-blue:           #1a56a8;
  --fc-blue-hover:     #154290;

  /* kept for backward compat with older classes */
  --fc-orange-600:     #3b82f6;
  --fc-orange-500:     #2563eb;
  --fc-orange-300:     #93c5fd;
  --fc-orange-100:     #eff6ff;

  --fc-text-primary:   #171a20;
  --fc-text-secondary: #393c41;
  --fc-text-muted:     #5c5e62;

  --fc-green:          #22c55e;
  --fc-red:            #ef4444;
  --fc-orange-status:  #f97316;

  --fc-radius:         12px;
  --fc-radius-lg:      20px;
  --fc-transition:     0.2s ease;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; }

body {
  background-color: var(--fc-bg-base);
  color: var(--fc-text-secondary);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3 { color: var(--fc-text-primary); line-height: 1.15; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 1.05rem; font-weight: 600; }

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

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ================================================================
   NAVBAR  — transparent over hero, white on scroll / other pages
   ================================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  box-shadow: 0 1px 0 var(--fc-border);
}

.navbar--solid { /* kept for compat */ }

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 2rem;
}

.navbar__logo img {
  height: 40px;
  width: auto;
}

.navbar__brand {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 1.5rem;
  color: #000000;
  text-decoration: none;
  letter-spacing: -0.01em;
  line-height: 1;
  text-transform: uppercase;
}
.brand-fair  { font-weight: 700; }
.brand-chair { font-weight: 400; }
.navbar__brand:hover { opacity: 0.7; color: #000000; }

.navbar__nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.navbar__nav a {
  color: var(--fc-text-primary);
  font-size: 0.88rem;
  font-weight: 500;
  transition: color var(--fc-transition);
}

.navbar__nav a:hover { opacity: 0.7; }

/* ================================================================
   HERO — full-bleed image (Tesla style)
   ================================================================ */
.hero-fullbleed {
  position: relative;
  width: 100%;
  height: 60vh;
  min-height: 320px;
  overflow: hidden;
}

.hero-fullbleed__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}

.hero-fullbleed__logo {
  position: absolute;
  bottom: 2rem;
  left: 2.5rem;
  height: 112px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.92;
  z-index: 3;
}

@media (max-width: 640px) {
  .hero-fullbleed__logo { display: none; }
}

/* Subtle gradient so bottom text is always readable */
.hero-fullbleed::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.08) 0%,
    transparent       35%,
    rgba(0,0,0,0.15) 65%,
    rgba(0,0,0,0.50) 100%
  );
  pointer-events: none;
}

.hero-fullbleed__content {
  position: absolute;
  bottom: 8%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  width: 100%;
  padding: 0 2rem;
  z-index: 2;
}

.hero-fullbleed__content h1 {
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
  margin-bottom: 0.6rem;
}

.hero-fullbleed__content p {
  color: rgba(255,255,255,0.88);
  font-size: 1.15rem;
  margin-bottom: 2rem;
  text-shadow: 0 1px 6px rgba(0,0,0,0.3);
}

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--fc-radius);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all var(--fc-transition);
  border: none;
  text-decoration: none;
}

.btn--primary {
  background: var(--fc-blue);
  color: #fff;
  border: 1px solid transparent;
}
.btn--primary:hover { background: var(--fc-blue-hover); color: #fff; transform: translateY(-1px); }

.btn--ghost {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.btn--ghost:hover { background: rgba(255,255,255,0.25); color: #fff; }

/* Dark ghost (for non-hero sections) */
.btn--ghost-dark {
  background: transparent;
  color: var(--fc-text-primary);
  border: 1px solid var(--fc-border);
}
.btn--ghost-dark:hover { border-color: var(--fc-blue); color: var(--fc-blue); }

.hero__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}


/* ================================================================
   SECTION SHARED
   ================================================================ */
.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}
.section-header p {
  max-width: 520px;
  margin: 0.75rem auto 0;
  color: var(--fc-text-muted);
  font-size: 1.05rem;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.status-card {
  background: var(--fc-bg-base);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform var(--fc-transition), box-shadow var(--fc-transition);
}

.status-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}

.status-card__icon {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 0.5rem 0.25rem;
}

.status-card__icon svg { width: 100%; max-width: 160px; height: auto; }

.status-card--green  { border-top: 3px solid var(--fc-green); }
.status-card--red    { border-top: 3px solid var(--fc-red); }
.status-card--orange { border-top: 3px solid var(--fc-orange-status); }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
}

.status-badge--green  { background: rgba(34,197,94,0.12);  color: #15803d; }
.status-badge--red    { background: rgba(239,68,68,0.12);  color: #b91c1c; }
.status-badge--orange { background: rgba(249,115,22,0.12); color: #c2410c; }

/* ================================================================
   RULES ROW (main page)
   ================================================================ */
.how-it-works { padding: 4rem 0; background: var(--fc-bg-base); }


.rules-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.rules-row__item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.rules-row__img {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 12px;
}

.rules-row__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  transition: transform 0.4s ease;
}

.rules-row__item:hover .rules-row__img img { transform: scale(1.05); }

.rules-row__num {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fc-text-muted);
}

.rules-row__text {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--fc-text-primary);
  line-height: 1.45;
  margin: 0;
}

.rules-more-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--fc-blue);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--fc-transition), opacity var(--fc-transition);
}
.rules-more-link:hover { border-bottom-color: var(--fc-blue); opacity: 0.8; color: var(--fc-blue); }

@media (max-width: 640px) {
  .rules-row { grid-template-columns: repeat(2, 1fr); gap: 0.875rem; }
  .how-it-works { padding: 2.5rem 0; }
}

/* ================================================================
   PHOTO / GALLERY SECTION
   ================================================================ */
.photo-section {
  padding: 6rem 0;
  background: var(--fc-bg-surface);
}

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

.device-photo {
  border-radius: var(--fc-radius-lg);
  overflow: hidden;
  background: var(--fc-bg-base);
  border: 1px solid var(--fc-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1.5rem 1.75rem;
  gap: 0;
}

.device-photo img { width: 100%; height: auto; display: block; border-radius: 10px; }
.device-photo__badge { margin-top: 1.1rem; white-space: nowrap; }

.device-photo__title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  align-self: center;
}
.device-photo__title--green  { color: #15803d; }
.device-photo__title--red    { color: #b91c1c; }
.device-photo__title--orange { color: #e07000; }

.device-features {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-top: 2.5rem;
}

.device-feature {
  background: var(--fc-bg-base);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius-lg);
  padding: 1.5rem 1.25rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: box-shadow var(--fc-transition), transform var(--fc-transition);
}

.device-feature:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.07);
  transform: translateY(-2px);
}

.device-feature__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(59,130,246,0.09);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fc-blue);
  flex-shrink: 0;
  margin-bottom: 0.25rem;
}

.device-feature__icon svg {
  width: 20px;
  height: 20px;
}

.device-feature strong {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--fc-text-primary);
  line-height: 1.3;
}

.device-feature p {
  font-size: 0.79rem;
  color: var(--fc-text-muted);
  line-height: 1.55;
  margin: 0;
}

@media (max-width: 900px) {
  .device-features { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  .device-features { grid-template-columns: repeat(2, 1fr); }
  .device-features .device-feature:nth-child(4) { display: none; }
}

/* ================================================================
   CONTACT SECTION
   ================================================================ */
.contact-section {
  padding: 6rem 0;
  background: var(--fc-bg-base);
  text-align: center;
}

.contact-section p {
  margin-top: 0.75rem;
  color: var(--fc-text-muted);
}

/* ================================================================
   FOOTER  — dark (Tesla style)
   ================================================================ */
footer {
  margin-top: auto;
  background: #ffffff;
  border-top: 1px solid var(--fc-border);
  padding: 1rem 1.5rem;
}

.footer__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer__brand img {
  height: 28px;
  width: auto;
}

.footer__brand-name {
  font-weight: 700;
  color: var(--fc-text-primary);
  font-size: 0.95rem;
}

.footer__copy {
  font-size: 0.78rem;
  color: var(--fc-text-muted);
}

.footer__legal {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer__legal a {
  font-size: 0.8rem;
  color: var(--fc-text-muted);
  transition: color var(--fc-transition);
}

.footer__legal a:hover { color: var(--fc-text-primary); }

/* ================================================================
   LEGAL PAGES
   ================================================================ */
.legal-layout {
  display: flex;
  gap: 4rem;
  max-width: 960px;
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
  align-items: flex-start;
}

.legal-sidebar {
  flex-shrink: 0;
  width: 180px;
  position: sticky;
  top: 6rem;
}

.legal-sidebar img { width: 100%; height: auto; display: block; margin: 0; }

.legal-page { flex: 1; min-width: 0; }
.legal-page h1 { margin-bottom: 2rem; }
.legal-page h3 { margin: 2rem 0 0.5rem; color: var(--fc-text-primary); }
.legal-page p, .legal-page address {
  color: var(--fc-text-secondary);
  font-style: normal;
  line-height: 1.8;
}

/* ================================================================
   RULES / HOW IT WORKS PAGE
   ================================================================ */
.rules-section {
  padding-bottom: 6rem;
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
  margin-top: 3rem;
}

.rule-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius-lg);
  overflow: hidden;
  background: var(--fc-bg-base);
  transition: box-shadow var(--fc-transition);
}

.rule-card:hover { box-shadow: 0 8px 28px rgba(0,0,0,0.08); }

.rule-label {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fc-blue);
  padding: 1.1rem 1.5rem 0.6rem;
}

.rule-img {
  width: 100%;
  height: auto;
  display: block;
  cursor: zoom-in;
  transition: opacity var(--fc-transition);
}

.rule-img:hover { opacity: 0.92; }

.rule-text {
  padding: 1rem 1.5rem 1.5rem;
  color: var(--fc-text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ================================================================
   LIGHTBOX
   ================================================================ */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox.open { display: flex; }

.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox__close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity var(--fc-transition);
}

.lightbox__close:hover { opacity: 1; }

@media (max-width: 640px) {
  .rules-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* ================================================================
   CONTACT MODAL
   ================================================================ */
.contact-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.52);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.contact-modal.open { display: flex; }

.contact-modal__card {
  background: #ffffff;
  border-radius: 24px;
  padding: 2.5rem;
  width: 100%;
  max-width: 480px;
  position: relative;
  box-shadow: 0 32px 80px rgba(0,0,0,0.22);
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.contact-modal__close {
  position: absolute;
  top: 1rem;
  right: 1.1rem;
  background: none;
  border: none;
  font-size: 1.7rem;
  line-height: 1;
  color: var(--fc-text-muted);
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: 8px;
  transition: color var(--fc-transition), background var(--fc-transition);
}
.contact-modal__close:hover { color: var(--fc-text-primary); background: var(--fc-bg-surface); }

.contact-modal__title { font-size: 1.5rem; margin-bottom: 0.3rem; }
.contact-modal__sub   { color: var(--fc-text-muted); font-size: 0.88rem; margin-bottom: 1.75rem; }

.cf-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}
.cf-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--fc-text-primary);
}
.cf-group input,
.cf-group textarea {
  border: 1px solid var(--fc-border);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--fc-text-primary);
  background: var(--fc-bg-surface);
  outline: none;
  resize: vertical;
  transition: border-color var(--fc-transition), box-shadow var(--fc-transition), background var(--fc-transition);
}
.cf-group input:focus,
.cf-group textarea:focus {
  border-color: var(--fc-blue);
  box-shadow: 0 0 0 3px rgba(26,86,168,0.1);
  background: #fff;
}

.cf-submit {
  width: 100%;
  justify-content: center;
  margin-top: 0.5rem;
  font-size: 0.95rem;
}

.cf-success {
  display: none;
  align-items: center;
  gap: 0.9rem;
  background: rgba(34,197,94,0.07);
  border: 1px solid rgba(34,197,94,0.25);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  margin-top: 1rem;
}
.cf-success svg   { width: 28px; height: 28px; color: #15803d; flex-shrink: 0; }
.cf-success strong { display: block; color: #15803d; font-size: 0.95rem; }
.cf-success p     { color: var(--fc-text-muted); font-size: 0.82rem; margin: 0.15rem 0 0; }

.cf-error {
  display: none;
  font-size: 0.83rem;
  color: #b91c1c;
  background: rgba(239,68,68,0.07);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-top: 0.75rem;
}
.cf-error a { color: #b91c1c; text-decoration: underline; }

@media (max-width: 640px) {
  .contact-modal__card { padding: 1.75rem 1.25rem; border-radius: 18px; max-height: 90vh; overflow-y: auto; }
}

/* ================================================================
   LANGUAGE TOGGLE (hidden, placeholder)
   ================================================================ */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--fc-bg-elevated);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius);
  padding: 0.2rem;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--fc-text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--fc-transition);
  font-family: inherit;
}

.lang-btn:hover { color: var(--fc-text-primary); }
.lang-btn.active { background: var(--fc-blue); color: #fff; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
/* ================================================================
   HAMBURGER MENU
   ================================================================ */
.navbar__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.navbar__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--fc-text-primary);
  border-radius: 2px;
  transition: all 0.25s ease;
  transform-origin: center;
}

.navbar__hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar__hamburger.open span:nth-child(2) { opacity: 0; }
.navbar__hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.navbar__mobile {
  display: none;
  flex-direction: column;
  background: #ffffff;
  border-top: 1px solid var(--fc-border);
  padding: 0.5rem 1.5rem 1rem;
}

.navbar__mobile.open { display: flex; }

.navbar__mobile-link {
  color: var(--fc-text-primary);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--fc-border);
  text-decoration: none;
}

.navbar__mobile-link:last-child { border-bottom: none; }
.navbar__mobile-link:hover { color: var(--fc-text-muted); }

@media (max-width: 640px) {
  .navbar__nav { display: none; }
  .navbar__hamburger { display: flex; }
  .footer__inner { flex-direction: column; text-align: center; }
  .footer__legal { justify-content: center; flex-wrap: wrap; gap: 0.4rem 0.9rem; }
  .footer__legal a { font-size: 0.78rem; white-space: nowrap; }
  .legal-layout { flex-direction: column; gap: 2rem; }
  .legal-sidebar { position: static; width: 140px; }
  .hero-fullbleed__content { top: 8%; bottom: 8%; display: flex; flex-direction: column; align-items: center; }
  .hero__actions { margin-top: auto; flex-wrap: nowrap; gap: 0.6rem; }
  .hero__actions .btn { padding: 0.65rem 1.1rem; font-size: 0.82rem; }
}
