/* ==========================================================================
   KALISTO — Main CSS
   Variables, reset, typography, layout utilities, buttons
   ========================================================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,600;0,9..144,700;1,9..144,300;1,9..144,400&family=Inter:wght@300;400;500;600&display=swap');

/* ==========================================================================
   DESIGN TOKENS
   ========================================================================== */

:root {
  /* Brand Colors */
  --color-dark:       #1a0a14;
  --color-primary:    #5D2243;
  --color-mid:        #8a3560;
  --color-accent:     #c9956b;
  --color-off-white:  #f5f2ee;
  --color-text:       #1a1a1a;
  --color-white:      #ffffff;
  --color-muted:      #6b6260;
  --color-border:     #e0dbd7;

  /* Typography */
  --font-heading: 'Fraunces', Georgia, serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;

  /* Type Scale (fluid) */
  --text-xs:   clamp(0.75rem,  1.5vw, 0.8rem);
  --text-sm:   clamp(0.875rem, 2vw,   0.95rem);
  --text-base: clamp(1rem,     2.5vw, 1.0625rem);
  --text-lg:   clamp(1.125rem, 3vw,   1.25rem);
  --text-xl:   clamp(1.25rem,  3.5vw, 1.5rem);
  --text-2xl:  clamp(1.5rem,   4vw,   2rem);
  --text-3xl:  clamp(1.875rem, 5vw,   2.75rem);
  --text-4xl:  clamp(2.25rem,  6vw,   3.5rem);
  --text-5xl:  clamp(2.75rem,  7vw,   4.5rem);

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Layout */
  --container-max: 1200px;
  --container-wide: 1440px;
  --section-pad-y:  clamp(4rem, 8vw, 7rem);

  /* Effects */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --shadow-sm:  0 1px 3px rgba(26,10,20,0.08);
  --shadow-md:  0 4px 16px rgba(26,10,20,0.12);
  --shadow-lg:  0 12px 40px rgba(26,10,20,0.18);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   RESET
   ========================================================================== */

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul, ol { list-style: none; }

button, input, textarea, select {
  font: inherit;
  border: none;
  background: none;
}

button { cursor: pointer; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

/* ==========================================================================
   LAYOUT UTILITIES
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 2.5rem);
}

.container--wide {
  max-width: var(--container-wide);
}

.section {
  padding-block: var(--section-pad-y);
}

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

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

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

/* Grid helpers */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}

.grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-6);
}

@media (max-width: 1024px) {
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-5, .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .grid-5, .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .spec-table {
    width: 100%;
    table-layout: fixed;
  }

  .spec-table th,
  .spec-table td {
    padding: var(--space-2);
    font-size: 0.72rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }
}

/* Flex helpers */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* Text helpers */
.text-center { text-align: center; }
.text-muted { color: var(--color-muted); }
.text-accent { color: var(--color-accent); }
.text-primary { color: var(--color-primary); }

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}

.eyebrow--light {
  color: rgba(201,149,107,0.85);
}

h1, .h1 {
  font-size: var(--text-5xl);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

h2, .h2 {
  font-size: var(--text-3xl);
  font-weight: 400;
  line-height: 1.15;
}

h3, .h3 {
  font-size: var(--text-xl);
  font-weight: 400;
  line-height: 1.25;
}

h4, .h4 {
  font-size: var(--text-lg);
  font-weight: 500;
  font-family: var(--font-body);
}

.lead {
  font-size: var(--text-lg);
  line-height: 1.7;
  color: var(--color-muted);
}

.lead--light {
  color: rgba(255,255,255,0.7);
}

/* Section header pattern */
.section-header {
  margin-bottom: var(--space-16);
}

.section-header--center {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: var(--space-16);
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.875rem 2rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
  border: 2px solid var(--color-primary);
}

.btn-primary:hover {
  background: var(--color-mid);
  border-color: var(--color-mid);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(93,34,67,0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--color-white);
  border: 2px solid rgba(255,255,255,0.4);
}

.btn-ghost:hover {
  border-color: var(--color-white);
  background: rgba(255,255,255,0.08);
}

.btn-ghost--dark {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-ghost--dark:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-accent {
  background: var(--color-accent);
  color: var(--color-dark);
  border: 2px solid var(--color-accent);
}

.btn-accent:hover {
  background: #b87d54;
  border-color: #b87d54;
  transform: translateY(-1px);
}

.btn--lg {
  padding: 1.125rem 2.5rem;
  font-size: var(--text-base);
}

.btn--sm {
  padding: 0.625rem 1.25rem;
  font-size: var(--text-xs);
}

/* Arrow button variant */
.btn-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  transition: gap var(--transition);
}

.btn-arrow:hover { gap: var(--space-4); }

.btn-arrow::after {
  content: '→';
  display: inline-block;
  transition: transform var(--transition);
}

.btn-arrow:hover::after { transform: translateX(4px); }

/* CTA group */
.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
}

/* ==========================================================================
   DIVIDER / SEPARATOR
   ========================================================================== */

.divider {
  width: 48px;
  height: 3px;
  background: var(--color-accent);
  border-radius: 2px;
  margin-bottom: var(--space-8);
}

.divider--center { margin-inline: auto; }

/* ==========================================================================
   BREADCRUMB
   ========================================================================== */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-muted);
  padding-block: var(--space-6);
  letter-spacing: 0.03em;
}

.breadcrumb a {
  color: var(--color-muted);
  transition: color var(--transition);
}

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

.breadcrumb__sep { color: var(--color-border); }

/* ==========================================================================
   SPEC TABLE
   ========================================================================== */

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.spec-table th,
.spec-table td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.spec-table th {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  background: var(--color-off-white);
}

.spec-table tr:last-child td { border-bottom: none; }

.spec-table tbody tr:hover td { background: #faf8f5; }

/* ==========================================================================
   RESPONSIVE UTILITIES
   ========================================================================== */

@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
  .section { padding-block: clamp(3rem, 6vw, 4rem); }
  .section-header { margin-bottom: var(--space-12); }
  .section-header--center { margin-bottom: var(--space-12); }
  .cta-group { flex-direction: column; align-items: flex-start; }
}

@media (min-width: 769px) {
  .hide-desktop { display: none !important; }
}
