/* The Elegant Violin — one stylesheet, no frameworks, no imports, no web fonts.
   Type is the operating system's own: New York on Apple platforms, a serif
   fallback elsewhere. Colours are lifted from the Baryta app icon, which is
   itself drawn in code (Scripts/make-icon.swift): the sheet, the ink, the
   horizon. */

:root {
  color-scheme: light;

  /* Paper */
  --paper:       #f6f4ed; /* the icon's sheet, exactly */
  --paper-sunk:  #efece1;
  --rule:        #ded8ca;
  --rule-faint:  #e8e3d7;

  /* Ink */
  /* Every ink below clears WCAG AA (4.5:1) against --paper:
     ink 15.6:1 · ink-soft 6.2:1 · ink-faint 4.9:1 · accent 5.4:1 · lift 8.3:1 */
  --ink:         #201b2a; /* the darkest object in the icon's print */
  --ink-soft:    #5f5865;
  --ink-faint:   #6f6870;

  /* The horizon, brought down to where it can carry text.
     --horizon itself is decorative only — rules, marks, never type. */
  --accent:      #96521f;
  --accent-lift: #6f3a12;
  --horizon:     #e89c57;

  --measure: 34rem;
  --shell: 46rem;

  --serif: ui-serif, "New York", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui,
          "Segoe UI", Roboto, sans-serif;

  --step-0: clamp(1.0625rem, 1.02rem + 0.22vw, 1.1875rem);
  --step-1: clamp(1.25rem, 1.18rem + 0.35vw, 1.4375rem);
  --step-2: clamp(1.5rem, 1.36rem + 0.7vw, 1.9375rem);
  --step-3: clamp(2rem, 1.66rem + 1.7vw, 3rem);
}

* { box-sizing: border-box; }

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--step-0);
  line-height: 1.62;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* ---- Skeleton ------------------------------------------------------- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: clamp(1.375rem, 5vw, 2.75rem);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6em 1em;
  font-family: var(--sans);
  font-size: 0.9rem;
  z-index: 10;
}

.skip:focus {
  left: 0.5rem;
  top: 0.5rem;
}

/* ---- Masthead ------------------------------------------------------- */

.masthead {
  padding-block: clamp(2.25rem, 6vw, 3.75rem) 0;
}

.masthead__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  font-family: var(--serif);
  font-size: var(--step-1);
  font-weight: 400;
  font-variant-caps: small-caps;
  letter-spacing: 0.09em;
  margin: 0;
  line-height: 1.1;
}

.wordmark a {
  color: inherit;
  text-decoration: none;
  background: none;
}

.wordmark a:hover { color: var(--accent); }

.masthead nav {
  font-family: var(--sans);
  font-size: 0.815rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.masthead nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.masthead nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.masthead nav a:hover,
.masthead nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--horizon);
}

/* ---- Type ----------------------------------------------------------- */

main { padding-block: clamp(2.5rem, 7vw, 4.5rem) 0; }

h1, h2, h3 {
  font-weight: 400;
  line-height: 1.18;
  text-wrap: balance;
  margin: 0 0 0.7rem;
}

h1 {
  font-size: var(--step-3);
  letter-spacing: -0.018em;
  max-width: 18ch;
}

h2 {
  font-size: var(--step-2);
  letter-spacing: -0.012em;
}

h3 {
  font-size: var(--step-1);
  letter-spacing: -0.006em;
}

p, ul, ol, dl, blockquote, table { max-width: var(--measure); }

p { margin: 0 0 1.15em; }

.lede {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink);
  margin-top: 1.4rem;
  max-width: 32rem;
}

.quiet { color: var(--ink-soft); }

.small {
  font-family: var(--sans);
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 0.85rem;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

a:hover {
  color: var(--accent-lift);
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

strong, b { font-weight: 600; }

em, i { font-style: italic; }

code, .mono {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 0.88em;
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin-block: clamp(3rem, 8vw, 4.5rem);
}

/* ---- Sections ------------------------------------------------------- */

section { margin-block: clamp(3rem, 8vw, 4.75rem); }

section > h2 { margin-bottom: 1.1rem; }

.rule-over {
  padding-top: clamp(2.5rem, 7vw, 3.75rem);
  border-top: 1px solid var(--rule);
}

/* A rule above a heading needs air on the near side too; sections already have
   it from their own margin-block. */
h2.rule-over, h3.rule-over { margin-top: clamp(2.75rem, 7vw, 4rem); }

.tm {
  font-size: 0.46em;
  letter-spacing: 0.02em;
  vertical-align: 0.75em;
  margin-left: 0.06em;
}

/* ---- The product plate ---------------------------------------------- */

.plate {
  display: flex;
  align-items: center;
  gap: clamp(1.1rem, 4vw, 1.9rem);
  margin-bottom: 1.6rem;
}

.plate img {
  width: clamp(76px, 15vw, 108px);
  height: auto;
  flex: none;
}

.plate__title { margin: 0; }

.plate__sub {
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0.35rem 0 0;
  max-width: none;
}

/* ---- Claims --------------------------------------------------------- */

.claims {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  max-width: var(--measure);
  display: grid;
  gap: 1.9rem;
}

.claims h3 { margin-bottom: 0.4rem; }

.claims p { margin-bottom: 0; }

.claims p + p { margin-top: 0.7em; }

/* ---- The removal list ----------------------------------------------- */

.absences {
  list-style: none;
  margin: 1.5rem 0 1.75rem;
  padding: 1.4rem 1.5rem;
  background: var(--paper-sunk);
  border: 1px solid var(--rule-faint);
  border-radius: 3px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.55rem 1.5rem;
  font-family: var(--sans);
  font-size: 0.925rem;
  color: var(--ink-soft);
  max-width: var(--measure);
}

.absences li { position: relative; padding-left: 1.1rem; }

.absences li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--horizon);
}

/* ---- Notes and definition lists ------------------------------------- */

.note {
  border-left: 2px solid var(--horizon);
  padding: 0.1rem 0 0.1rem 1.15rem;
  margin: 1.75rem 0;
  max-width: var(--measure);
}

.note p:last-child { margin-bottom: 0; }

dl { margin: 1.5rem 0; }

dt {
  font-weight: 600;
  margin-top: 1.35rem;
}

dd {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
}

ul.prose, ol.prose { padding-left: 1.25rem; margin: 1.1rem 0 1.4rem; }

ul.prose li, ol.prose li { margin-bottom: 0.55rem; }

/* ---- Footer --------------------------------------------------------- */

.colophon {
  margin-top: clamp(4rem, 10vw, 6.5rem);
  padding-block: 1.6rem clamp(2.5rem, 6vw, 3.5rem);
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--ink-faint);
}

.colophon ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1.35rem;
  list-style: none;
  margin: 0 0 0.9rem;
  padding: 0;
  max-width: none;
}

.colophon a { color: var(--ink-soft); }

.colophon p { max-width: 40rem; margin: 0 0 0.45em; }

/* ---- Print ---------------------------------------------------------- */

@media print {
  :root { --paper: #fff; --ink: #000; }
  body { font-size: 11pt; }
  .masthead nav, .skip { display: none; }
  a { color: inherit; text-decoration: underline; }
  .absences, .note { border-color: #999; background: none; }
}
