/* PartialString / Different Instruments — paper-style site
   Palette and type lifted from the plugin GUI:
   paper #f8f0e3, ink black, rust rgb(139,46,22), green rgb(63,155,11),
   Latin Modern Roman throughout. */

@font-face {
  font-family: "LM Roman";
  src: url("fonts/lmroman10-regular-webfont.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "LM Roman";
  src: url("fonts/lmroman10-italic-webfont.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "LM Roman";
  src: url("fonts/lmroman10-bold-webfont.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "LM Roman";
  src: url("fonts/lmroman10-bolditalic-webfont.ttf") format("truetype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #f8f0e3;
  --ink: #191510;
  --ink-faint: rgba(25, 21, 16, 0.35);
  --rule: rgba(25, 21, 16, 0.28);
  --rust: #8b2e16;
  --green: #3f9b0b;
  --highlight: #ddd2ba;
  --highlight-soft: #eae1cd;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: "LM Roman", "Times New Roman", Georgia, serif;
  font-size: 19px;
  line-height: 1.55;
  /* faint paper grain, like the plugin's background texture */
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="240" height="240"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="2" stitchTiles="stitch"/><feColorMatrix type="matrix" values="0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.05 0"/></filter><rect width="240" height="240" filter="url(%23n)"/></svg>');
}

main, .masthead, .footer {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--rust); }

/* ---- masthead ---------------------------------------------------------- */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 28px;
  padding-bottom: 12px;
  border-bottom: 1.5px solid var(--ink);
}

.brand-name {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-logo { height: 60px; width: auto; display: block; }

.masthead-nav { display: flex; gap: 22px; font-style: italic; }
.masthead-nav a { text-decoration: none; }
.masthead-nav a:hover { text-decoration: underline; }

/* ---- hero -------------------------------------------------------------- */

.hero { text-align: center; padding-top: 56px; }

.hero-kicker {
  margin: 0;
  font-style: italic;
  color: var(--ink);
  opacity: 0.75;
}

.hero-title {
  margin: 6px 0 10px;
  font-weight: 700;
  font-style: italic;
  font-size: clamp(3rem, 9vw, 5.2rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.hero-subtitle {
  margin: 0 0 6px;
  font-size: 1.35rem;
}

.hero-meta {
  margin: 0 0 30px;
  font-size: 0.95rem;
  opacity: 0.75;
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 54px;
}

/* buttons echo the plugin's outlined, paper-hover buttons */
.button {
  display: inline-block;
  padding: 10px 22px;
  border: 1.5px solid var(--ink);
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  font-size: 1rem;
  transition: background-color 120ms ease;
}
.button:hover { background-color: var(--highlight); color: var(--ink); }
.button-primary { background-color: var(--highlight-soft); font-weight: 700; }
.button-primary:hover { background-color: var(--highlight); }

/* ---- figures ----------------------------------------------------------- */

.figure { margin: 0 0 48px; }

.figure svg { width: 100%; height: auto; display: block; }
.figure-string svg { cursor: pointer; }

.fig-label {
  font-family: "LM Roman", serif;
  font-style: italic;
  font-size: 17px;
  fill: var(--ink);
}

.figure img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--rule);
  box-shadow: 0 10px 30px rgba(25, 21, 16, 0.12);
  background: var(--highlight-soft);
  min-height: 120px;
}

.figure figcaption {
  margin-top: 14px;
  font-size: 0.9rem;
  text-align: center;
  opacity: 0.8;
}

/* graceful placeholder until assets/partialstring-gui.png exists */
.figure.missing img { display: none; }
.figure.missing::before {
  content: "[ plugin screenshot — export to assets/partialstring-gui.png ]";
  display: block;
  padding: 120px 24px;
  border: 1px dashed var(--rule);
  text-align: center;
  font-style: italic;
  opacity: 0.6;
}

.fig-no { font-weight: 700; }
.legend-rust { color: var(--rust); }

/* ---- rules & sections --------------------------------------------------- */

.rule {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 0;
}

.rule-heavy { border-top: 1.5px solid var(--ink); }

section { padding: 52px 0; }

h2 {
  font-style: italic;
  font-weight: 700;
  font-size: 1.6rem;
  text-align: center;
  margin: 0 0 26px;
}

/* ---- abstract ----------------------------------------------------------- */

/* numbered subsection headings, LaTeX-style: bold, upright, left-aligned
   within the text column. Usage: <h3><span class="sub-no">2</span>Heading</h3> */
.abstract h3 {
  max-width: 640px;
  margin: 1.8em auto 0.7em;
  font-size: 1.12rem;
  font-weight: 700;
  font-style: normal;
  text-align: left;
}

.abstract h3 .sub-no {
  display: inline-block;
  min-width: 1.6em; /* aligns heading text after the number, like LaTeX */
}

/* GUI screenshot sitting within the About section: match the text column width */
.abstract-figure { max-width: 640px; margin-left: auto; margin-right: auto; }

.abstract p {
  max-width: 640px;
  margin: 0 auto 1.2em;
  text-align: justify;
  hyphens: auto;
}

.abstract-footnote {
  font-size: 0.92rem;
  font-style: italic;
  text-align: center !important;
  opacity: 0.85;
}

/* ---- download ------------------------------------------------------------ */

.download { text-align: center; }

.download-note { margin: 0 0 26px; font-style: italic; }

.download-cta { margin: 0 0 40px; }
.download-cta .button { font-size: 1.15rem; padding: 13px 30px; }

.platforms {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  text-align: center;
}

.platform {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 24px 18px 22px;
  border: 1px solid var(--rule);
}

.platform-name { font-weight: 700; font-size: 1.35rem; font-style: italic; }
.platform-formats { font-size: 0.95rem; }
.platform-req { font-size: 0.83rem; opacity: 0.7; }

/* push the download button to the bottom so buttons align across cards
   even when a platform's requirements text wraps to two lines */
.platform { gap: 8px; }
.platform-button { margin-top: auto; }
.platform-req { margin-bottom: 8px; }

.download-fineprint {
  margin-top: 36px;
  font-size: 0.78rem;
  opacity: 0.6;
}

/* ---- footer --------------------------------------------------------------- */

.footer { padding-bottom: 40px; }
.footer p { font-size: 0.9rem; text-align: center; opacity: 0.8; }

/* ---- small screens --------------------------------------------------------- */

@media (max-width: 680px) {
  body { font-size: 17px; }
  .platforms { grid-template-columns: 1fr; }
  .masthead { flex-direction: column; align-items: center; gap: 6px; }
}
