/* =====================================================================
   Laxmi Clinic — Design System
   Premium healthcare design tokens, reset, typography, utilities
   ===================================================================== */

:root {
  /* Colours */
  --brand-900: #0b3d5c;
  --brand-800: #0e4c70;
  --brand-700: #115f8c;
  --brand-600: #14719f;
  --brand-500: #1782b4;
  --brand-100: #e3f1f8;
  --brand-50: #f2f9fc;

  --teal-700: #0f766e;
  --teal-600: #0d9488;
  --teal-100: #ccfbf1;

  --ink-900: #10232e;
  --ink-700: #28404d;
  --ink-600: #3a5563;
  --ink-500: #4d6675;
  --ink-400: #6b8290;
  --ink-300: #9db0bb;

  --surface: #ffffff;
  --surface-muted: #f6f9fb;
  --surface-alt: #eef4f8;
  --border: #e4ebef;
  --border-strong: #d3dfe6;

  --white: #ffffff;

  /* Functional */
  --bg-app: #ffffff;
  --text-primary: #10232e;
  --text-secondary: #3a5563;
  --text-muted: #6b8290;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(16, 35, 46, 0.06);
  --shadow-sm: 0 1px 3px rgba(16, 35, 46, 0.08), 0 1px 2px rgba(16, 35, 46, 0.05);
  --shadow-md: 0 6px 20px -6px rgba(16, 35, 46, 0.16);
  --shadow-lg: 0 20px 45px -18px rgba(16, 35, 46, 0.28);
  --shadow-brand: 0 10px 24px -10px rgba(23, 130, 180, 0.45);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-7: 2rem;
  --space-8: 2.5rem;
  --space-9: 3rem;
  --space-10: 3.5rem;
  --space-12: 4rem;
  --space-16: 6rem;
  --space-20: 7.5rem;

  /* Layout */
  --container: 1200px;
  --container-narrow: 860px;
  --gutter: 1.25rem;
  --header-h: 4.25rem;

  /* Type */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  --fs-h1: clamp(2.1rem, 1.4rem + 3.2vw, 3.6rem);
  --fs-h2: clamp(1.7rem, 1.3rem + 1.8vw, 2.5rem);
  --fs-h3: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --fs-h4: 1.15rem;
  --fs-body: clamp(1rem, 0.97rem + 0.12vw, 1.0625rem);
  --fs-small: 0.925rem;
  --fs-tiny: 0.85rem;

  --lh-tight: 1.18;
  --lh-body: 1.62;
  --lh-relaxed: 1.7;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.24s;

  /* Focus */
  --focus-ring: 0 0 0 3px rgba(23, 130, 180, 0.45);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text-primary);
  background: var(--bg-app);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

img {
  height: auto;
  border: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  line-height: var(--lh-tight);
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -0.015em;
}

p {
  margin: 0;
}

a {
  color: var(--brand-600);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

a:hover {
  color: var(--brand-700);
}

button {
  font-family: inherit;
  cursor: pointer;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

/* Accessible focus */
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 4px;
}

::selection {
  background: var(--brand-100);
  color: var(--brand-900);
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===================== LAYOUT HELPERS ===================== */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

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

@media (max-width: 640px) {
  .section {
    padding-block: var(--space-9);
  }
}

.section-muted {
  background: var(--surface-muted);
}

/* ===================== TYPOGRAPHY ===================== */
.display {
  font-size: var(--fs-h1);
  line-height: 1.08;
}

.h2 {
  font-size: var(--fs-h2);
  line-height: 1.15;
}

.h3 {
  font-size: var(--fs-h3);
}

.h4 {
  font-size: var(--fs-h4);
}

.lead {
  font-size: clamp(1.05rem, 1rem + 0.25vw, 1.2rem);
  line-height: var(--lh-relaxed);
  color: var(--text-secondary);
}

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

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

.small {
  font-size: var(--fs-small);
}

.tiny {
  font-size: var(--fs-tiny);
}

.center {
  text-align: center;
}

/* Eyebrow label */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-600);
  margin-bottom: var(--space-4);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--brand-500);
  border-radius: 2px;
}

.center .eyebrow {
  justify-content: center;
}

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    background-color var(--dur) var(--ease), color var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
  min-height: 46px;
  cursor: pointer;
}

.btn:active {
  transform: translateY(1px);
}

.btn .icon {
  width: 1.1em;
  height: 1.1em;
  flex: 0 0 auto;
}

.btn-primary {
  background: var(--brand-600);
  color: #fff;
  box-shadow: var(--shadow-brand);
}

.btn-primary:hover {
  background: var(--brand-700);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -12px rgba(23, 130, 180, 0.55);
}

.btn-secondary {
  background: var(--brand-50);
  color: var(--brand-700);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--brand-100);
  color: var(--brand-800);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--brand-700);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  background: var(--brand-50);
  color: var(--brand-800);
  transform: translateY(-2px);
}

.btn-light {
  background: #fff;
  color: var(--brand-700);
  box-shadow: var(--shadow-md);
}

.btn-light:hover {
  background: var(--brand-50);
  transform: translateY(-2px);
}

.btn-whatsapp {
  background: #25d366;
  color: #073b1c;
}

.btn-whatsapp:hover {
  background: #1fc25b;
  color: #052e16;
  transform: translateY(-2px);
}

.btn-outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  transform: translateY(-2px);
}

.btn-lg {
  padding: 1rem 1.9rem;
  font-size: 1.05rem;
  min-height: 52px;
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 0.55rem 1.1rem;
  font-size: 0.9rem;
  min-height: 40px;
}

/* ===================== CARDS ===================== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* ===================== BADGE / CHIP ===================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-pill);
  background: var(--brand-50);
  color: var(--brand-700);
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border-strong);
}

/* ===================== FORMS ===================== */
.field {
  margin-bottom: var(--space-5);
}

.field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-700);
  margin-bottom: 0.4rem;
}

.field label .req {
  color: var(--teal-700);
  margin-left: 0.15rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.8rem 0.95rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  appearance: none;
  -webkit-appearance: none;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: var(--focus-ring);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--ink-300);
}

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

.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b8290' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 18px;
  padding-right: 2.6rem;
}

.field .hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.field .error-msg {
  display: none;
  font-size: 0.82rem;
  color: #b42318;
  margin-top: 0.3rem;
}

.field.invalid input,
.field.invalid select,
.field.invalid textarea {
  border-color: #ef6c5b;
  box-shadow: 0 0 0 3px rgba(239, 108, 91, 0.2);
}

.field.invalid .error-msg {
  display: block;
}

.form-error,
.form-success {
  display: none;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  margin-bottom: var(--space-5);
  border: 1px solid transparent;
}

.form-error {
  background: #fdebeb;
  color: #a11a0f;
  border-color: #f5c6c2;
}

.form-success {
  background: #e7f7ee;
  color: #08603a;
  border-color: #bfe6cf;
}

.form-error.show,
.form-success.show {
  display: block;
}

/* ===================== BREADCRUMBS ===================== */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding-block: var(--space-4) 0;
}

.breadcrumbs a {
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: var(--brand-600);
}

.breadcrumbs .sep {
  color: var(--ink-300);
  pointer-events: none;
}

.breadcrumbs [aria-current="page"] {
  color: var(--ink-700);
  font-weight: 600;
}

/* ===================== ACCORDION ===================== */
.accordion {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
}

.accordion + .accordion {
  margin-top: var(--space-3);
}

.accordion__item {
  border-bottom: 1px solid var(--border);
}

.accordion__item:last-child {
  border-bottom: 0;
}

.accordion__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.2rem;
  background: none;
  border: 0;
  text-align: left;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink-900);
  line-height: 1.4;
}

.accordion__trigger:hover {
  background: var(--surface-muted);
}

.accordion__icon {
  flex: 0 0 auto;
  width: 1.3rem;
  height: 1.3rem;
  color: var(--brand-600);
  transition: transform var(--dur) var(--ease);
}

.accordion__item.open .accordion__icon {
  transform: rotate(180deg);
}

.accordion__panel {
  max-height: 0;
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  padding: 0 1.2rem;
  color: var(--text-secondary);
  transition:
    max-height 0.35s var(--ease),
    opacity 0.35s var(--ease),
    padding 0.35s var(--ease),
    visibility 0.35s;
}

.accordion__item.open .accordion__panel {
  max-height: 900px;
  visibility: visible;
  opacity: 1;
  padding: 0 1.2rem 1.2rem;
}

.accordion__panel p {
  margin-bottom: 0.75rem;
}

.accordion__panel p:last-child {
  margin-bottom: 0;
}

/* ===================== SIMPLE TABLE ===================== */
.simple-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.simple-table th,
.simple-table td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.simple-table th {
  font-weight: 700;
  color: var(--ink-700);
  background: var(--surface-muted);
}

/* ===================== CONTENT PROSE ===================== */
.prose {
  color: var(--text-secondary);
  line-height: var(--lh-relaxed);
}

.prose h2 {
  color: var(--ink-900);
  margin: var(--space-7) 0 var(--space-4);
  font-size: 1.5rem;
}

.prose h3 {
  color: var(--ink-900);
  margin: var(--space-6) 0 var(--space-3);
  font-size: 1.2rem;
}

.prose p {
  margin-bottom: var(--space-4);
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose ul,
.prose ol {
  padding-left: 1.4rem;
  margin-bottom: var(--space-4);
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ===================== ICON LIST ===================== */
.check-list {
  list-style: none;
}

.check-list li {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  margin-bottom: var(--space-3);
  color: var(--text-secondary);
}

.check-list li::before {
  content: "";
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  background: var(--brand-600);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ===================== SKIP LINK ===================== */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 2000;
  background: var(--brand-700);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: top var(--dur) var(--ease);
}

.skip-link:focus {
  top: 1rem;
  color: #fff;
}

/* ===================== REVEAL (subtle) ===================== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  }

  .reveal.visible {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}
