/* Yamein — shared styles */

/* Fonts are subset, self-hosted and preloaded, so "block" means no visible
   fallback-font flash on the wordmark; the block period is only a few ms. */
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: block; src: url("/fonts/InstrumentSerif-Regular.woff2") format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: block; src: url("/fonts/InstrumentSerif-Italic.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400; font-display: block; src: url("/fonts/InstrumentSans-400.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 500; font-display: block; src: url("/fonts/InstrumentSans-500.woff2") format("woff2"); }

:root {
  --paper: #F4F3EF;
  --ink: #141418;
  --muted: #6B6B70;
  --rule: #D6D4CE;
  --gutter: clamp(20px, 3.9vw, 56px);
}

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

html {
  background: var(--paper);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.45;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

address { font-style: normal; }

/* Text is display, not reading material (owner, 30 Oct): nothing can be selected except what a visitor may need to
   copy, the legal text and the contact details (the .prose blocks on /privacy/, /terms/ and /contact/), and even
   there not the headings. Form fields stay selectable so typing works on iOS. */
body { -webkit-user-select: none; user-select: none; }
.prose { -webkit-user-select: text; user-select: text; }
.prose h2, .prose h3 { -webkit-user-select: none; user-select: none; }
input, textarea { -webkit-user-select: text; user-select: text; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--muted); }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

.skip {
  position: absolute; left: var(--gutter); top: -100px;
  padding: 8px 12px; background: var(--ink); color: var(--paper); font-size: 14px; z-index: 10;
}
.skip:focus { top: 12px; color: var(--paper); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Inline links inside body copy (hero, About, Studios lede) */
.hero-foot p a, .section .body a, .intro .lede p a { border-bottom: 1px solid var(--rule); }
.hero-foot p a:hover, .section .body a:hover, .intro .lede p a:hover { color: var(--muted); }

/* First screen: header + hero fill the viewport.
   svh (not dvh): dvh changes as mobile browser bars collapse, which re-lays out
   the bottom-aligned hero on every scroll frame and reads as jank. */

.screen {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 32px var(--gutter) 0;
  font-size: 15px;
}
.site-header .brand { font-weight: 500; }
.site-header nav { display: flex; gap: clamp(20px, 2.8vw, 40px); }

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: clamp(32px, 6vh, 72px);
  padding: 0 var(--gutter) 48px;
}

.wordmark {
  margin: 0;
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(88px, 25.8vw, 372px);
  line-height: 0.86;
  letter-spacing: -0.03em;
  margin-left: -0.04em;
  user-select: none;
  -webkit-user-select: none;
}
.wordmark em { font-style: italic; }

.hero-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
}
.hero-foot p {
  margin: 0;
  max-width: 30em;
  font-size: clamp(17px, 1.35vw, 19px);
}
.hero-foot .meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

/* Sections below the first screen (About) */

.section {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--gutter);
  padding: 40px var(--gutter) 72px;
  border-top: 1px solid var(--rule);
}
.section h2 {
  margin: 0;
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(40px, 4.2vw, 60px);
  line-height: 1;
  letter-spacing: -0.02em;
}
.section .body { display: flex; flex-direction: column; gap: 22px; }
.section .body p { margin: 0; max-width: 30em; font-size: clamp(17px, 1.35vw, 19px); }

/* Studios: intro + list */

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--gutter);
  align-items: end;
}
.intro .wordmark { font-size: clamp(72px, 10.3vw, 148px); line-height: 0.9; }
.intro .lede { display: flex; flex-direction: column; gap: 22px; }
.intro .lede p { margin: 0; max-width: 26em; font-size: clamp(17px, 1.35vw, 19px); }

.list { display: flex; flex-direction: column; font-size: 16px; }
.list .row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--rule);
}
.list .row:last-child { border-bottom: 1px solid var(--rule); }
.list .row span:last-child { color: var(--muted); white-space: nowrap; }
.list a.row:hover { color: var(--muted); }
.list.detail .row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 24px; padding: 14px 0; }
.list.detail .row h2, .list.detail .row h3 { margin: 0; font: inherit; font-weight: 500; }
.list.detail .row h3 a { border-bottom: 1px solid var(--rule); }
.list.detail .row h3 a:hover { color: var(--muted); }
.list.detail .row span:last-child { white-space: normal; }
.list.detail .row span:last-child a { color: var(--ink); border-bottom: 1px solid var(--rule); }
.list.detail .row span:last-child a:hover { color: var(--muted); }

/* Footer */

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 32px;
  padding: 24px var(--gutter) 28px;
  border-top: 1px solid var(--rule);
  font-size: 14px;
  color: var(--muted);
}
/* The logo matches the Studios footer (owner, 30 Oct): the Apple-style lockup, refined symbol + "Yamein" in Inter Display
   SemiBold, outlined, with the chrome gradient in its light colors (steel to ink). */
.site-footer .site-logo { display: block; flex: none; width: 152px; height: auto; }
.site-footer-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px clamp(20px, 3vw, 40px); }
.site-footer .links { display: flex; gap: clamp(16px, 2vw, 28px); flex-wrap: wrap; }

/* Legal pages */

.doc {
  flex: 1;
  padding: clamp(56px, 10vh, 120px) var(--gutter) 96px;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--gutter);
}
.doc h1 {
  margin: 0;
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(44px, 5vw, 72px);
  line-height: 1;
  letter-spacing: -0.02em;
}
.doc .updated { display: block; margin-top: 16px; font-size: 14px; color: var(--muted); }
.prose { max-width: 34em; font-size: 17px; }
.prose h2 { margin: 36px 0 10px; font-size: 17px; font-weight: 500; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose address { margin: 0 0 14px; }
.prose ul { margin: 0 0 14px; padding-left: 1.2em; }
.prose li { margin-bottom: 6px; }
.prose a { border-bottom: 1px solid var(--rule); }

/* Small screens */

@media (max-width: 720px) {
  .hero-foot { flex-direction: column; align-items: flex-start; }
  .hero-foot .meta { text-align: left; }
  .section { grid-template-columns: minmax(0, 1fr); padding-bottom: 56px; }
  .intro { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .doc { grid-template-columns: minmax(0, 1fr); }
  .list.detail .row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .site-footer { flex-direction: column; align-items: flex-start; gap: 20px; }
  .site-footer-meta { flex-direction: column; gap: 12px; }
}

@media (prefers-reduced-motion: no-preference) {
  a { transition: color 120ms ease; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
