/* CTS Speciality Hospital — base styles */

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--ink);
  background: var(--cream);
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

img {
  font-style: italic;
}

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

a:hover {
  color: var(--aubergine-deep);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--ink);
  margin: 0;
  letter-spacing: var(--ls-snug);
  line-height: var(--lh-snug);
}

h1 {
  font-size: var(--fs-4xl);
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-tight);
  font-weight: 400;
}

h2 {
  font-size: var(--fs-3xl);
  font-weight: 400;
}

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

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

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

h6 {
  font-size: var(--fs-base);
  font-weight: 600;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  font-family: var(--font-body);
}

p {
  margin: 0 0 var(--space-4);
  max-width: var(--container-prose);
}

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

strong {
  font-weight: 600;
  color: var(--ink);
}

em {
  font-style: italic;
}

small {
  font-size: var(--fs-sm);
  color: var(--ink-soft);
}

ul, ol {
  margin: 0 0 var(--space-4);
  padding-left: var(--space-5);
  color: var(--ink-soft);
}

li {
  margin-bottom: var(--space-2);
  line-height: var(--lh-normal);
}

hr {
  border: 0;
  border-top: 1px solid var(--bone);
  margin: var(--space-7) 0;
}

/* Layout primitives */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

@media (min-width: 768px) {
  .container {
    padding-inline: var(--space-7);
  }
}

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

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

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

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

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

/* Eyebrow — small caps label that signals section type */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--aubergine);
  margin-bottom: var(--space-4);
  display: block;
}

.eyebrow--forest {
  color: var(--forest);
}

.eyebrow--coral {
  color: var(--coral);
}

/* Display heading variant — bigger, more editorial */
.display {
  font-size: var(--fs-5xl);
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-tight);
  font-weight: 400;
}

/* Lede — first paragraph after a heading, slightly larger */
.lede {
  font-size: var(--fs-md);
  line-height: var(--lh-relaxed);
  color: var(--ink-soft);
}

/* Long-form prose container */
.prose {
  max-width: var(--container-prose);
  line-height: var(--lh-relaxed);
}

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

.prose h2 {
  font-size: var(--fs-2xl);
  margin-top: var(--space-7);
  margin-bottom: var(--space-4);
}

.prose h3 {
  font-size: var(--fs-xl);
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
}

/* Italicised serif highlight inside body text */
.highlight-serif {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--aubergine);
}

/* Stacked metadata block (e.g. credentials list, address block) */
.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

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

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

.row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  align-items: flex-start;
}

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

/* Grids */
.grid {
  display: grid;
  gap: var(--space-5);
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

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

/* Mono inline */
.mono {
  font-family: var(--font-mono);
  font-size: 0.9em;
  letter-spacing: var(--ls-tight);
}

/* Selection */
::selection {
  background: var(--aubergine);
  color: var(--cream);
}

/* Smooth scroll target offset for sticky nav */
:target {
  scroll-margin-top: var(--space-8);
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  background: var(--aubergine);
  color: var(--cream);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  z-index: 100;
  transition: top var(--duration) var(--ease);
}

.skip-link:focus {
  top: var(--space-4);
}

/* Utility: visually-hidden but accessible */
.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;
}
