/* Plepic Design System
   Swiss Style + Broken Grid
   Based on design doc: docs/plans/2026-01-03-plepic-homepage-design.md
*/

/* ========================================
   CSS Custom Properties (Design Tokens)
   ======================================== */

:root {
  /* Colors */
  --color-brand: #00674f;
  --color-bg: #f5f3ee;
  --color-white: #ffffff;
  --color-black: #1a1a1a;
  --color-body: #444;
  --color-secondary: #666;
  --color-border: #e0e0e0;

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-logo: 'DM Serif Display', Georgia, serif;

  /* Type Scale (1.25 ratio from 14px base) */
  --text-xs: 0.8rem;      /* ~11px */
  --text-sm: 0.875rem;    /* ~12px */
  --text-base: 1rem;      /* 14px */
  --text-lg: 1.25rem;     /* ~18px */
  --text-xl: 1.5rem;      /* ~21px */
  --text-2xl: 1.875rem;   /* ~26px */
  --text-3xl: 2.25rem;    /* ~32px */
  --text-4xl: 3rem;       /* ~42px */
  --text-5xl: 4rem;       /* ~56px */
  --text-display: 5.5rem; /* ~77px - for large numbers */

  /* Spacing (8px base unit) */
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 1rem;     /* 16px */
  --space-4: 1.5rem;   /* 24px */
  --space-5: 2rem;     /* 32px */
  --space-6: 3rem;     /* 48px */
  --space-section: 5rem; /* 80px */

  /* Grid */
  --grid-max-width: 1200px;
  --grid-gutter: 1.5rem; /* 24px */
  --grid-columns: 12;

  /* Header */
  --header-height: 70px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
}

/* ========================================
   Reset & Base
   ======================================== */

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

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-body);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-brand);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

/* ========================================
   Typography
   ======================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-black);
}

h1 { font-size: var(--text-4xl); font-weight: 800; }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }

p {
  margin-bottom: var(--space-3);
}

p:last-child {
  margin-bottom: 0;
}

/* Label style - Swiss uppercase */
.label {
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-secondary);
}

/* Large display numbers */
.stat-number {
  font-family: var(--font-body);
  font-size: var(--text-display);
  font-weight: 700;
  line-height: 1;
  color: var(--color-brand);
  font-variant-numeric: tabular-nums;
}

/* ========================================
   Layout
   ======================================== */

.container {
  width: 100%;
  max-width: var(--grid-max-width);
  margin: 0 auto;
  padding: 0 var(--grid-gutter);
}

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

/* 12-column grid */
.grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-columns), 1fr);
  gap: var(--grid-gutter);
}

/* Common column spans */
.col-span-4 { grid-column: span 4; }
.col-span-5 { grid-column: span 5; }
.col-span-6 { grid-column: span 6; }
.col-span-7 { grid-column: span 7; }
.col-span-8 { grid-column: span 8; }
.col-span-12 { grid-column: span 12; }

/* Column offsets for broken grid */
.col-start-2 { grid-column-start: 2; }
.col-start-3 { grid-column-start: 3; }

/* ========================================
   Components
   ======================================== */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background-color: var(--color-brand);
  color: var(--color-white);
}

.btn-primary:hover {
  background-color: #005540;
  color: var(--color-white);
}

/* Cards */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  padding: var(--space-5);
}

.card-elevated {
  box-shadow: var(--shadow-md);
  border: none;
}

/* ========================================
   Header
   ======================================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(245, 243, 238, 0.95);
  backdrop-filter: blur(8px);
  z-index: 100;
  transition: box-shadow var(--transition-base);
}

.header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--grid-max-width);
  margin: 0 auto;
  padding: 0 var(--grid-gutter);
}

.logo {
  font-family: var(--font-logo);
  font-size: var(--text-3xl);
  color: var(--color-brand);
  letter-spacing: -0.5px;
}

.nav {
  display: flex;
  gap: var(--space-5);
}

.nav a {
  color: var(--color-body);
  font-weight: 500;
}

.nav a:hover {
  color: var(--color-brand);
}

/* ========================================
   Section: Hero
   ======================================== */

.hero {
  position: relative;
  padding-top: calc(var(--header-height) + var(--space-section));
  padding-bottom: var(--space-section);
  background: var(--color-bg);
  overflow: hidden;
}

.hero-content {
  max-width: 700px; /* ~7 columns of 12 */
}

.hero h1 {
  color: var(--color-brand);
  margin-bottom: var(--space-5);
  line-height: 1.1;
}

.tagline {
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-secondary);
  margin-bottom: var(--space-3);
}

/* Accent bar at hero bottom - connects to training section */
.hero-accent {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 8px;
  background: var(--color-brand);
}

@media (max-width: 768px) {
  .hero-content {
    max-width: 100%;
  }
}

/* ========================================
   Section: Training Highlight
   ======================================== */

.training-highlight {
  background: var(--color-brand);
  color: var(--color-white);
}

.training-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  align-items: start;
}

.training-content {
  padding-right: var(--space-5);
}

.training-highlight .label {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--space-2);
}

.training-highlight h2 {
  color: var(--color-white);
  margin-bottom: var(--space-4);
}

.training-highlight p {
  opacity: 0.9;
  line-height: 1.6;
}

.training-pricing {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-5);
  padding: var(--space-3) var(--space-4);
  background: rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
}

.pricing-highlight {
  font-weight: 700;
}

.pricing-arrow {
  opacity: 0.6;
}

.pricing-final {
  font-size: var(--text-lg);
  font-weight: 700;
}

.pricing-final small {
  font-size: var(--text-sm);
  font-weight: 400;
  opacity: 0.8;
}

.training-link {
  display: inline-block;
  margin-top: var(--space-4);
  color: var(--color-white);
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  padding-bottom: 2px;
}

.training-link:hover {
  color: var(--color-white);
  border-bottom-color: var(--color-white);
}

.training-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.stat-item {
  text-align: center;
}

.training-highlight .stat-number {
  display: block;
  color: var(--color-white);
  font-size: var(--text-5xl);
  font-weight: 700;
  line-height: 1;
  margin-bottom: var(--space-1);
}

.training-highlight .stat-label {
  font-size: var(--text-sm);
  opacity: 0.8;
}

@media (max-width: 768px) {
  .training-grid {
    grid-template-columns: 1fr;
  }

  .training-content {
    padding-right: 0;
  }

  .training-stats {
    margin-top: var(--space-5);
  }

  .training-highlight .stat-number {
    font-size: var(--text-4xl);
  }
}

/* ========================================
   Section: Client Logos
   ======================================== */

.client-logos {
  background: var(--color-white);
  padding: var(--space-6) 0;
}

.logo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-5);
}

.logo-row .company-logo {
  height: 28px;
  width: auto;
  color: var(--color-text);
  opacity: 0.6;
  transition: opacity var(--transition-fast);
}

.logo-row .company-logo:hover {
  opacity: 1;
}

/* Aktiva logo needs more height due to subtext */
.logo-row .company-logo[aria-label="Aktiva"] {
  height: 48px;
}

/* ========================================
   Section: Stats
   ======================================== */

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

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-6);
  align-items: center;
}

.stats-numbers {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.stat-block {
  display: flex;
  flex-direction: column;
}

.stats-section .stat-number {
  font-size: var(--text-display);
  margin-bottom: var(--space-1);
}

.stats-section .stat-label {
  font-size: var(--text-sm);
  color: var(--color-secondary);
}

.stats-note {
  padding-left: var(--space-6);
  border-left: 2px solid var(--color-brand);
}

.stats-note p {
  font-size: var(--text-lg);
  color: var(--color-body);
  font-style: italic;
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }

  .stats-numbers {
    flex-direction: row;
    justify-content: space-around;
  }

  .stats-section .stat-number {
    font-size: var(--text-5xl);
  }

  .stats-note {
    padding-left: var(--space-4);
  }
}

/* ========================================
   Section: Team
   ======================================== */

.team-section {
  background: var(--color-white);
}

.team-section h2 {
  text-align: center;
  margin-bottom: var(--space-6);
}

.team-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.team-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  grid-template-rows: auto auto;
  gap: var(--space-5);
  align-items: start;
  padding: var(--space-5) 0;
  position: relative;
}

/* Full-width background for team cards */
.team-card::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  background: var(--color-bg);
  z-index: -1;
}

.team-card-right {
  grid-template-columns: 1fr 280px;
}

/* Team logos row - spans full width */
.team-logos {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

.team-logos img {
  height: 24px;
  width: auto;
  opacity: 0.6;
  filter: grayscale(100%);
  transition: opacity var(--transition-fast), filter var(--transition-fast);
}

.team-logos img:hover {
  opacity: 1;
  filter: grayscale(0%);
}

.team-photo {
  position: relative;
}

.team-photo img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  filter: grayscale(100%);
}

.team-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.team-card .name {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-black);
  margin: 0;
}

.team-card .title {
  color: var(--color-secondary);
  margin-bottom: var(--space-2);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-bottom: var(--space-2);
}

.badge {
  display: inline-block;
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  background: var(--color-white);
  border: 1px solid var(--color-border);
}

.skills {
  font-weight: 500;
  color: var(--color-body);
}

.tagline-text {
  font-size: var(--text-sm);
  color: var(--color-secondary);
  font-style: italic;
}

/* Timeline */
.timeline {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-3);
}

.timeline-year {
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--color-brand);
}

.timeline-line {
  flex: 1;
  height: 2px;
  background: var(--color-border);
  max-width: 60px;
}

/* Book divider */
.book-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-4) 0;
}

.book-divider img {
  max-width: 180px;
  transform: rotate(2deg);
  box-shadow: var(--shadow-md);
}

.book-caption {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-secondary);
  font-style: italic;
}

@media (max-width: 768px) {
  .team-card {
    grid-template-columns: 1fr;
  }

  .team-card-right {
    grid-template-columns: 1fr;
  }

  .team-card-right .team-photo {
    order: -1;
  }

  .team-photo img {
    max-width: 200px;
  }

  .timeline {
    flex-wrap: wrap;
  }

  .book-divider img {
    max-width: 140px;
  }
}

/* ========================================
   Footer
   ======================================== */

.footer {
  background: var(--color-black);
  color: var(--color-white);
  padding: var(--space-section) 0 var(--space-5);
}

.footer h2 {
  color: var(--color-white);
  margin-bottom: var(--space-4);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}

.footer a {
  color: var(--color-white);
}

.footer a:hover {
  color: var(--color-brand);
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.contact-links a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.contact-links svg {
  flex-shrink: 0;
}

.footer-company {
  text-align: right;
}

.company-name {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.company-address {
  color: var(--color-secondary);
  margin-bottom: var(--space-1);
}

.company-legal {
  font-size: var(--text-sm);
  color: var(--color-secondary);
}

.footer-bottom {
  padding-top: var(--space-5);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-secondary);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }

  .footer-company {
    text-align: left;
  }

  .contact-links {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* ========================================
   Training Page
   ======================================== */

/* Remove double padding at hero/training-details transition */
.hero + .training-details {
  padding-top: 0;
}

.training-details {
  background: var(--color-white);
}

.training-details h2 {
  margin-bottom: var(--space-3);
}

.feature-list {
  list-style: none;
  padding: 0;
}

.feature-list li {
  padding-left: var(--space-5);
  position: relative;
  margin-bottom: var(--space-2);
}

.feature-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--color-brand);
}

.curriculum {
  background: var(--color-bg);
}

.curriculum h2 {
  margin-bottom: var(--space-5);
}

.week-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.week-item {
  flex: 1;
  min-width: 150px;
  background: var(--color-white);
  padding: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.week-num {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-brand);
}

.week-title {
  color: var(--color-body);
}

.week-final {
  background: #e8f5e9;
}

.week-final .week-title {
  font-weight: 600;
}

.pricing-section {
  background: var(--color-brand);
  color: var(--color-white);
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-6);
  align-items: center;
}

.price-breakdown {
  background: rgba(255, 255, 255, 0.1);
  padding: var(--space-4);
  margin-top: var(--space-4);
}

.price-line {
  display: flex;
  justify-content: space-between;
  padding: var(--space-2) 0;
}

.price-line.savings {
  color: #90ee90;
}

.price-line.final {
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  font-weight: 700;
}

.price-amount {
  font-size: var(--text-xl);
}

.strikethrough {
  text-decoration: line-through;
  opacity: 0.7;
}

.price-note {
  margin-top: var(--space-3);
  opacity: 0.8;
  font-size: var(--text-sm);
}

.registration {
  text-align: center;
}

.registration img {
  width: 150px;
  height: 150px;
  margin-bottom: var(--space-3);
}

.registration .limited {
  background: rgba(255, 255, 255, 0.2);
  padding: var(--space-2) var(--space-3);
  margin-top: var(--space-3);
  font-size: var(--text-sm);
}

.instructors {
  background: var(--color-white);
}

.instructor-grid {
  display: flex;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.instructor {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.instructor-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(100%);
  border: 2px solid var(--color-brand);
}

.instructor-info h3 {
  color: var(--color-brand);
  margin-bottom: var(--space-1);
}

.instructor-info p {
  color: var(--color-secondary);
  line-height: 1.4;
}

.coauthors {
  font-style: italic;
}

@media (max-width: 768px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .price-breakdown {
    text-align: left;
  }

  .instructor-grid {
    flex-direction: column;
  }
}

/* ========================================
   Utilities
   ======================================== */

.text-brand { color: var(--color-brand); }
.text-white { color: var(--color-white); }
.text-secondary { color: var(--color-secondary); }

.bg-brand { background-color: var(--color-brand); }
.bg-white { background-color: var(--color-white); }
.bg-cream { background-color: var(--color-bg); }

.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }

.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-brand);
  color: var(--color-white);
  padding: var(--space-2) var(--space-3);
  z-index: 1000;
}

.skip-link:focus {
  top: 0;
}

/* ========================================
   Responsive
   ======================================== */

/* Tablet (768px) */
@media (max-width: 768px) {
  :root {
    --space-section: 3rem; /* 48px */
  }

  html {
    font-size: 14px;
  }

  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }

  .grid {
    grid-template-columns: repeat(8, 1fr);
    --grid-columns: 8;
  }

  .col-span-4,
  .col-span-5,
  .col-span-6,
  .col-span-7,
  .col-span-8 {
    grid-column: span 8;
  }

  .nav {
    display: none; /* Mobile menu needed */
  }

  .stat-number {
    font-size: var(--text-5xl);
  }
}

/* Mobile (480px) */
@media (max-width: 480px) {
  .grid {
    grid-template-columns: 1fr;
    --grid-columns: 1;
  }

  .col-span-4,
  .col-span-5,
  .col-span-6,
  .col-span-7,
  .col-span-8,
  .col-span-12 {
    grid-column: span 1;
  }

  .col-start-2,
  .col-start-3 {
    grid-column-start: 1;
  }

  .logo-row {
    flex-direction: column;
    gap: var(--space-4);
  }

  .timeline {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ========================================
   Print
   ======================================== */

@media print {
  .header {
    position: static;
  }

  .hero {
    padding-top: var(--space-section);
  }
}
