/* layezal tech — site styles
   Vintage engineering-catalogue direction: Caslon type, engraved plates, aged paper.
   One stylesheet, no framework, all fonts self-hosted. */

@font-face { font-family: "Caslon Display"; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/libre-caslon-display-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Caslon Display"; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/libre-caslon-display-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

@font-face { font-family: "Caslon Text"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("/assets/fonts/libre-caslon-text-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Caslon Text"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("/assets/fonts/libre-caslon-text-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Caslon Text"; font-weight: 400; font-style: italic; font-display: swap;
  src: url("/assets/fonts/libre-caslon-text-latin-ext-400-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Caslon Text"; font-weight: 400; font-style: italic; font-display: swap;
  src: url("/assets/fonts/libre-caslon-text-latin-400-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Caslon Text"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("/assets/fonts/libre-caslon-text-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Caslon Text"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("/assets/fonts/libre-caslon-text-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  --paper: #f1e9d7;
  --paper-2: #ebe1cb;
  --ink: #1f2534;
  --ink-2: #4a4e58;
  --rule: #b3a586;
  --red: #8a2f23;

  --display: "Caslon Display", "Libre Caslon Display", Georgia, "Times New Roman", serif;
  --text: "Caslon Text", "Libre Caslon Text", Georgia, "Times New Roman", serif;

  --wrap: 74rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --space-section: clamp(4.5rem, 10vw, 8rem);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background-color: var(--paper);
  /* Fine paper grain + a soft vignette, generated — no image downloads. */
  background-image:
    linear-gradient(90deg, rgba(120,95,50,.07), rgba(120,95,50,0) 12%, rgba(120,95,50,0) 88%, rgba(120,95,50,.07)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .28 0 0 0 0 .15 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-variant-numeric: oldstyle-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { color: var(--red); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p { margin: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.skip { position: absolute; left: var(--gutter); top: -3rem; background: var(--ink); color: var(--paper); padding: .5rem .9rem; z-index: 10; text-decoration: none; }
.skip:focus { top: 1rem; color: var(--paper); }

/* Letter-spaced capitals: the catalogue's label voice. Used sparingly. */
.caps { font-family: var(--text); font-size: .74rem; letter-spacing: .22em; text-transform: uppercase; font-variant-numeric: lining-nums; }

/* Double rule, the backbone of the layout */
.rule-double { border: 0; height: 5px; margin: 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }

/* ---------- Masthead ---------- */
.masthead { padding-top: clamp(1.25rem, 3vw, 2rem); }
.masthead-top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; color: var(--ink-2); padding-bottom: .6rem; }
.masthead-top .caps:last-child { text-align: right; }
.masthead-name { text-align: center; padding-block: clamp(.9rem, 2.5vw, 1.4rem); }
.wordmark {
  font-family: var(--display); font-size: clamp(2.4rem, 6vw, 3.6rem); line-height: 1;
  text-decoration: none; color: var(--ink); letter-spacing: .005em;
}
.wordmark:hover { color: var(--ink); }
.nav { border-top: 1px solid var(--ink); border-bottom: 3px double var(--ink); }
.nav ul { display: flex; justify-content: center; flex-wrap: wrap; gap: .25rem clamp(1.25rem, 4vw, 3rem); list-style: none; margin: 0; padding: .7rem 0; }
.nav a { text-decoration: none; color: var(--ink); }
.nav a:hover { color: var(--red); }
@media (max-width: 36rem) { .masthead-top .hide-sm { display: none; } .masthead-top { justify-content: center; } }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(3rem, 8vw, 5.5rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero-kicker { color: var(--red); margin-bottom: 1.4rem; }
.hero h1 {
  font-family: var(--display);
  font-size: clamp(3rem, 7.2vw, 6rem);
  line-height: .98; letter-spacing: -.01em;
}
.hero .lede { margin-top: 1.6rem; max-width: 31rem; font-size: clamp(1.1rem, 1.5vw, 1.25rem); line-height: 1.6; color: var(--ink-2); }
.hero .lede strong { color: var(--ink); font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; margin-top: 2.2rem; }

.btn {
  display: inline-flex; align-items: center; min-height: 3rem; padding: .75rem 1.4rem;
  background: var(--ink); color: var(--paper); text-decoration: none;
  font-family: var(--text); font-size: .8rem; letter-spacing: .2em; text-transform: uppercase;
  outline: 1px solid var(--ink); outline-offset: 3px;
  transition: background-color .2s ease, outline-color .2s ease;
}
.btn:hover { background: var(--red); outline-color: var(--red); color: var(--paper); }
.link-quiet { font-style: italic; font-size: 1.05rem; text-decoration: underline; text-decoration-color: var(--rule); }
.link-quiet:hover { text-decoration-color: var(--red); }

/* Engraved plates */
.plate { margin: 0; }
.plate-frame {
  background: var(--paper-2);
  border: 1px solid var(--ink);
  padding: 6px;
  box-shadow: 0 1px 0 rgba(255,255,255,.5) inset;
}
.plate-frame > div { border: 1px solid var(--ink); padding: clamp(.6rem, 1.6vw, 1rem); background: var(--paper); }
.plate img { width: 100%; height: auto; mix-blend-mode: multiply; }
.plate figcaption { margin-top: .75rem; display: flex; justify-content: space-between; gap: 1rem; font-style: italic; color: var(--ink-2); font-size: .95rem; }
.plate figcaption .caps { font-style: normal; color: var(--ink); }

.hero .plate { animation: settle 1.1s ease-out both .15s; }
@keyframes settle { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hero .plate { animation: none; } }

@media (max-width: 56rem) { .hero-grid { grid-template-columns: 1fr; } .hero .plate { max-width: 40rem; } }

/* ---------- Section heads ---------- */
.section { padding-top: var(--space-section); }
.section-mark { display: flex; align-items: center; gap: 1rem; color: var(--ink-2); }
.section-mark::before, .section-mark::after { content: ""; flex: 1; border-top: 1px solid var(--rule); }
.section-mark span { white-space: nowrap; }
.section-head { text-align: center; max-width: 46rem; margin: 1.4rem auto 0; display: grid; gap: 1rem; }
.section-head h2 { font-family: var(--display); font-size: clamp(2.3rem, 5vw, 3.6rem); line-height: 1.05; }
.section-head p { color: var(--ink-2); font-size: 1.1rem; font-style: italic; }

/* ---------- About ---------- */
.about-body { margin-top: clamp(2.5rem, 5vw, 3.5rem); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); }
.about-body p { color: var(--ink-2); }
.about-body p.opening { color: var(--ink); font-size: 1.2rem; line-height: 1.65; }
.about-body p.opening::first-letter {
  font-family: var(--display); float: left; font-size: 4.6rem; line-height: .82;
  padding: .3rem .55rem 0 0; color: var(--red);
}
@media (max-width: 48rem) { .about-body { grid-template-columns: 1fr; } }

.focus { list-style: none; margin: clamp(2.5rem, 5vw, 3.5rem) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 3px double var(--ink); border-bottom: 1px solid var(--ink); }
.focus li { padding: 1.5rem 1.5rem 1.6rem; display: grid; gap: .5rem; align-content: start; }
.focus li + li { border-left: 1px solid var(--rule); }
.focus li:first-child { padding-left: 0; }
.focus li:last-child { padding-right: 0; }
.focus h3 { font-family: var(--display); font-size: 1.45rem; line-height: 1.15; }
.focus h3::before { content: "\2766"; color: var(--red); font-family: var(--text); font-size: 1rem; margin-right: .5rem; vertical-align: .1em; }
.focus p { color: var(--ink-2); font-size: 1rem; }
@media (max-width: 52rem) {
  .focus { grid-template-columns: 1fr; }
  .focus li, .focus li:first-child, .focus li:last-child { padding: 1.3rem 0; }
  .focus li + li { border-left: 0; border-top: 1px solid var(--rule); }
}

/* ---------- Products ---------- */
.products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 5vw, 4rem); margin-top: clamp(2.5rem, 5vw, 3.5rem); }
@media (max-width: 52rem) { .products { grid-template-columns: 1fr; } }

.product { display: grid; gap: 1.25rem; align-content: start; }
.product-wide { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; border-top: 3px double var(--ink); padding-top: clamp(2rem, 4vw, 3rem); }
.product-body { display: grid; gap: 1.25rem; align-content: start; }
@media (max-width: 52rem) { .product-wide { grid-template-columns: 1fr; } }
.product-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-top: .4rem; }
.product h3 { font-family: var(--display); font-size: clamp(2.3rem, 4vw, 3rem); line-height: 1; }
.product .meaning { margin-top: .45rem; font-style: italic; color: var(--ink-2); }
.product .desc { color: var(--ink); }
.product .desc-note { color: var(--ink-2); font-size: .97rem; font-style: italic; margin-top: .7rem; }
.tags { list-style: none; margin: 0; padding: .8rem 0 0; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; color: var(--ink-2); }

/* Rubber stamp for status */
.stamp {
  flex: none; display: inline-block; color: var(--red);
  border: 2px solid currentColor; outline: 1px solid currentColor; outline-offset: 2px;
  padding: .3rem .6rem .25rem; transform: rotate(-4deg); margin-top: .3rem;
  font-family: var(--text); font-weight: 700; font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; line-height: 1.2;
  white-space: nowrap; opacity: .92;
}
.stamp-quiet { color: var(--ink-2); transform: rotate(2deg); }

/* Experiments */
.experiments { margin-top: clamp(3.5rem, 7vw, 5rem); border-top: 3px double var(--ink); padding-top: clamp(2rem, 4vw, 2.75rem); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.experiments .plate { max-width: 22rem; }
.experiments-head h3 { font-family: var(--display); font-size: clamp(1.9rem, 3.4vw, 2.5rem); line-height: 1.05; }
.experiments-head p { color: var(--ink-2); font-style: italic; margin-top: .6rem; max-width: 36rem; }
.experiment-list { list-style: none; margin: 1.5rem 0 0; padding: 0; border-top: 1px solid var(--rule); }
.experiment-list li { padding-block: 1.2rem; border-bottom: 1px solid var(--rule); display: grid; gap: .4rem; }
.experiment-name { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.experiment-name h4 { font-family: var(--text); font-weight: 700; font-size: 1.1rem; }
.experiment-list p { color: var(--ink-2); }
@media (max-width: 52rem) { .experiments { grid-template-columns: 1fr; } }

/* ---------- Approach ---------- */
.approach-grid { margin-top: clamp(2.5rem, 5vw, 3.5rem); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.loop-diagram { width: 100%; max-width: 26rem; margin-inline: auto; height: auto; font-family: var(--display); }
.plate.loop-diagram-wrap figcaption { display: block; text-align: center; margin-top: .9rem; font-style: italic; color: var(--ink-2); font-size: .95rem; }
.steps { list-style: none; margin: 0; padding: 0; border-top: 3px double var(--ink); }
.steps li { display: grid; grid-template-columns: 3.2rem minmax(0, 1fr); gap: 1rem; padding-block: 1.25rem; border-bottom: 1px solid var(--rule); }
.steps .num { font-family: var(--display); font-size: 1.6rem; color: var(--red); line-height: 1.1; }
.steps h3 { font-family: var(--display); font-size: 1.7rem; line-height: 1.1; }
.steps p { color: var(--ink-2); margin-top: .25rem; }
@media (max-width: 56rem) { .approach-grid { grid-template-columns: 1fr; } }

/* ---------- Contact: a calling card ---------- */
.contact { padding-bottom: var(--space-section); }
.card {
  margin: clamp(2.5rem, 5vw, 3.5rem) auto 0; max-width: 46rem; text-align: center;
  background: var(--paper-2); border: 1px solid var(--ink); padding: 7px;
}
.card-inner { border: 1px solid var(--ink); padding: clamp(2rem, 6vw, 3.5rem) clamp(1rem, 4vw, 3rem); position: relative; background: var(--paper); }
.card-inner::before, .card-inner::after { content: "\2767"; position: absolute; top: .6rem; color: var(--red); font-size: 1rem; }
.card-inner::before { left: .8rem; transform: scaleX(-1); }
.card-inner::after { right: .8rem; }
.card .caps { color: var(--ink-2); }
.email {
  display: inline-block; margin-top: 1rem;
  font-family: var(--text); font-style: italic; font-size: clamp(1.3rem, 4.6vw, 2.5rem); line-height: 1.2;
  color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule); text-decoration-thickness: 1px; overflow-wrap: anywhere;
}
.email:hover { color: var(--red); text-decoration-color: var(--red); }
.card p { color: var(--ink-2); margin-top: 1rem; }

/* ---------- Footer ---------- */
.site-footer { padding-bottom: 2.5rem; }
.footer-inner { padding-top: 1.5rem; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 1rem 2rem; color: var(--ink-2); }
.footer-brand { display: flex; align-items: baseline; gap: 1.25rem; flex-wrap: wrap; }
.footer-brand .wordmark { font-size: 1.6rem; }
.site-footer ul { display: flex; gap: 1.75rem; list-style: none; margin: 0; padding: 0; }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { color: var(--red); text-decoration: underline; }

/* ---------- Text pages (privacy, 404) ---------- */
.page { padding-top: clamp(3rem, 8vw, 5rem); padding-bottom: var(--space-section); }
.page h1 { font-family: var(--display); font-size: clamp(2.8rem, 7vw, 4.6rem); line-height: 1; text-align: center; }
.page .updated { margin-top: 1rem; color: var(--ink-2); font-style: italic; text-align: center; }
.prose { max-width: 40rem; margin: clamp(2rem, 5vw, 3rem) auto 0; }
.prose h2 { font-family: var(--display); font-size: 1.6rem; margin-top: 2.2rem; margin-bottom: .5rem; }
.prose p, .prose li { color: var(--ink-2); }
.prose p + p { margin-top: .9rem; }
.prose a { color: var(--ink); }
.notfound .actions { justify-content: center; }

@media (max-width: 30rem) {
  .nav ul { gap: .25rem 1.1rem; }
  .nav .caps { letter-spacing: .13em; font-size: .7rem; }
}
