/* FEMINENCE Posture Analysis Tool - Based on Brand System */

/* ============================================
   Font Face Definitions (TWKLausanne)
   ============================================ */
@font-face {
  font-family: 'TWKLausanne';
  src: local('TWKLausanne-Light'),
       url('assets/TWKLausanne-200.woff2') format('woff2'),
       url('assets/TWKLausanne-200.woff') format('woff');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'TWKLausanne';
  src: local('TWKLausanne-Regular'),
       url('assets/TWKLausanne-400.woff2') format('woff2'),
       url('assets/TWKLausanne-400.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'TWKLausanne';
  src: local('TWKLausanne-Bold'),
       url('assets/TWKLausanne-700.woff2') format('woff2'),
       url('assets/TWKLausanne-700.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ============================================
   CSS Variables
   ============================================ */
:root {
  /* Primary Accent - Peach/Coral */
  --color-accent: #F5A68C;
  --color-accent-hover: #E8927A;
  --color-accent-light: #F7B8A2;

  /* Backgrounds */
  --color-bg-dark: #1A1A1A;
  --color-bg-warm: #F8F5F0;
  --color-bg-cream: #FCFBF8;
  --color-bg-white: #FFFFFF;

  /* Text */
  --color-text-dark: #1A1A1A;
  --color-text-light: #FFFFFF;
  --color-text-muted: #6B6B6B;

  /* Line Colors */
  --line-center: #F5A68C;
  --line-earlobes: #7DD3C0;
  --line-shoulders: #E8927A;
  --line-ribs: #9B8AC4;
  --line-hips: #5BA8D8;
  --line-knees: #D4A574;
  --line-feet: #8BC4A9;

  /* Deviation Colors */
  --deviation-good: #7DD3C0;
  --deviation-medium: #F5A68C;
  --deviation-high: #E85D5D;

  /* Layout */
  --page-width: 1200px;
  --spacing-section: 60px;
  --border-radius-pill: 50px;
  --border-radius-card: 12px;
}

/* ============================================
   Base Styles
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'TWKLausanne', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  color: var(--color-text-light);
  background-color: var(--color-bg-dark);
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

/* ============================================
   Typography
   ============================================ */
h1, .h1 {
  font-family: 'TWKLausanne', sans-serif;
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

h2, .h2 {
  font-family: 'TWKLausanne', sans-serif;
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
}

h3, .h3 {
  font-family: 'TWKLausanne', sans-serif;
  font-size: clamp(18px, 3vw, 28px);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 12px;
}

h4, .h4 {
  font-family: 'TWKLausanne', sans-serif;
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
}

/* ============================================
   Layout
   ============================================ */
.container {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 0 24px;
}

@media (min-width: 750px) {
  .container {
    padding: 0 50px;
  }
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 32px;
  font-family: 'TWKLausanne', sans-serif;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: var(--border-radius-pill);
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-text-dark);
}

.btn-primary:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: var(--color-bg-white);
  color: var(--color-text-dark);
}

.btn-secondary:hover {
  background-color: var(--color-bg-cream);
  transform: translateY(-2px);
}

.btn-ghost {
  background-color: transparent;
  color: var(--color-text-light);
  border: 1px solid var(--color-text-light);
}

.btn-ghost:hover {
  background-color: var(--color-text-light);
  color: var(--color-bg-dark);
}

.btn-full {
  width: 100%;
}

.btn-lg {
  padding: 20px 40px;
  font-size: 16px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-arrow {
  font-size: 16px;
}

/* ============================================
   Header
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  background-color: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(10px);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-light);
  opacity: 0.8;
  transition: all 0.3s ease;
}

.nav-link:hover {
  opacity: 1;
  color: var(--color-accent);
}

@media (max-width: 767px) {
  .nav-link {
    display: none;
  }
}

.logo-banner {
  height: 32px;
  width: auto;
}

.header-cta {
  display: none;
}

@media (min-width: 768px) {
  .header-cta {
    display: inline-flex;
  }
}

/* ============================================
   Tool Screens
   ============================================ */
.tool-main {
  padding-top: 80px;
  min-height: calc(100vh - 200px);
}

.tool-screen {
  display: none;
  padding: var(--spacing-section) 0;
}

.tool-screen.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   Tool Badge
   ============================================ */
.tool-badge {
  display: inline-block;
  padding: 8px 20px;
  background-color: var(--color-accent);
  color: var(--color-text-dark);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 24px;
  border-radius: var(--border-radius-pill);
}

/* ============================================
   Intro Screen
   ============================================ */
.tool-intro {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.tool-description {
  font-size: 18px;
  opacity: 0.8;
  margin-bottom: 40px;
}

.video-placeholder {
  margin-bottom: 40px;
}

.video-wrapper {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, rgba(245, 166, 140, 0.2) 0%, rgba(125, 211, 192, 0.2) 100%);
  border-radius: var(--border-radius-card);
  overflow: hidden;
}

.video-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.video-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background-color: var(--color-accent);
  color: var(--color-text-dark);
  font-size: 32px;
  border-radius: 50%;
}

.video-subtitle {
  font-size: 14px;
  opacity: 0.6;
  margin-top: 8px;
}

.instructions-box {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-card);
  padding: 32px;
  margin-bottom: 40px;
  text-align: left;
}

.instructions-box h3 {
  text-align: center;
  margin-bottom: 24px;
}

.instruction-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.instruction-step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background-color: var(--color-accent);
  color: var(--color-text-dark);
  font-weight: 700;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ============================================
   Upload Screen
   ============================================ */
.upload-section {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.section-description {
  font-size: 18px;
  opacity: 0.8;
  margin-bottom: 40px;
}

.upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  margin-bottom: 40px;
}

.upload-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-card);
  padding: 24px;
}

.upload-preview {
  aspect-ratio: 3/4;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
}

.upload-preview:hover {
  background: rgba(0, 0, 0, 0.4);
}

.upload-preview.has-image {
  background: transparent;
}

.upload-preview.has-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-placeholder {
  text-align: center;
}

.upload-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.upload-hint {
  font-size: 12px;
  opacity: 0.6;
}

.photo-tips {
  background: rgba(245, 166, 140, 0.1);
  border-left: 4px solid var(--color-accent);
  border-radius: 0 var(--border-radius-card) var(--border-radius-card) 0;
  padding: 24px;
  margin-bottom: 40px;
  text-align: left;
}

.photo-tips h4 {
  color: var(--color-accent);
  margin-bottom: 16px;
}

.photo-tips ul {
  margin-left: 20px;
}

.photo-tips li {
  margin-bottom: 8px;
  opacity: 0.8;
}

/* ============================================
   Analysis Screen
   ============================================ */
.analysis-section {
  max-width: 1100px;
  margin: 0 auto;
}

.analysis-header {
  text-align: center;
  margin-bottom: 40px;
}

.analysis-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

@media (min-width: 900px) {
  .analysis-grid {
    grid-template-columns: 300px 1fr;
  }
}

.reference-panel,
.analysis-panel {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-card);
  padding: 24px;
}

.reference-panel h4,
.analysis-panel h4 {
  text-align: center;
  margin-bottom: 20px;
  color: var(--color-accent);
}

.reference-image {
  margin-bottom: 20px;
}

.reference-image img {
  width: 100%;
  border-radius: 8px;
}

.line-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.legend-color {
  width: 24px;
  height: 4px;
  border-radius: 2px;
}

.side-explanation {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
  opacity: 0.8;
}

.side-explanation ul {
  margin-left: 20px;
  margin-top: 12px;
}

.side-explanation li {
  margin-bottom: 4px;
}

/* ============================================
   Photo Canvas with Lines
   ============================================ */
.photo-canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  overflow: hidden;
}

.photo-canvas img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.drag-hint {
  text-align: center;
  font-size: 14px;
  opacity: 0.6;
  margin-top: 16px;
}

/* ============================================
   Alignment Lines
   ============================================ */
.alignment-line {
  position: absolute;
  cursor: move;
  z-index: 10;
  transition: box-shadow 0.3s ease;
}

.alignment-line.vertical {
  top: 0;
  bottom: 0;
  width: 3px;
  left: 50%;
  transform: translateX(-50%);
}

.alignment-line.horizontal {
  left: 0;
  right: 0;
  height: 3px;
}

/* Line Colors */
.center-line {
  background-color: var(--line-center);
  box-shadow: 0 0 8px var(--line-center);
}

.earlobes-line {
  background-color: var(--line-earlobes);
  box-shadow: 0 0 6px var(--line-earlobes);
}

.shoulders-line {
  background-color: var(--line-shoulders);
  box-shadow: 0 0 6px var(--line-shoulders);
}

.ribs-line {
  background-color: var(--line-ribs);
  box-shadow: 0 0 6px var(--line-ribs);
}

.hips-line {
  background-color: var(--line-hips);
  box-shadow: 0 0 6px var(--line-hips);
}

.knees-line {
  background-color: var(--line-knees);
  box-shadow: 0 0 6px var(--line-knees);
}

.feet-line {
  background-color: var(--line-feet);
  box-shadow: 0 0 6px var(--line-feet);
}

/* Deviation Colors (for center lines) */
.alignment-line.deviation-low {
  box-shadow: 0 0 12px var(--deviation-good), 0 0 24px var(--deviation-good);
}

.alignment-line.deviation-medium {
  box-shadow: 0 0 12px var(--deviation-medium), 0 0 24px var(--deviation-medium);
}

.alignment-line.deviation-high {
  box-shadow: 0 0 12px var(--deviation-high), 0 0 24px var(--deviation-high);
}

/* Line Labels */
.line-label {
  position: absolute;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(0, 0, 0, 0.7);
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.vertical .line-label {
  top: 10px;
  left: 8px;
}

.horizontal .line-label {
  right: 10px;
  top: -24px;
}

/* Dragging State */
.alignment-line.dragging {
  opacity: 0.8;
  z-index: 20;
}

.alignment-line:hover {
  opacity: 0.9;
}

/* ============================================
   Results Screen
   ============================================ */
.results-section {
  text-align: center;
  max-width: 1000px;
  margin: 0 auto;
}

.results-photos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  margin: 40px 0;
}

.result-photo {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-card);
  padding: 24px;
}

.result-photo h4 {
  text-align: center;
  margin-bottom: 16px;
  color: var(--color-accent);
}

.result-canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  overflow: hidden;
}

.result-canvas img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.result-line {
  position: absolute;
}

.result-line.vertical {
  top: 0;
  bottom: 0;
  width: 3px;
  transform: translateX(-50%);
}

.result-line.horizontal {
  left: 0;
  right: 0;
  height: 3px;
}

/* ============================================
   Evaluation Section
   ============================================ */
.evaluation-section {
  text-align: left;
  margin: 60px 0;
}

.evaluation-section h3 {
  text-align: center;
  margin-bottom: 16px;
}

.evaluation-intro {
  text-align: center;
  opacity: 0.8;
  margin-bottom: 32px;
}

.evaluation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.evaluation-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-card);
  padding: 24px;
}

.evaluation-card h4 {
  color: var(--color-accent);
  margin-bottom: 8px;
}

.evaluation-card p {
  font-size: 14px;
  opacity: 0.8;
  margin-bottom: 16px;
}

.evaluation-status {
  display: flex;
  gap: 12px;
}

.status-btn {
  flex: 1;
  padding: 12px 16px;
  font-family: 'TWKLausanne', sans-serif;
  font-size: 13px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text-light);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.status-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.status-btn[data-status="good"].selected {
  background: var(--deviation-good);
  color: var(--color-text-dark);
  border-color: var(--deviation-good);
}

.status-btn[data-status="attention"].selected {
  background: var(--deviation-medium);
  color: var(--color-text-dark);
  border-color: var(--deviation-medium);
}

/* ============================================
   Next Steps Section
   ============================================ */
.next-steps-section {
  margin: 60px 0;
  text-align: center;
}

.next-steps-section h3 {
  margin-bottom: 16px;
}

.next-steps-section > p {
  opacity: 0.8;
  max-width: 600px;
  margin: 0 auto 32px;
}

.cta-box {
  background: linear-gradient(135deg, rgba(245, 166, 140, 0.2) 0%, rgba(125, 211, 192, 0.2) 100%);
  border: 1px solid var(--color-accent);
  border-radius: var(--border-radius-card);
  padding: 40px;
  margin-bottom: 40px;
}

.cta-box h4 {
  font-size: 24px;
  margin-bottom: 12px;
}

.cta-box p {
  opacity: 0.8;
  margin-bottom: 24px;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  background-color: var(--color-bg-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 40px 0;
}

.footer-bottom {
  text-align: center;
}

.copy {
  font-size: 14px;
  opacity: 0.6;
  margin-bottom: 8px;
}

.footer-company {
  font-size: 12px;
  opacity: 0.4;
  margin-bottom: 16px;
}

.footer-links {
  font-size: 14px;
}

.footer-links a {
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.footer-links a:hover {
  opacity: 1;
  color: var(--color-accent);
}

.separator {
  margin: 0 12px;
  opacity: 0.4;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 767px) {
  .tool-main {
    padding-top: 70px;
  }

  .instruction-steps {
    grid-template-columns: 1fr;
  }

  .evaluation-status {
    flex-direction: column;
  }

  .line-label {
    font-size: 9px;
    padding: 3px 6px;
  }

  .horizontal .line-label {
    top: -20px;
  }
}
