/* ==========================================================================
   Trend Dental Clinic — Base Styles (reset, typography, layout, buttons)
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

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

body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-text-dark);
  background-color: var(--color-bg-white);
  -webkit-font-smoothing: antialiased;
}

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

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

ul,
ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

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

input,
select,
textarea,
button {
  font-family: inherit;
  font-size: inherit;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: var(--lh-heading);
  color: var(--color-text-dark);
  margin: 0;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 600; }
h4 { font-size: var(--fs-h4); font-weight: 600; }

p {
  margin: 0;
}

/* ---- Focus visibility ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--color-primary);
  color: #fff;
  padding: var(--space-sm) var(--space-md);
  z-index: var(--z-toast);
  border-radius: var(--radius-sm);
}

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

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

.container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin-inline: auto;
  padding-inline: var(--space-lg);
}

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

.section[id],
[id] {
  scroll-margin-top: calc(var(--header-height-scrolled) + var(--space-md));
}

@media (min-width: 768px) {
  .section[id],
  [id] {
    scroll-margin-top: calc(var(--header-height) + var(--space-md));
  }
}

@media (max-width: 767px) {
  .section {
    padding-block: var(--space-3xl);
  }
  .container,
  .container-narrow {
    padding-inline: var(--space-md);
  }
}

.section--cream { background-color: var(--color-bg-cream); }
.section--white { background-color: var(--color-bg-white); }
.section--tint { background-color: var(--color-bg-tint); }

.section-head {
  max-width: 640px;
  margin-bottom: var(--space-2xl);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--fs-small);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: var(--space-sm);
}

.section-head p {
  color: var(--color-text-muted);
  font-size: var(--fs-body-lg);
  margin-top: var(--space-sm);
}

.section-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
  flex-wrap: wrap;
}

.section-head-row .section-head {
  margin-bottom: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--fs-body);
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
}

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

.btn-primary:hover {
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: #fff;
}

.btn-white {
  background: #fff;
  color: var(--color-primary);
}

.btn-white:hover {
  background: var(--color-bg-cream);
}

.btn-text {
  background: none;
  border: none;
  padding: 0;
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
}

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

.btn-sm {
  padding: 0.6rem 1.25rem;
  font-size: var(--fs-small);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
