/* ============================================================
   BASE.CSS — Kolkowsky GmbH
   CSS variables, resets, typography, global rules
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

/* ── CSS Custom Properties ─────────────────────────────── */
:root {
  --color-bg:           #f7f7f5;
  --color-bg-dark:      #111827;
  --color-bg-mid:       #1e2a3a;
  --color-text:         #1a1a1a;
  --color-text-muted:   #4a5568;
  --color-accent:       #2563a8;
  --color-accent-hover: #1d4ed8;
  --color-border:       #e2e8f0;
  --color-white:        #ffffff;
  --color-surface:      #ffffff;
  --color-surface-2:    #f0f0ee;

  --radius-btn:  8px;
  --radius-card: 12px;
  --radius-lg:   20px;

  --font-heading: 'Barlow Condensed', sans-serif;
  --font-body:    'DM Sans', sans-serif;

  --shadow-card:  0 4px 24px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 40px rgba(0,0,0,0.15);
  --shadow-nav:   0 2px 20px rgba(0,0,0,0.10);

  --transition: 0.25s ease;

  --max-width: 1200px;
  --section-padding: clamp(3rem, 6vw, 6rem) clamp(1.25rem, 4vw, 2.5rem);
}

* {
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  -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, select, textarea {
  font: inherit;
}

/* ── Typography ─────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: var(--color-text);
}

h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.9rem); }
h4 { font-size: clamp(1.1rem, 2vw, 1.4rem); }

p {
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  color: var(--color-text-muted);
  line-height: 1.75;
}

/* ── Containers ─────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

section {
  padding: var(--section-padding);
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-btn);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform var(--transition), box-shadow var(--transition), background-color var(--transition), color var(--transition), border-color var(--transition);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.btn:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-white);
  box-shadow: 0 2px 12px rgba(37,99,168,0.35);
}

.btn-primary:hover {
  background-color: var(--color-accent-hover);
  transform: scale(1.03);
  box-shadow: 0 4px 20px rgba(37,99,168,0.45);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-white);
  border-color: rgba(255,255,255,0.75);
}

.btn-secondary:hover {
  background-color: rgba(255,255,255,0.12);
  border-color: var(--color-white);
  transform: scale(1.03);
}

.btn-secondary-dark {
  background-color: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.btn-secondary-dark:hover {
  background-color: var(--color-accent);
  color: var(--color-white);
  transform: scale(1.03);
  box-shadow: 0 4px 20px rgba(37,99,168,0.35);
}

/* ── Section Labels ─────────────────────────────────────── */
.section-label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.6rem;
}

.section-title {
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: clamp(1rem, 1.5vw, 1.1rem);
  color: var(--color-text-muted);
  max-width: 560px;
  line-height: 1.7;
}

/* ── Utilities ──────────────────────────────────────────── */
.text-center { text-align: center; }
.text-white  { color: var(--color-white); }

/* ── Scroll Animation Base ──────────────────────────────── */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Page Hero (shared) ─────────────────────────────────── */
.page-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.page-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.1s linear;
}

.page-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(17,24,39,0.55) 0%,
    rgba(17,24,39,0.70) 100%
  );
}

.page-hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 4rem clamp(1.25rem, 4vw, 2.5rem);
  max-width: var(--max-width);
  margin: 0 auto;
}

.page-hero__eyebrow {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  margin-bottom: 0.75rem;
}

.page-hero__title {
  color: var(--color-white);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

/* ── Form Elements ──────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.form-group label {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--color-text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-white);
  color: var(--color-text);
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(37,99,168,0.15);
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
  border-color: #e53e3e;
  box-shadow: 0 0 0 3px rgba(229,62,62,0.12);
}

.form-error-msg {
  font-size: 0.8rem;
  color: #e53e3e;
  display: none;
}

.form-error-msg.visible {
  display: block;
}

/* ── Success States ─────────────────────────────────────── */
.success-box {
  display: none;
  background: #f0fdf4;
  border: 1.5px solid #68d391;
  border-radius: var(--radius-card);
  padding: 2rem;
  text-align: center;
  gap: 0.75rem;
  flex-direction: column;
  align-items: center;
}

.success-box.visible {
  display: flex;
}

.success-box svg {
  color: #38a169;
}

.success-box h3 {
  color: #276749;
  font-size: 1.4rem;
}

.success-box p {
  color: #2f855a;
  font-size: 0.95rem;
}

/* ── Toast ──────────────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--color-bg-dark);
  color: var(--color-white);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-btn);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

#toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ── Stars ──────────────────────────────────────────────── */
.stars {
  color: #f59e0b;
  font-size: 1rem;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
}

/* ── Responsive grid helpers ────────────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

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

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

/* ── Divider ────────────────────────────────────────────── */
.section-divider {
  width: 48px;
  height: 4px;
  background: var(--color-accent);
  border-radius: 2px;
  margin: 0.75rem 0 1.5rem;
}

.section-divider.center {
  margin: 0.75rem auto 1.5rem;
}
