/* SalonNow website. Mobile first; system fonts only (no font downloads). */

:root {
  --purple: #3d3683;
  --purple-dark: #2c2763;
  --on-purple: #ffffff;
  --bg: #ffffff;
  --surface: #f4f3fa;
  --text: #1c1b29;
  --muted: #47455c;
  --border: #d6d3ea;
  --link: #3d3683;
  --radius: 12px;
  --wrap: 68rem;
  --read: 44rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121120;
    --surface: #1d1b30;
    --text: #ecebf5;
    --muted: #c4c2d8;
    --border: #3a3758;
    --link: #bdb7f5;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; }

a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

/* The focus ring takes the element's own text colour, so it has the same strong contrast as the text */
:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
  border-radius: 4px;
}
.hero :focus-visible { outline-color: var(--on-purple); }

main:focus { outline: none; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1rem;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--purple);
  color: var(--on-purple);
  font-weight: 600;
  border-radius: 0 0 8px 8px;
}
.skip-link:focus { top: 0; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding-top: 0.75rem;
  padding-bottom: 0.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 48px;
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 700;
  text-decoration: none;
}
.brand img { border-radius: 10px; }

.nav-list,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-list a,
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.6rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}
.nav-list a:hover,
.footer-links a:hover { text-decoration: underline; }
.nav-list a[aria-current="page"],
.footer-links a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 0.35em;
}

/* Page text */
main { display: block; }

.page {
  max-width: var(--read);
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

h1, h2, h3 { line-height: 1.25; }
h1 { font-size: 2rem; margin: 0 0 0.5rem; }
h2 { font-size: 1.45rem; margin: 2.25rem 0 0.75rem; }
h3 { font-size: 1.15rem; margin: 1.5rem 0 0.5rem; }
p, ul, ol { margin: 0 0 1rem; }
li { margin-bottom: 0.35rem; }

.lead { font-size: 1.2rem; color: var(--muted); }
.updated { color: var(--muted); font-size: 0.95rem; }

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem 0.5rem;
  margin: 1.5rem 0;
}
.toc h2 { font-size: 1.1rem; margin: 0 0 0.5rem; }

.note {
  background: var(--surface);
  border-left: 4px solid var(--purple);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}
@media (prefers-color-scheme: dark) {
  .note { border-left-color: var(--link); }
}
.note > :last-child { margin-bottom: 0; }

.example { color: var(--muted); font-style: italic; }

/* Tables: on phones each row becomes a small card, so nothing scrolls sideways */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.5rem;
  font-size: 1rem;
}
caption {
  text-align: left;
  font-weight: 700;
  padding-bottom: 0.5rem;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
thead th { background: var(--surface); }

@media (max-width: 36rem) {
  table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.stack tr {
    display: block;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    padding: 0.5rem 0.75rem;
  }
  table.stack th,
  table.stack td { display: block; border: 0; padding: 0.2rem 0; }
  table.stack th[scope="row"] { font-weight: 700; }
}

/* Partner Agreement */
.agreement { padding-left: 1.5rem; }
.agreement li { margin-bottom: 1rem; padding-left: 0.25rem; }

/* Steps */
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 2.75rem;
  margin-bottom: 1rem;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--purple);
  color: var(--on-purple);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Home */
.hero {
  background: var(--purple);
  color: var(--on-purple);
}
.hero-inner {
  padding: 2.5rem 1rem 2.75rem;
  max-width: var(--wrap);
  margin: 0 auto;
}
.hero h1 { font-size: 2.1rem; margin-bottom: 0.75rem; }
.hero p { font-size: 1.15rem; max-width: 40rem; }
.hero a { color: var(--on-purple); }
.pill {
  display: inline-block;
  background: var(--purple-dark);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  padding: 0.2rem 0.85rem;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.hero-links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 1.25rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  background: var(--on-purple);
  color: var(--purple);
}
.hero .button { color: var(--purple); }
.button.ghost { background: transparent; color: var(--on-purple); border: 2px solid var(--on-purple); }
.hero .button.ghost { color: var(--on-purple); }

.sections {
  display: grid;
  gap: 1.25rem;
  padding: 2rem 1rem 1rem;
  max-width: var(--wrap);
  margin: 0 auto;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 0.5rem;
}
.card h2 { margin-top: 0; }
.card ol, .card ul { padding-left: 1.25rem; }

.home-more {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 1rem 1rem 3rem;
}

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 2rem 0 2.5rem;
  font-size: 1rem;
}
.site-footer .updated { margin-bottom: 1rem; }
.footer-name { font-weight: 700; font-size: 1.15rem; margin-bottom: 0.25rem; }
.site-footer address { font-style: normal; margin-bottom: 1rem; }
.footer-note { color: var(--muted); }
.footer-links { margin-left: -0.6rem; }

@media (min-width: 48rem) {
  body { font-size: 1.0625rem; }
  h1 { font-size: 2.4rem; }
  .hero-inner { padding: 4rem 1rem; }
  .hero h1 { font-size: 2.8rem; }
  .sections { grid-template-columns: 1fr 1fr; padding-top: 2.5rem; }
}

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

@media print {
  .site-header nav, .skip-link, .footer-links { display: none; }
  a { color: inherit; }
}
