/* ============================================================
   KESIT — Design System & Global Styles
   Arka Plan Silme Aracı
   ============================================================ */

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

/* --- Design Tokens --- */
:root {
  /* Colors */
  --ink: #1A1A2E;
  --ink-light: #2D2D44;
  --paper: #F5F0EB;
  --paper-warm: #EDE7E0;
  --blade: #C1272D;
  --blade-hover: #D94148;
  --blade-soft: #F2A3A6;
  --moss: #2D6A4F;
  --moss-light: #40916C;
  --slate: #6C757D;
  --slate-light: #ADB5BD;
  --surface: #FFFFFF;
  --surface-elevated: #FAFAFA;
  --border: #E0DAD4;
  --border-light: #EDE7E0;
  --overlay: rgba(26, 26, 46, 0.6);
  --shadow-sm: 0 1px 3px rgba(26, 26, 46, 0.08);
  --shadow-md: 0 4px 12px rgba(26, 26, 46, 0.1);
  --shadow-lg: 0 8px 32px rgba(26, 26, 46, 0.12);
  --shadow-blade: 0 4px 20px rgba(193, 39, 45, 0.25);

  /* Typography */
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;

  /* Radius — intentional variation */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 600ms;

  /* Layout */
  --container-max: 1120px;
  --header-height: 72px;
}

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

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: var(--blade);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

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

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  background: none;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
  color: var(--ink);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
}

h4 {
  font-size: 1.1rem;
  font-family: var(--font-body);
  font-weight: 600;
}

p {
  max-width: 65ch;
}

.text-slate {
  color: var(--slate);
}

.text-small {
  font-size: 0.875rem;
}

/* --- Layout Utilities --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

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

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

/* --- Header --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(245, 240, 235, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  z-index: 100;
  transition: background var(--duration-normal) var(--ease-out);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  color: var(--ink);
}

.logo-mark {
  width: 36px;
  height: 36px;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  list-style: none;
}

.nav-links a {
  color: var(--ink-light);
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--blade);
  transition: width var(--duration-normal) var(--ease-out);
}

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

.nav-links a:hover::after {
  width: 100%;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-sm);
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: all var(--duration-normal) var(--ease-out);
}

/* --- Hero Section --- */
.hero {
  padding-top: calc(var(--header-height) + var(--space-3xl));
  padding-bottom: var(--space-2xl);
  text-align: center;
}

.hero-content {
  max-width: 680px;
  margin: 0 auto var(--space-2xl);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--slate);
  margin-bottom: var(--space-lg);
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--moss);
  animation: pulse-dot 2s ease infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.hero h1 {
  margin-bottom: var(--space-md);
}

.hero h1 .accent {
  color: var(--blade);
  position: relative;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--slate);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Hero Demo Area */
.hero-demo {
  position: relative;
  max-width: 440px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--surface);
}

.hero-demo-canvas-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: repeating-conic-gradient(#e8e2dc 0% 25%, #f5f0eb 0% 50%) 0 0 / 20px 20px;
}

.hero-demo canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-demo-label {
  position: absolute;
  bottom: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  padding: var(--space-xs) var(--space-md);
  background: var(--ink);
  color: var(--surface);
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  opacity: 0.9;
  z-index: 4;
  pointer-events: none;
}

/* Reveal slider for demo */
.demo-reveal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: ew-resize;
  z-index: 5;
}

.demo-reveal-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--surface);
  box-shadow: 0 0 12px rgba(0,0,0,0.4);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.demo-reveal-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  background: var(--surface);
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  font-size: 0.8rem;
  color: var(--slate);
  font-weight: 700;
  letter-spacing: 1px;
  border: 2px solid rgba(255,255,255,0.8);
}

/* --- Upload Zone --- */
.tool-section {
  padding: var(--space-xl) 0 var(--space-3xl);
}

.tool-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  max-width: 800px;
  margin: 0 auto;
}

.tool-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.tool-main > * {
  width: 100%;
  max-width: 800px;
}

.upload-zone {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-3xl) var(--space-xl);
  text-align: center;
  background: var(--surface);
  transition: all var(--duration-normal) var(--ease-out);
  cursor: pointer;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--blade);
  background: rgba(193, 39, 45, 0.03);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.upload-zone.drag-over {
  border-style: solid;
}

.upload-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-lg);
  color: var(--slate-light);
  transition: color var(--duration-normal) var(--ease-out);
}

.upload-zone:hover .upload-icon {
  color: var(--blade);
}

.upload-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: var(--space-sm);
}

.upload-desc {
  color: var(--slate);
  font-size: 0.9rem;
  margin-bottom: var(--space-lg);
}

.upload-formats {
  display: inline-flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  justify-content: center;
}

.format-tag {
  padding: 2px 10px;
  background: var(--paper);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.upload-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* --- Processing State --- */
.processing-area {
  display: none;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
}

.processing-area.active {
  display: block;
}

.processing-preview {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: var(--space-lg);
  background: repeating-conic-gradient(#e8e2dc 0% 25%, #f5f0eb 0% 50%) 0 0 / 20px 20px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.processing-preview img,
.processing-preview canvas {
  max-height: 500px;
  object-fit: contain;
  width: 100%;
}

/* Progress bar */
.progress-wrap {
  margin-bottom: var(--space-lg);
}

.progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
  font-size: 0.875rem;
  font-weight: 500;
}

.progress-bar {
  height: 6px;
  background: var(--paper-warm);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--blade);
  border-radius: var(--radius-full);
  width: 0%;
  transition: width var(--duration-normal) var(--ease-out);
}

.progress-bar-fill.indeterminate {
  width: 30%;
  animation: indeterminate 1.5s ease-in-out infinite;
}

@keyframes indeterminate {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(400%); }
}

/* --- Result Area --- */
.result-area {
  display: none;
}

.result-area.active {
  display: block;
}

.result-comparison {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: repeating-conic-gradient(#e8e2dc 0% 25%, #f5f0eb 0% 50%) 0 0 / 20px 20px;
  margin-bottom: var(--space-lg);
  box-shadow: var(--shadow-md);
}

.result-comparison canvas {
  display: block;
  width: 100%;
}

/* Before/After Slider */
.comparison-slider {
  position: relative;
  overflow: hidden;
  cursor: ew-resize;
  user-select: none;
  border-radius: var(--radius-lg);
  background: repeating-conic-gradient(#e8e2dc 0% 25%, #f5f0eb 0% 50%) 0 0 / 20px 20px;
  margin: 0 auto var(--space-lg);
  box-shadow: var(--shadow-md);
  max-width: 100%;
}

.comparison-slider canvas {
  display: block;
  width: 100%;
  height: 100%;
}

#result-after {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#before-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}

#result-before {
  width: 100%;
  height: 100%;
}

.slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: var(--surface);
  z-index: 5;
  transform: translateX(-50%);
  box-shadow: 0 0 12px rgba(0,0,0,0.3);
}

.slider-handle::after {
  content: '⟺';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background: var(--surface);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  font-size: 1rem;
  color: var(--slate);
  font-weight: 700;
  border: 2px solid rgba(255,255,255,0.8);
}

.slider-handle::after {
  content: '⟺';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background: var(--surface);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  font-size: 1rem;
  color: var(--slate);
}

.comparison-labels {
  display: flex;
  justify-content: space-between;
  position: absolute;
  bottom: var(--space-md);
  left: var(--space-md);
  right: var(--space-md);
  z-index: 4;
  pointer-events: none;
}

.comparison-label {
  padding: var(--space-xs) var(--space-md);
  background: var(--ink);
  color: var(--surface);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Result actions */
.result-actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 14px 28px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all var(--duration-normal) var(--ease-out);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--blade);
  color: var(--surface);
  box-shadow: var(--shadow-blade);
}

.btn-primary:hover {
  background: var(--blade-hover);
  color: var(--surface);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(193, 39, 45, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1.5px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--ink);
  color: var(--ink);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-ghost {
  color: var(--ink);
  padding: 14px 16px;
}

.btn-ghost:hover {
  background: rgba(26, 26, 46, 0.05);
  color: var(--ink);
}

.btn-icon {
  width: 20px;
  height: 20px;
}

/* --- How It Works Section --- */
.how-section {
  background: var(--surface);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.how-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.how-header p {
  color: var(--slate);
  margin: var(--space-sm) auto 0;
  font-size: 1.05rem;
}

.how-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

.how-step {
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
}

.step-number {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--blade);
}

.step-content h3 {
  margin-bottom: var(--space-xs);
}

.step-content p {
  color: var(--slate);
  font-size: 0.95rem;
}

/* --- FAQ / Accordion --- */
.faq-section {
  padding: var(--space-3xl) 0;
}

.faq-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border-light);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease-out);
}

.faq-question:hover {
  color: var(--blade);
}

.faq-chevron {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform var(--duration-normal) var(--ease-out);
  color: var(--slate);
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--duration-slow) var(--ease-out), padding var(--duration-slow) var(--ease-out);
}

.faq-item.open .faq-answer {
  max-height: 300px;
}

.faq-answer-inner {
  padding-bottom: var(--space-lg);
  color: var(--slate);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* --- Ad Slots --- */
/* Hidden by default — shown only when ads are loaded via JS */
.ad-slot {
  background: var(--surface-elevated);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  text-align: center;
  color: var(--slate-light);
  font-size: 0.75rem;
  min-height: 90px;
  display: none; /* Hidden until ads load */
  align-items: center;
  justify-content: center;
}

.ad-slot.has-ad {
  display: flex;
}

.ad-slot--leaderboard {
  max-width: var(--container-max);
  margin: var(--space-md) auto;
}

.ad-slot--sidebar {
  position: sticky;
  top: calc(var(--header-height) + var(--space-lg));
}

.ad-slot--banner {
  margin: var(--space-2xl) auto;
  max-width: var(--container-max);
}

/* --- Footer --- */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--space-2xl) 0 var(--space-lg);
}

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

.footer-brand .logo-text {
  color: var(--surface);
  margin-bottom: var(--space-sm);
  display: block;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 320px;
}

.footer-col h4 {
  color: var(--surface);
  margin-bottom: var(--space-md);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: var(--space-sm);
}

.footer-col a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  transition: color var(--duration-fast) var(--ease-out);
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.5);
}

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

/* --- Cookie Banner --- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.85);
  padding: var(--space-lg);
  z-index: 1000;
  transform: translateY(100%);
  transition: transform var(--duration-slow) var(--ease-out);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
}

.cookie-banner.visible {
  transform: translateY(0);
}

.cookie-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.cookie-text {
  font-size: 0.875rem;
  line-height: 1.6;
  flex: 1;
}

.cookie-text a {
  color: var(--blade-soft);
  text-decoration: underline;
}

.cookie-actions {
  display: flex;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.cookie-btn {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--duration-fast) var(--ease-out);
}

.cookie-btn--accept {
  background: var(--blade);
  color: var(--surface);
}

.cookie-btn--accept:hover {
  background: var(--blade-hover);
}

.cookie-btn--reject {
  background: rgba(255, 255, 255, 0.1);
  color: var(--surface);
}

.cookie-btn--reject:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* --- Legal/Content Pages --- */
.page-header {
  padding-top: calc(var(--header-height) + var(--space-2xl));
  padding-bottom: var(--space-xl);
  text-align: center;
  border-bottom: 1px solid var(--border-light);
}

.page-header p {
  margin: var(--space-sm) auto 0;
  color: var(--slate);
}

.page-content {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg);
}

.page-content h2 {
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
  font-size: 1.6rem;
}

.page-content h3 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
  font-size: 1.2rem;
}

.page-content p {
  margin-bottom: var(--space-md);
  color: var(--ink-light);
}

.page-content ul,
.page-content ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-xl);
  color: var(--ink-light);
}

.page-content li {
  margin-bottom: var(--space-sm);
}

/* Contact form */
.contact-form {
  max-width: 560px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: var(--space-lg);
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: var(--space-sm);
  color: var(--ink);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--surface);
  transition: border-color var(--duration-fast) var(--ease-out);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--blade);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

/* --- Notification / Toast --- */
.toast {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  padding: var(--space-md) var(--space-lg);
  background: var(--ink);
  color: var(--surface);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  transform: translateY(120%);
  transition: transform var(--duration-normal) var(--ease-spring);
  z-index: 200;
}

.toast.visible {
  transform: translateY(0);
}

.toast.toast--error {
  background: var(--blade);
}

.toast.toast--success {
  background: var(--moss);
}

/* --- Loading Spinner --- */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--blade);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Error state --- */
.error-message {
  display: none;
  padding: var(--space-md) var(--space-lg);
  background: rgba(193, 39, 45, 0.08);
  border: 1px solid rgba(193, 39, 45, 0.2);
  border-radius: var(--radius-md);
  color: var(--blade);
  font-size: 0.9rem;
  margin-top: var(--space-md);
}

.error-message.active {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
}

/* --- Page Entry Animation --- */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delay classes */
.delay-1 { transition-delay: 100ms; }
.delay-2 { transition-delay: 200ms; }
.delay-3 { transition-delay: 350ms; }

/* --- Responsive --- */
@media (min-width: 768px) {
  .how-steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .tool-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--space-xl);
    max-width: 1120px;
    margin: 0 auto;
  }
}

@media (max-width: 767px) {
  :root {
    --header-height: 60px;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--paper);
    flex-direction: column;
    padding: var(--space-xl);
    gap: var(--space-lg);
    z-index: 99;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    font-size: 1.1rem;
  }

  .menu-toggle {
    display: flex;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .cookie-inner {
    flex-direction: column;
    text-align: center;
  }

  .hero {
    padding-top: calc(var(--header-height) + var(--space-2xl));
  }

  .result-actions {
    flex-direction: column;
  }

  .result-actions .btn {
    width: 100%;
  }

  .comparison-labels {
    left: var(--space-sm);
    right: var(--space-sm);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }
}

@media (max-width: 480px) {
  .upload-zone {
    padding: var(--space-2xl) var(--space-md);
  }

  .hero-demo {
    margin: 0 calc(-1 * var(--space-lg));
    border-radius: 0;
  }
}
