/* =============================================
   Variables
   ============================================= */
:root {
  /* Colors */
  --color-background: #f5f7fa;
  --color-surface: #ffffff;
  --color-text: #0f172a;
  --color-text-muted: #6b7280;

  --color-primary: #1363df; /* crisp blue */
  --color-primary-soft: #e0edff;
  --color-primary-strong: #0b4aa8;

  --color-success: #16a34a;
  --color-warning: #eab308;
  --color-danger: #dc2626;

  --color-border-subtle: #e5e7eb;
  --color-border-strong: #cbd5f5;

  --color-neutral-50: #f9fafb;
  --color-neutral-100: #f3f4f6;
  --color-neutral-200: #e5e7eb;
  --color-neutral-300: #d1d5db;
  --color-neutral-400: #9ca3af;
  --color-neutral-500: #6b7280;
  --color-neutral-600: #4b5563;
  --color-neutral-700: #374151;
  --color-neutral-800: #1f2933;
  --color-neutral-900: #111827;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-base: 1rem;    /* 16px */
  --font-size-lg: 1.125rem;  /* 18px */
  --font-size-xl: 1.25rem;   /* 20px */
  --font-size-2xl: 1.5rem;   /* 24px */
  --font-size-3xl: 1.875rem; /* 30px */
  --font-size-4xl: 2.25rem;  /* 36px */

  --line-height-tight: 1.2;
  --line-height-snug: 1.35;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;

  /* Spacing scale (0–96px) */
  --space-0: 0;
  --space-1: 0.125rem; /* 2px */
  --space-2: 0.25rem;  /* 4px */
  --space-3: 0.375rem; /* 6px */
  --space-4: 0.5rem;   /* 8px */
  --space-5: 0.625rem; /* 10px */
  --space-6: 0.75rem;  /* 12px */
  --space-8: 1rem;     /* 16px */
  --space-10: 1.25rem; /* 20px */
  --space-12: 1.5rem;  /* 24px */
  --space-16: 2rem;    /* 32px */
  --space-20: 2.5rem;  /* 40px */
  --space-24: 3rem;    /* 48px */
  --space-32: 4rem;    /* 64px */
  --space-40: 5rem;    /* 80px */
  --space-48: 6rem;    /* 96px */

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  /* Shadows – clean, subtle for professional feel */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.08);

  /* Transitions */
  --transition-fast: 120ms ease-out;
  --transition-base: 180ms ease-out;
  --transition-slow: 250ms ease-out;
}

/* =============================================
   Reset / Normalize
   ============================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

ul[role='list'],
ol[role='list'] {
  list-style: none;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

button {
  border: none;
  padding: 0;
  background: none;
}

textarea {
  resize: vertical;
}

/* Remove default link underlines and visited colors */
a {
  color: inherit;
  text-decoration: none;
}

/* =============================================
   Base Styles
   ============================================= */
body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  display: block;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: var(--line-height-tight);
  color: var(--color-text);
  margin-bottom: var(--space-8);
}

h1 {
  font-size: clamp(2rem, 3vw, var(--font-size-4xl));
}

h2 {
  font-size: clamp(1.75rem, 2.5vw, var(--font-size-3xl));
}

h3 {
  font-size: clamp(1.5rem, 2vw, var(--font-size-2xl));
}

h4 {
  font-size: var(--font-size-xl);
}

h5 {
  font-size: var(--font-size-lg);
}

h6 {
  font-size: var(--font-size-base);
}

p {
  margin-bottom: var(--space-8);
  /* comfortable line length */
  color: var(--color-text-muted);
}

strong {
  font-weight: 600;
}

small {
  font-size: var(--font-size-sm);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-base);
}

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

a:active {
  color: var(--color-primary-strong);
}

code,
pre {
  font-family: var(--font-mono);
}

hr {
  border: 0;
  border-top: 1px solid var(--color-border-subtle);
  margin: var(--space-16) 0;
}

/* =============================================
   Accessibility & Motion
   ============================================= */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

:focus:not(:focus-visible) {
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Screen reader only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =============================================
   Layout Utilities
   ============================================= */
.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-16);
  padding-right: var(--space-16);
  max-width: 1120px; /* comfortable width for clear, professional layout */
}

@media (min-width: 1200px) {
  .container {
    max-width: 1200px;
  }
}

/* Flex helpers */
.flex {
  display: flex;
}

.inline-flex {
  display: inline-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;
}

.flex-wrap {
  flex-wrap: wrap;
}

/* Simple gap utilities for consistent spacing */
.gap-4 {
  gap: var(--space-4);
}

.gap-8 {
  gap: var(--space-8);
}

.gap-12 {
  gap: var(--space-12);
}

.gap-16 {
  gap: var(--space-16);
}

/* Grid helpers */
.grid {
  display: grid;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-16);
}

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

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

/* Alignment utilities */
.text-center {
  text-align: center;
}

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

.mt-0 { margin-top: 0; }
.mt-8 { margin-top: var(--space-8); }
.mt-16 { margin-top: var(--space-16); }
.mt-24 { margin-top: var(--space-24); }

.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: var(--space-8); }
.mb-16 { margin-bottom: var(--space-16); }
.mb-24 { margin-bottom: var(--space-24); }

.py-16 {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}

.py-24 {
  padding-top: var(--space-24);
  padding-bottom: var(--space-24);
}

/* =============================================
   Components
   ============================================= */
/* Buttons – primary CTAs for booking & contact */
.button,
button,
input[type="button"],
input[type="submit"],
input[type="reset"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: 0.65rem 1.4rem;
  font-weight: 500;
  font-size: var(--font-size-sm);
  line-height: 1.2;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  cursor: pointer;
  background-color: var(--color-primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
  transition:
    background-color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-fast),
    border-color var(--transition-base),
    color var(--transition-base);
}

.button:hover,
button:hover,
input[type="button"]:hover,
input[type="submit"]:hover,
input[type="reset"]:hover {
  background-color: var(--color-primary-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.button:active,
button:active,
input[type="button"]:active,
input[type="submit"]:active,
input[type="reset"]:active {
  transform: translateY(0);
  box-shadow: var(--shadow-xs);
}

.button--secondary {
  background-color: #ffffff;
  color: var(--color-primary);
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-xs);
}

.button--secondary:hover {
  background-color: var(--color-primary-soft);
  border-color: var(--color-primary);
}

.button[disabled],
button[disabled],
input[type="button"][disabled],
input[type="submit"][disabled],
input[type="reset"][disabled] {
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}

/* Inputs & form controls – clean, trustworthy */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
input[type="number"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  background-color: #ffffff;
  color: var(--color-text);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    background-color var(--transition-base);
}

input::placeholder,
textarea::placeholder {
  color: var(--color-text-muted);
  opacity: 0.8;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(19, 99, 223, 0.12), 0 0 0 4px rgba(19, 99, 223, 0.12);
}

input[disabled],
select[disabled],
textarea[disabled] {
  background-color: var(--color-neutral-100);
  cursor: not-allowed;
}

label {
  display: inline-block;
  margin-bottom: var(--space-4);
  font-size: var(--font-size-sm);
  color: var(--color-text);
  font-weight: 500;
}

/* Card – for service categories & info blocks */
.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-16);
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: var(--shadow-xs);
}

.card--emphasis {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-md);
}

.card-header {
  margin-bottom: var(--space-8);
}

.card-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: var(--space-4);
  color: var(--color-text);
}

.card-subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.card-body {
  color: var(--color-text-muted);
}

/* Badge – subtle labels for status (e.g., "Nopea ajanvaraus") */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 500;
  background-color: var(--color-primary-soft);
  color: var(--color-primary-strong);
}

.badge--success {
  background-color: rgba(22, 163, 74, 0.08);
  color: var(--color-success);
}

.badge--warning {
  background-color: rgba(234, 179, 8, 0.08);
  color: var(--color-warning);
}

.badge--danger {
  background-color: rgba(220, 38, 38, 0.08);
  color: var(--color-danger);
}

/* Subtle header bar / top nav baseline */
.site-header {
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-8) 0;
}

/* Hero base styling for clear, trustworthy first impression */
.hero {
  padding: var(--space-32) 0 var(--space-40);
}

.hero-title {
  font-size: clamp(2.25rem, 4vw, 3rem);
  line-height: var(--line-height-tight);
}

.hero-subtitle {
  margin-top: var(--space-8);
  font-size: var(--font-size-lg);
  color: var(--color-text-muted);
  max-width: 40rem;
}

.hero-actions {
  margin-top: var(--space-16);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
}

/* Footer baseline */
.site-footer {
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  background-color: #ffffff;
  color: var(--color-text-muted);
  padding: var(--space-16) 0;
}

.site-footer p {
  margin-bottom: 0;
  }
