/* =========================================================
   SOFTTEX Base Styles (assets/css/base.css)
   Modern, professional, friendly, trustworthy, clean
   ========================================================= */

/* =========================================================
   1. CSS Custom Properties (Variables)
   ========================================================= */
:root {
  /* Color Palette - tuned for a friendly, trustworthy pet-care brand */
  --color-background: #f7fafc;           /* page background */
  --color-surface: #ffffff;              /* cards, panels */
  --color-text: #1a202c;                 /* primary text */
  --color-text-muted: #4a5568;           /* secondary text */

  --color-primary: #2563eb;              /* brand / action */
  --color-primary-soft: #dbeafe;         /* subtle primary background */
  --color-primary-dark: #1d4ed8;         /* hover state */

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

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

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --font-heading: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Base font sizing (Turkish content, comfortable reading) */
  --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-normal: 1.5;
  --line-height-relaxed: 1.7;

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

  /* Radius */
  --radius-xs: 0.125rem;
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Shadows (soft, welcoming) */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 12px 30px rgba(15, 23, 42, 0.16);

  /* Transitions */
  --transition-fast: 150ms ease-out;
  --transition-normal: 220ms ease-out;
  --transition-slow: 320ms ease-out;

  /* Layout */
  --container-max-width: 1120px;
}

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

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

body {
  margin: 0;
}
a.btn:hover {
    color: #000 !important;
}
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;
}

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

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

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

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

/* Make sure hidden attribute works as expected */
[hidden] {
  display: none !important;
}

/* =========================================================
   3. Base Typography & Layout
   ========================================================= */
body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
  color: var(--color-text);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  display: block;
}

/* Headings - modern, friendly, clear hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: var(--line-height-tight);
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

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-4);
  color: var(--color-text-muted);
}

strong {
  font-weight: 600;
}

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

/* Links - clear but minimal by default */
a {
  color: var(--color-primary);
  transition: color var(--transition-fast);
}

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

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

/* Remove focus outline for mouse users but keep for keyboard */
:focus {
  outline: none;
}

body:focus-visible {
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =========================================================
   5. Utilities
   ========================================================= */

/* Layout helpers */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

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

.section--light {
  background-color: var(--gray-50);
}

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

/* 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-column {
  display: flex;
  flex-direction: column;
}

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

.gap-sm {
  gap: var(--space-3);
}

.gap-md {
  gap: var(--space-4);
}

.gap-lg {
  gap: var(--space-6);
}

/* Simple grid helper */
.grid {
  display: grid;
  gap: var(--space-6);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-6);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-6);
}

/* Spacing utilities (margin & padding, top/bottom only for brevity) */
.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.pt-4 { padding-top: var(--space-4); }
.pt-6 { padding-top: var(--space-6); }
.pt-8 { padding-top: var(--space-8); }

.pb-4 { padding-bottom: var(--space-4); }
.pb-6 { padding-bottom: var(--space-6); }
.pb-8 { padding-bottom: var(--space-8); }

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

/* Screen reader only */
.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;
}

/* =========================================================
   6. Components
   ========================================================= */

/* Buttons - primary, secondary, subtle; friendly rounded corners */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: var(--font-size-sm);
  letter-spacing: 0.02em;
  cursor: pointer;
  border: 1px solid transparent;
  transition:
    background-color var(--transition-normal),
    color var(--transition-normal),
    box-shadow var(--transition-fast),
    transform var(--transition-fast),
    border-color var(--transition-fast);
}

.btn--primary {
  background-color: var(--color-primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
  background-color: var(--color-primary-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn--secondary {
  background-color: #ffffff;
  color: var(--color-primary);
  border-color: var(--gray-200);
}

.btn--secondary:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.btn--ghost {
  background-color: transparent;
  color: var(--color-primary);
}

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

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

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

/* Forms - inputs, textareas, selects */
.input,
.textarea,
.select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-300);
  background-color: #ffffff;
  font-size: var(--font-size-sm);
  color: var(--color-text);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background-color var(--transition-fast);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--gray-400);
}

.input:focus-visible,
.textarea:focus-visible,
.select:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary-soft);
}

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

.textarea {
  min-height: 120px;
  resize: vertical;
}

/* Cards - used for service items, testimonials, pricing, etc. */
.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
}

.card--soft {
  background-color: #ffffff;
  border-radius: var(--radius-md);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
}

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

.card__title {
  font-family: var(--font-heading);
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-1);
}

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

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

/* Tag / pill (e.g., for dog size, service type) */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  background-color: var(--gray-100);
  color: var(--gray-700);
}

.tag--success {
  background-color: #dcfce7;
  color: #166534;
}

.tag--warning {
  background-color: #fef9c3;
  color: #854d0e;
}

.tag--info {
  background-color: #e0f2fe;
  color: #075985;
}

/* Alerts - for important messages to pet owners */
.alert {
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: var(--font-size-sm);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.alert--success {
  background-color: #ecfdf3;
  color: #166534;
}

.alert--warning {
  background-color: #fffbeb;
  color: #854d0e;
}

.alert--danger {
  background-color: #fef2f2;
  color: #7f1d1d;
}

/* Hero-specific helpers (for dog walking & boarding theme) */
.hero {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}

.hero--center {
  text-align: center;
}

.hero__eyebrow {
  font-size: var(--font-size-sm);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

.hero__title {
  font-size: clamp(2.25rem, 4vw, 3rem);
  margin-bottom: var(--space-3);
}

.hero__subtitle {
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
}

/* Navigation basics (for clean header) */
.navbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.navbar__menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: var(--font-size-sm);
}

.navbar__link {
  position: relative;
  padding: 0.25rem 0;
  color: var(--gray-700);
}

.navbar__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-primary);
  transition: width var(--transition-fast);
}

.navbar__link:hover::after,
.navbar__link[aria-current="page"]::after {
  width: 100%;
}

/* Footer basics */
.footer {
  background-color: var(--gray-900);
  color: #e5e7eb;
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
}

.footer a {
  color: #e5e7eb;
}

.footer a:hover {
  color: #ffffff;
}
