/* Sol Beauty prototype – base: reset, typography, layout primitives, focus, motion. */

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

[hidden] {
  display: none !important;
}

html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Keep anchor targets clear of the sticky header */
  scroll-padding-top: calc(var(--header-h) + var(--space-4));
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Scroll lock while a drawer/overlay is open (set by core.js) */
html.has-modal {
  overflow: hidden;
  padding-right: var(--scrollbar-comp, 0px);
}

body {
  margin: 0;
  background: var(--color-surface);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
}

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

img {
  height: auto;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure,
blockquote,
address {
  margin: 0;
}

ul[class],
ol[class] {
  list-style: none;
  padding: 0;
}

address {
  font-style: normal;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-variation-settings: var(--font-display-variation);
  font-weight: var(--weight-regular);
  text-wrap: balance;
}

h2 {
  font-size: var(--text-h2);
  line-height: var(--leading-h2);
  letter-spacing: var(--tracking-h2);
}

h3 {
  font-size: var(--text-h3);
  font-weight: var(--weight-medium);
  line-height: var(--leading-h3);
}

p {
  max-width: var(--measure-body);
}

a {
  color: inherit;
}

s {
  text-decoration-thickness: 1px;
}

/* Icons (inline SVG sprite in index.html) */
.icon {
  width: var(--size-icon-xl);
  height: var(--size-icon-xl);
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--sm {
  width: var(--size-icon-sm);
  height: var(--size-icon-sm);
}

.icon--md {
  width: var(--size-icon-md);
  height: var(--size-icon-md);
}

.icon--lg {
  width: var(--size-icon-lg);
  height: var(--size-icon-lg);
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Layout primitives */
.container {
  width: 100%;
  max-width: calc(var(--container-max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: calc(var(--container-narrow) + 2 * var(--gutter));
}

.section {
  padding-block: var(--section-pad-y);
}

.surface-sand {
  background: var(--color-surface);
}

.surface-peach {
  background: var(--color-surface);
}

.surface-dark {
  background: var(--color-surface-dark);
  color: var(--color-on-dark);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-eyebrow);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-eyebrow);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--color-ink-muted); /* Sol Taupe — eyebrows are the soft secondary accent */
}

.surface-dark .eyebrow {
  color: var(--color-sun); /* Sol Cream on dark brand surfaces */
}

.lead {
  font-size: var(--text-body-lg);
  line-height: var(--leading-body-lg);
  color: var(--color-ink-muted);
  max-width: var(--measure-intro);
}

.small {
  font-size: var(--text-small);
  line-height: var(--leading-small);
  letter-spacing: var(--tracking-small);
}

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

.surface-dark .muted {
  color: var(--color-on-dark-muted);
}

/* Focus (design-direction §6) */
:focus-visible {
  outline: var(--focus-ring-width) solid var(--color-focus);
  outline-offset: var(--focus-ring-offset);
}

.surface-dark :focus-visible {
  outline-color: var(--color-focus-on-dark);
}

/* Skip link */
.skip-link {
  position: fixed;
  top: var(--space-2);
  left: var(--space-2);
  z-index: var(--z-skip);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-full);
  background: var(--color-ink);
  color: var(--color-on-dark);
  font-weight: var(--weight-semibold);
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.skip-link:focus-visible {
  outline-color: var(--color-ink);
}

/* Reduced motion (design-direction §3.7): no translate/scale, final positions,
   no smooth scrolling. Fades collapse to at most --dur-instant (here: instant). */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0ms !important;
    transition-delay: 0ms !important;
    animation-duration: 0ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
