/*
Theme Name: Sanfan Sil
Theme URI: https://sanfansil.com/
Author: Sanfan
Description: Product site for polysilazane resins: a catalogue, eight application fields, and the documents a buyer asks for.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: sanfan
*/

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  font-feature-settings: "kern" 1;
  font-variant-numeric: tabular-nums; /* figures line up in the tables and the data labels */
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
hr { border: 0; border-top: var(--rule); margin: var(--space-5) 0; }

/* ---------- type ---------- */
h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -.015em;
  margin: 0 0 var(--space-3);
  text-wrap: balance;
}
/* The two top levels carry the same sans as the copy, a step heavier and tighter; cards, labels
   and body text stay at 400. */
h1, h2 { font-family: var(--font-display); font-weight: 500; letter-spacing: -.022em; line-height: 1.1; }
h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
p, ul, ol, dl, blockquote, table { margin: 0 0 var(--space-3); }
p:last-child, ul:last-child, ol:last-child { margin-bottom: 0; }
ul, ol { padding-left: 1.15em; }
li { margin-bottom: var(--space-1); }
strong { font-weight: 600; }
code, kbd, samp, .sf-num { font-family: var(--font-mono); font-size: .92em; font-variant-numeric: tabular-nums; }
blockquote { border-left: 2px solid var(--accent); padding-left: var(--space-3); color: var(--ink-soft); }

/* ---------- layout helpers ---------- */
.sf-wrap { width: 100%; max-width: var(--wide); margin-inline: auto; padding-inline: var(--space-4); }
.sf-wrap--narrow { max-width: var(--narrow); }
.sf-section { padding-block: var(--space-6); }
.sf-section--tight { padding-block: var(--space-5); }
.sf-section--surface { background: var(--surface); border-block: var(--rule); }
.sf-section--ink { background: var(--ink); color: #e8edf0; }
.sf-section--ink a { color: #bfe0dd; }
.sf-stack > * + * { margin-top: var(--space-3); }
.sf-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 var(--space-2);
}
.sf-lede { font-size: var(--step-1); color: var(--ink-soft); max-width: var(--measure); }
.sf-prose { max-width: var(--measure); }
.sf-prose > * + * { margin-top: var(--space-3); }
.sf-muted { color: var(--muted); }
.sf-small { font-size: var(--step--1); }
.sf-grid { display: grid; gap: var(--space-4); }
.sf-grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.sf-grid--3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.sf-grid--4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.sf-split { display: grid; gap: var(--space-5); grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
@media (max-width: 900px) { .sf-split { grid-template-columns: 1fr; } }

/* ---------- buttons ---------- */
.sf-btn {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-2);
  padding: .72em 1.15em;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: var(--paper);
  color: var(--ink);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.sf-btn:hover { border-color: var(--ink); color: var(--ink); }
.sf-btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.sf-btn--primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }
.sf-btn--ghost { background: transparent; }
.sf-btn__meta { font-family: var(--font-mono); font-size: var(--step--2); color: inherit; opacity: .65; }

/* ---------- figures and image slots ---------- */
.sf-figure { margin: 0; }
.sf-figure img { width: 100%; border-radius: var(--radius); }
.sf-figure figcaption { font-size: var(--step--1); color: var(--muted); margin-top: var(--space-2); }
.sf-figure--empty {
  aspect-ratio: var(--slot-ratio, 4 / 3);
  display: grid;
  place-items: center;
  background: var(--slot-bg);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: var(--space-3);
}
.sf-figure__slot {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .04em;
  color: var(--slot-ink);
  text-align: center;
  text-transform: uppercase;
}

/* ---------- cards ---------- */
.sf-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4);
  border: var(--rule);
  border-radius: var(--radius);
  background: var(--paper);
}
.sf-card:hover { border-color: var(--line-strong); }
.sf-card__title { margin: 0; font-size: var(--step-1); }
.sf-card__meta { margin: 0; font-family: var(--font-mono); font-size: var(--step--2); color: var(--muted); letter-spacing: .02em; }
.sf-card__body { margin: 0; color: var(--ink-soft); font-size: var(--step--1); }
a.sf-card { text-decoration: none; color: inherit; }

/* ---------- tables ---------- */
.sf-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sf-table { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.sf-table caption { text-align: left; font-size: var(--step--1); color: var(--muted); padding-bottom: var(--space-2); }
.sf-table th, .sf-table td { text-align: left; padding: .68em .75em; border-bottom: var(--rule); vertical-align: top; }
.sf-table thead th {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
.sf-table tbody tr:hover { background: var(--surface); }
.sf-table td.sf-num, .sf-table th.sf-num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sf-table--spec th[scope="row"] { font-weight: 500; width: 34%; }
.sf-table .sf-method { color: var(--muted); font-family: var(--font-mono); font-size: var(--step--2); }

/* ---------- fact list ---------- */
.sf-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--space-3); margin: 0; }
.sf-fact dt {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.sf-fact dd { margin: var(--space-1) 0 0; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---------- tags, notes, lists ---------- */
.sf-tag {
  display: inline-block;
  padding: .18em .5em;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.sf-note { padding: var(--space-3); border-left: 2px solid var(--accent); background: var(--accent-soft); font-size: var(--step--1); }
.sf-rule-list { list-style: none; padding: 0; margin: 0; }
.sf-rule-list li { padding: var(--space-2) 0; border-bottom: var(--rule); margin: 0; }
.sf-rule-list li:first-child { border-top: var(--rule); }

/* ---------- forms ---------- */
.sf-field { display: flex; flex-direction: column; gap: var(--space-1); margin-bottom: var(--space-3); }
.sf-field > label { font-size: var(--step--1); font-weight: 500; }
.sf-field .sf-req { color: var(--signal); }
input[type="text"], input[type="email"], input[type="tel"], input[type="url"], select, textarea {
  font: inherit;
  font-size: var(--step-0);
  color: var(--ink);
  padding: .6em .7em;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: var(--paper);
  width: 100%;
}
textarea { min-height: 7rem; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: 2px solid var(--accent-soft); }
[data-status] { font-size: var(--step--1); color: var(--ink-soft); }
[data-status]:empty { display: none; }

/* ---------- accessibility ---------- */
.sf-skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: var(--space-2) var(--space-3);
}
.sf-skip:focus { left: var(--space-3); top: var(--space-2); }
.sf-visually-hidden {
  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) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
