/* shared.css — reset, brand variables, base behaviour shared across all styles */

/* Inter (self-hosted) — see assets/fonts/README.md for download instructions */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/inter-v20-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/inter-v20-latin-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/inter-v20-latin-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/inter-v20-latin-700.woff2') format('woff2');
}

:root {
  --slate: #3e5063;
  --slate-90: #4a5a6c;
  --slate-700: #4a5a6c;
  --grey: #7e8389;
  --grey-soft: #b8bcc1;
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --bg-softer: #fbfbfc;
  --border: #e5e7eb;
  --border-soft: #eef0f3;
  --text: #1f2937;
  --text-muted: #4b5563;
  --text-faint: #7e8389;
  --danger: #b91c1c;

  --fs-h1: clamp(2rem, 3.2vw + 1rem, 3.75rem);
  --fs-h2: clamp(1.5rem, 1.6vw + 1rem, 2.25rem);
  --fs-h3: clamp(1.125rem, 0.4vw + 1rem, 1.375rem);
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-tiny: 0.75rem;

  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;

  --radius: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 6px 16px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 18px 40px rgba(15, 23, 42, 0.10), 0 4px 12px rgba(15, 23, 42, 0.06);

  --container: 1140px;
  --section-y: clamp(3rem, 7vw, 6rem);

  --transition: 200ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; }

h1, h2, h3, h4 {
  margin: 0 0 var(--s-4);
  line-height: 1.15;
  letter-spacing: -0.01em;
  font-weight: 600;
  color: var(--text);
}
h1 { font-size: var(--fs-h1); letter-spacing: -0.02em; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { margin: 0 0 var(--s-4); }
p:last-child { margin-bottom: 0; }

.muted { color: var(--text-muted); }
.eyebrow {
  display: inline-block;
  font-size: var(--fs-tiny);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--s-3);
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

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

/* Skip-link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: var(--s-2) var(--s-4);
  background: var(--slate);
  color: #fff;
  text-decoration: none;
  z-index: 100;
}
.skip-link:focus { left: var(--s-3); top: var(--s-3); }

/* Focus */
:focus-visible {
  outline: 2px solid var(--slate);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 0.8rem 1.5rem;
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  color: #fff;
  background: var(--slate);
  border: 1px solid var(--slate);
  border-radius: 8px;
  cursor: pointer;
  transition: filter var(--transition), transform var(--transition);
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(1px); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 0.8rem 1rem;
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  color: var(--slate);
  background: transparent;
  border: none;
  cursor: pointer;
}
.btn-ghost:hover { text-decoration: underline; }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 0.8rem 1.5rem;
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  color: var(--slate);
  background: transparent;
  border: 1px solid var(--slate);
  border-radius: 8px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.btn-outline:hover { background: var(--slate); color: #fff; }

/* Form */
.form { display: grid; gap: var(--s-4); }
.form .row { display: grid; gap: var(--s-4); }
@media (min-width: 640px) { .form .row.two { grid-template-columns: 1fr 1fr; } }

.field { display: grid; gap: var(--s-2); }
.field label {
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--text);
}
.field input,
.field select,
.field textarea {
  font: inherit;
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--slate);
  box-shadow: 0 0 0 3px rgba(30, 41, 59, 0.12);
}
.field textarea { min-height: 140px; resize: vertical; }
.field .hint { font-size: var(--fs-tiny); color: var(--text-faint); }

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  font-size: var(--fs-small);
  color: var(--text-muted);
}
.checkbox input { margin-top: 0.25rem; }

/* Accordion */
details {
  border-top: 1px solid var(--border);
}
details:last-of-type { border-bottom: 1px solid var(--border); }
summary {
  list-style: none;
  cursor: pointer;
  padding: var(--s-4) 0;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "";
  width: 12px;
  height: 12px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform var(--transition);
  flex-shrink: 0;
  margin-right: 6px;
}
details[open] summary::after { transform: rotate(-135deg); }
details > p, details > div {
  padding: 0 0 var(--s-5);
  color: var(--text-muted);
  max-width: 60ch;
}

/* Footer (shared base) */
.site-footer {
  background: var(--slate);
  color: #eef1f5;
  padding: var(--s-7) 0 var(--s-5);
  margin-top: var(--s-8);
}
.site-footer a { color: #ffffff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer h4 {
  color: #fff;
  font-size: var(--fs-small);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: var(--s-3);
}
.footer-grid {
  display: grid;
  gap: var(--s-6);
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
.site-footer p, .site-footer li { color: #eef1f5; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-2); }
.footer-bottom {
  margin-top: var(--s-6);
  padding-top: var(--s-4);
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-3);
  font-size: var(--fs-small);
  color: #d4d9e0;
}

/* Back-to-picker bar */
.style-bar {
  background: var(--slate);
  color: #fff;
  font-size: var(--fs-small);
}
.style-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.5rem;
  gap: var(--s-4);
  flex-wrap: wrap;
}
.style-bar a { color: #fff; text-decoration: none; opacity: 0.9; }
.style-bar a:hover { opacity: 1; text-decoration: underline; }
.style-bar .style-name { font-weight: 600; letter-spacing: 0.04em; }

/* Helpers */
.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;
}

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