/* Reset, type defaults and shared components. Colors and fonts come from tokens.css. */

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

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

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

body {
  margin: 0;
  background: var(--c-bone);
  color: var(--c-slate);
  font-family: var(--font-body);
  font-size: var(--step-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-heading);
  color: var(--c-slate);
  text-wrap: balance;
}

p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--c-deep-teal); text-underline-offset: 0.18em; }

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

:focus-visible { outline: 2px solid var(--c-deep-teal); outline-offset: 3px; border-radius: 6px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 8px;
  background: var(--c-slate); color: #fff;
}
.skip:focus { top: 12px; }

.eyebrow {
  margin: 0 0 12px;
  font-size: var(--step-label);
  line-height: var(--lh-label);
  font-weight: var(--wt-label);
  letter-spacing: var(--tr-label);

  color: var(--c-stone);
}

.muted { color: var(--c-stone); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 44px;
  padding: 0.6em 1.15em;
  border-radius: 999px;
  border: 1px solid rgba(65, 74, 80, 0.18);
  background: var(--c-white);
  color: var(--c-slate);
  font-size: 15px; font-weight: 600; line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, transform 0.2s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--c-slate); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn--primary { background: var(--button-solid-deep-blue); border-color: transparent; color: #FFFFFF; }
.btn--gradient { background: var(--gradient-button); border-color: transparent; color: var(--button-ink); }
.btn--gradient:hover { border-color: transparent; filter: brightness(0.95); }
.btn--lg { min-height: 52px; padding: 0.7em 1.5em; font-size: 19px; font-weight: 700; }
.btn--primary:hover { border-color: transparent; filter: brightness(0.93); }
.btn--sm { min-height: 36px; padding: 0.45em 0.9em; font-size: 14px; }
.btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }

/* Copy chips */
.chip {
  display: inline-flex; align-items: center; gap: 0.4em;
  padding: 0.3em 0.6em;
  border: 0; border-radius: 6px;
  background: rgba(65, 74, 80, 0.07);
  color: var(--c-slate);
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 13px; line-height: 1.4;
  cursor: copy;
  text-align: left;
  white-space: nowrap;
  max-width: 100%;
  transition: background-color 0.2s, color 0.2s;
}
.chip:hover { background: rgba(65, 74, 80, 0.13); }
.chip.is-copied { background: var(--c-slate); color: #fff; }
.chip svg { width: 13px; height: 13px; opacity: 0.55; flex: none; }

/* Cards */
.card {
  background: var(--c-white);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  overflow: hidden;
}

/* Segmented radio controls */
.seg { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; border: 0; }
.seg legend { width: 100%; margin-bottom: 8px; padding: 0; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(65, 74, 80, 0.18);
  background: var(--c-white);
  font-size: 14px; font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.seg input:checked + label { background: var(--c-slate); border-color: var(--c-slate); color: #fff; }
.seg input:focus-visible + label { outline: 2px solid var(--c-deep-teal); outline-offset: 2px; }

/* Photo placeholders until the studio library arrives */
.photo {
  position: relative;
  background:
    radial-gradient(120% 90% at 20% 10%, rgba(255, 255, 255, 0.55), transparent 55%),
    linear-gradient(150deg, #9FB3BD 0%, #C8BBA9 55%, #E6DACB 100%);
}
.photo::after {
  content: 'Photo';
  position: absolute; right: 12px; bottom: 10px;
  font-size: 11px; font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}
.photo--dark {
  background:
    radial-gradient(100% 80% at 70% 20%, rgba(255, 255, 255, 0.18), transparent 60%),
    linear-gradient(160deg, #56666F 0%, #7C7466 60%, #9A8C79 100%);
}
.photo--none::after { content: none; }
