/* Skemat marketing site — "technical drawing sheet" design system.
   Palette, type scale and layout tokens taken from the harvested Figma file
   "Skemat — StudioApps / Drawing sheet". */

:root {
  --paper-bg: #F2F4F2;
  --navy: #062861;
  --blue: #0060FC;
  --sheet: #E9F0FB;
  --ink-2: #506174;
  --rule: #9EADB9;
  --amber: #F5CD75;
  --white: #FFFFFF;
  --font-disp: 'Archivo Black', 'Archivo', sans-serif;
  --font-body: 'Source Sans 3', 'Source Sans Pro', sans-serif;
  --font-mono: 'Roboto Mono', 'Courier New', monospace;
}

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

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

body {
  margin: 0;
  background: var(--paper-bg);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.5;
}

img, svg { display: block; }
svg text { user-select: none; }

a { color: inherit; }
a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.mono {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 16.5px;
  color: var(--ink-2);
  letter-spacing: 0;
}

.wrap { max-width: 1312px; margin: 0 auto; }

/* ---------- top navigation ---------- */

.topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 64px;
  background: var(--paper-bg);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  flex: 0 0 auto;
}
.brand svg { width: 44px; height: 40px; }
.brand-name {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 30px;
  line-height: 1;
  color: var(--navy);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-links a {
  font-size: 13px;
  font-weight: 700;
  line-height: 19.5px;
  text-decoration: none;
  color: var(--navy);
  white-space: nowrap;
}
.nav-links a:hover { text-decoration: underline; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  background: var(--blue);
  color: var(--white) !important;
  font-size: 13px;
  font-weight: 700;
  line-height: 13px;
  text-decoration: none !important;
  white-space: nowrap;
}
.btn:hover { background: #0053d6; }

/* phone menu (details/summary, no JS) */
.nav-phone { display: none; }
.nav-phone summary {
  list-style: none;
  font-size: 13px;
  font-weight: 700;
  line-height: 19.5px;
  color: var(--navy);
  cursor: pointer;
}
.nav-phone summary::-webkit-details-marker { display: none; }
.nav-phone .menu-panel {
  position: absolute;
  right: 24px;
  top: 84px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 220px;
  background: var(--white);
  border: 1px solid var(--navy);
}
.nav-phone .menu-panel a {
  padding: 14px 20px;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
  border-bottom: 1px solid var(--sheet);
}
.nav-phone .menu-panel a:last-child { border-bottom: 0; }
.nav-phone .menu-panel a.btn { border-radius: 0; min-height: 44px; }

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

.masthead {
  padding: 64px;
  background: var(--paper-bg);
}
.masthead .mono { margin: 0 0 24px; }
.masthead h1 {
  margin: 0 0 24px;
  max-width: 1100px;
  font-family: var(--font-disp);
  font-weight: 400;
  font-size: 64px;
  line-height: 70.4px;
  color: var(--navy);
}
.masthead .lede {
  margin: 0;
  max-width: 820px;
  font-size: 18px;
  line-height: 27px;
}

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

.hero {
  padding: 64px;
  background: var(--paper-bg);
}
.hero-inner {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}
.hero-margin {
  flex: 0 0 340px;
  max-width: 340px;
}
.hero-margin .mono { margin: 0 0 24px; }
.hero-margin h1 {
  margin: 0 0 24px;
  font-family: var(--font-disp);
  font-weight: 400;
  font-size: 48px;
  line-height: 52.8px;
}
.hero-margin p {
  margin: 0 0 24px;
  font-size: 18px;
  line-height: 27px;
}
.hero-sheet { flex: 1 1 auto; min-width: 0; }

/* ---------- drawing sheets / figures ---------- */

.sheet {
  background: var(--sheet);
  padding: 24px;
}
.sheet > .mono { margin: 0 0 24px; }
.sheet-plain { background: transparent; padding: 0; }

.dg { width: 100%; height: auto; border: 1px solid var(--rule); }
.dg-m { display: none; }

/* per-breakpoint text variants (Figma desktop vs phone copy) */
.x-m { display: none; }
.meta--col .x-d { display: none; }
.meta--col .x-m { display: inline; }

.sheet > * + * { margin-top: 24px; }
.fig-note { margin-top: 24px; }
.fig-h {
  margin: 0;
  font-family: var(--font-disp);
  font-weight: 400;
  font-size: 28px;
  line-height: 42px;
}
.code {
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 24px;
  white-space: normal;
}

.legend {
  display: flex;
  gap: 16px;
  margin: 24px 0;
}
.legend .mono { margin: 0; flex: 0 0 200px; }

.meta {
  background: var(--white);
  border: 1px solid var(--navy);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.meta .meta-id { flex: 0 0 120px; }
.meta .meta-id,
.meta .meta-rev {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 16.5px;
  color: var(--ink-2);
  white-space: pre-line;
}
.meta .meta-title {
  flex: 1 1 auto;
  font-size: 18px;
  line-height: 27px;
  color: var(--navy);
}
.meta .meta-rev { flex: 0 0 auto; text-align: left; }

.meta--col { flex-direction: column; align-items: flex-start; }
.meta--col .meta-title { order: 0; }

/* index rows (guide index / purpose index / page tabs) */

.index { margin: 0; }
.index-row {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 0 0 24px;
  margin-top: 25px;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: var(--navy);
}
a.index-row:hover .index-word { color: var(--blue); }
.index-num { flex: 0 0 50px; }
.index-word {
  font-family: var(--font-disp);
  font-weight: 400;
  font-size: 36px;
  line-height: 39.6px;
  flex: 1 1 auto;
  min-width: 0;
}
.index-desc {
  flex: 0 0 37%;
  font-size: 16px;
  line-height: 24px;
}

/* ---------- section rows (wide guide pages) ---------- */

.body-section {
  background: var(--white);
  padding: 64px;
}
.body-section > * + * { margin-top: 40px; }

.row {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.row + .row { margin-top: 80px; }
.row h2 {
  flex: 0 0 390px;
  margin: 0;
  font-family: var(--font-disp);
  font-weight: 400;
  font-size: 28px;
  line-height: 42px;
}
.row p {
  flex: 1 1 auto;
  margin: 0;
  max-width: 900px;
  font-size: 18px;
  line-height: 27px;
}

/* ---------- margin notes + specimen split ---------- */

.split {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}
.notes { flex: 0 0 450px; max-width: 450px; }
.note { margin: 0 0 28px; }
.note .mono { margin: 0 0 28px; }
.note h2 {
  margin: 0 0 28px;
  font-family: var(--font-disp);
  font-weight: 400;
  font-size: 28px;
  line-height: 42px;
}
.note p { margin: 0; font-size: 18px; line-height: 27px; }
.note-rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0 0 28px;
}
.specimen { flex: 1 1 auto; min-width: 0; }

/* small white note cards inside sheets */

.spec-card {
  background: var(--white);
  border: 1px solid var(--rule);
  padding: 20px;
}
.spec-card .mono { margin: 0 0 12px; }
.spec-card p { margin: 0; font-size: 18px; line-height: 27px; }
.spec-card + .spec-card,
.spec-card + .dg, .dg + .spec-card,
.spec-card + .fig, .fig + .spec-card { margin-top: 24px; }

/* comparison cards (best-practice) — stacked per Figma */

.compare {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.cmp-card { padding: 20px; background: var(--white); }
.cmp-card h2 {
  margin: 0 0 20px;
  font-family: var(--font-disp);
  font-weight: 400;
  font-size: 28px;
  line-height: 42px;
}
.cmp-card p { margin: 0; font-size: 18px; line-height: 27px; }
.cmp-amber { background: var(--amber); }

/* editor anatomy row: note | canvas | note */

.anatomy {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.anatomy .spec-card { flex: 0 0 160px; }
.anatomy .dg { flex: 1 1 auto; min-width: 0; }

/* ---------- home editorial ---------- */

.prose-section {
  background: var(--paper-bg);
  padding: 64px;
}
.prose-block h2 {
  margin: 0 0 40px;
  font-family: var(--font-disp);
  font-weight: 400;
  font-size: 36px;
  line-height: 39.6px;
}
.prose-block p { margin: 0 0 40px; max-width: 800px; font-size: 18px; line-height: 27px; }
.prose-rule { border: 0; border-top: 1px solid var(--rule); margin: 0 0 40px; }

.index-section {
  background: var(--white);
  padding: 64px;
}
.index-section > .wrap > .mono { margin: 0 0 32px; }

/* ---------- technical context band ---------- */

.tech {
  background: var(--sheet);
  padding: 64px;
}
.tech .mono { margin: 0 0 16px; }
.tech p {
  margin: 0 0 16px;
  max-width: 1312px;
  font-size: 16px;
  line-height: 24px;
}
.tech .src { margin: 0; }
.tech .src a {
  color: var(--ink-2);
  text-decoration: none;
  word-break: break-all;
}
.tech .src a:hover { text-decoration: underline; }

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

.site-footer {
  background: var(--navy);
  color: var(--white);
  padding: 64px;
}
.site-footer .foot-h {
  margin: 0 0 32px;
  font-family: var(--font-disp);
  font-weight: 400;
  font-size: 64px;
  line-height: 70.4px;
  color: var(--white);
}
.foot-rule { border: 0; border-top: 1px solid var(--ink-2); margin: 32px 0; }
.foot-links {
  margin: 0 0 32px;
  font-size: 13px;
  line-height: 19.5px;
}
.foot-links a { color: var(--white); text-decoration: none; }
.foot-links a:hover { text-decoration: underline; }
.foot-links .sep { color: var(--white); padding: 0 4px; }
.foot-note {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 16.5px;
  color: var(--sheet);
}

/* ---------- responsive: phone ---------- */

@media (max-width: 1000px) {
  body { font-size: 16px; }

  .topbar { padding: 24px; }
  .brand svg { width: 34px; height: 31px; }
  .brand-name { font-size: 22px; }
  .nav-links { display: none; }
  .nav-phone { display: block; position: static; }

  .masthead { padding: 24px; }
  .masthead .mono { margin-bottom: 16px; }
  .masthead h1 { font-size: 36px; line-height: 39.6px; margin-bottom: 24px; }

  .hero { padding: 24px; }
  .hero-inner { flex-direction: column; gap: 40px; }
  .hero-margin { flex: none; max-width: none; }
  .hero-margin h1 { font-size: 48px; line-height: 52.8px; }
  .hero-sheet { width: 100%; }

  .dg-d { display: none; }
  .dg-m { display: block; }
  .x-d { display: none; }
  .x-m { display: inline; }

  .legend { flex-direction: column; gap: 8px; }
  .legend .mono { flex-basis: auto; }

  .meta { flex-direction: column; align-items: flex-start; gap: 16px; }

  .index-row { flex-direction: column; gap: 10px; }
  .index-num { flex-basis: auto; }
  .index-word { font-size: 28px; line-height: 30.8px; }
  .index-desc { flex-basis: auto; }

  .body-section { padding: 24px; }
  .body-section > * + * { margin-top: 40px; }
  .row { flex-direction: column; gap: 24px; padding-bottom: 40px; border-bottom: 1px solid var(--rule); }
  .row + .row { margin-top: 40px; }
  .row h2 { flex-basis: auto; }

  .split { flex-direction: column; gap: 48px; }
  .notes { flex: none; max-width: none; }
  .anatomy { flex-direction: column; }
  .anatomy .spec-card { flex: none; }
  .anatomy .dg { width: 100%; }
  .compare { flex-direction: column; }

  .prose-section { padding: 24px; }
  .prose-block h2 { font-size: 28px; line-height: 30.8px; }

  .index-section { padding: 24px; }

  .tech { padding: 24px; }

  .site-footer { padding: 24px; }
  .site-footer .foot-h { font-size: 36px; line-height: 39.6px; }
}
