/* Baimo Aibai — editorial studio site. Black, ivory, one ink wash. */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/fraunces-latin.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: "Fraunces";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/fraunces-latin-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: "Source Sans 3";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/source-sans-3-latin.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: "Noto Sans SC Subset";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/noto-sans-sc-subset.woff2") format("woff2");
  unicode-range: U+4E8C, U+5143, U+516C, U+533A, U+534E, U+5355, U+53F7-53F8, U+5733, U+57CE, U+58A8, U+5E02, U+6280, U+6708-6709, U+6842, U+6DF1, U+767D, U+7691, U+793E, U+798F, U+79D1, U+7AE0, U+8857, U+8DEF, U+9053, U+9601, U+9650, U+9F99;
}

:root {
  --ink: #0c0b0a;
  --ivory: #f4f0e8;
  --paper: #f7f3ec;
  --wash: #101820;
  --wash-soft: #24344c;
  --muted: #5c564e;
  --muted-on-dark: #c8c0b4;
  --cinnabar: #8c2f2a;
  --serif: "Fraunces", "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", sans-serif;
  --cjk: "Noto Sans SC Subset", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --max: 76rem;
  --gutter: clamp(1.15rem, 4vw, 2.75rem);
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

img,
svg {
  max-width: 100%;
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

a {
  color: inherit;
  text-underline-offset: 0.18em;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--cinnabar);
  outline-offset: 3px;
}

::selection {
  background: #e7d3c4;
  color: var(--ink);
}

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: 0.6rem;
  transform: translateY(-160%);
  z-index: 80;
  background: var(--ivory);
  color: var(--ink);
  text-decoration: none;
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
}

.skip:focus {
  transform: none;
}

.wrap {
  width: min(var(--max), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

.zh {
  font-family: var(--cjk);
  font-style: normal;
  font-weight: 400;
  font-synthesis: none;
  letter-spacing: 0.04em;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--ink);
  color: var(--ivory);
}

.site-header[data-header="dark"] {
  background: var(--paper);
  color: var(--ink);
}

.site-header[data-header="wash"] {
  background: var(--wash);
  color: var(--ivory);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

.brand {
  color: inherit;
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 560;
  font-variation-settings: "SOFT" 50;
  font-optical-sizing: auto;
  font-size: 1.35rem;
  letter-spacing: -0.015em;
  line-height: 1;
}

.brand:hover {
  color: inherit;
}

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

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 0.2rem;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}

.label-close {
  display: none;
}

.nav-check:focus-visible + .nav-toggle {
  outline: 2px solid var(--cinnabar);
  outline-offset: 3px;
}

.nav-check:checked + .nav-toggle .label-open {
  display: none;
}

.nav-check:checked + .nav-toggle .label-close {
  display: inline;
}

.site-nav ul {
  display: flex;
  gap: 1.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.62;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  opacity: 1;
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
  }

  .nav-check:checked ~ .site-nav {
    display: block;
    position: fixed;
    z-index: 30;
    inset: 4.25rem 0 0 0;
    background: var(--ink);
    color: var(--ivory);
    padding: 1.5rem var(--gutter) 2rem;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0.35rem;
  }

  .site-nav a {
    display: block;
    padding: 0.35rem 0;
    font-family: var(--serif);
    font-size: clamp(2.4rem, 12vw, 3.4rem);
    font-weight: 560;
    font-variation-settings: "SOFT" 58;
    letter-spacing: -0.015em;
    text-transform: none;
    line-height: 1.08;
    opacity: 1;
  }
}

/* Grounds */

.ground-ink {
  background: var(--ink);
  color: var(--ivory);
}

.ground-paper {
  background: var(--paper);
  color: var(--ink);
}

.ground-wash {
  background:
    radial-gradient(900px 520px at 12% 80%, rgba(36, 52, 76, 0.95), transparent 70%),
    var(--wash);
  color: var(--ivory);
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.72;
}

.display {
  font-family: var(--serif);
  font-weight: 560;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 58;
  letter-spacing: -0.018em;
  line-height: 1.02;
  text-wrap: balance;
}

.display em {
  font-style: italic;
  font-weight: 560;
}

.lede,
.quiet {
  max-width: 36rem;
  font-size: 1.05rem;
  line-height: 1.55;
}

.ground-ink .quiet,
.ground-wash .quiet {
  color: var(--muted-on-dark);
}

.ground-paper .quiet {
  color: var(--muted);
}

.text-link {
  display: inline-block;
  margin-top: 1.4rem;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 0.15rem;
}

.text-link:hover {
  color: var(--cinnabar);
  border-bottom-color: var(--cinnabar);
}

.ground-ink .text-link:hover,
.ground-wash .text-link:hover {
  color: var(--ivory);
  border-bottom-color: var(--ivory);
}

/* Home */

.hero {
  min-height: calc(100vh - 4.25rem);
  min-height: calc(100dvh - 4.25rem);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2.5rem 0 2.4rem;
}

.hero .display {
  font-size: clamp(3.7rem, 12.4vw, 10.5rem);
  max-width: 14ch;
}

.hero .lede {
  margin-top: 1.6rem;
  max-width: 28rem;
  color: var(--muted-on-dark);
}

.hero .legal-name {
  margin-top: 1.6rem;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  opacity: 0.72;
}

.name-field {
  min-height: 92vh;
  min-height: 92dvh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 6.5rem 0 4rem;
}

.name-field .display {
  font-size: clamp(3.1rem, 8.6vw, 7.4rem);
  max-width: 12ch;
}

.name-field .display .zh {
  font-size: 0.78em;
}

.name-field .quiet {
  margin-top: 1.5rem;
  max-width: 24rem;
  font-size: 1.15rem;
}

.sheet {
  padding: clamp(4.5rem, 12vw, 8rem) 0;
}

.sheet-title {
  font-size: clamp(4rem, 12vw, 9rem);
  max-width: 8ch;
  margin-bottom: clamp(2rem, 6vw, 4rem);
}

.studio {
  list-style: none;
  margin: 0;
  padding: 0;
}

.studio a,
.studio .row {
  display: grid;
  grid-template-columns: minmax(8rem, 0.38fr) minmax(0, 1fr);
  gap: 1.5rem 2.5rem;
  align-items: baseline;
  padding: 1.6rem 0 1.8rem;
  border-top: 1px solid rgba(12, 11, 10, 0.16);
  text-decoration: none;
  color: inherit;
}

.studio li:last-child a,
.studio li:last-child .row {
  border-bottom: 1px solid rgba(12, 11, 10, 0.16);
}

.studio-name {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  font-weight: 560;
  font-variation-settings: "SOFT" 58;
  letter-spacing: -0.015em;
  line-height: 1.05;
}

.studio-line {
  color: var(--muted);
  max-width: 36rem;
}

.studio a:hover .studio-name {
  color: var(--cinnabar);
}

.aside-note {
  padding: clamp(4.5rem, 12vh, 8rem) 0;
}

.aside-note .display {
  font-size: clamp(2.4rem, 5.5vw, 4.6rem);
  max-width: 16ch;
  line-height: 1.08;
}

/* Interior */

.page-open {
  padding: clamp(5rem, 14vh, 8.5rem) 0 clamp(3rem, 8vh, 5rem);
}

.page-open .display {
  font-size: clamp(4.2rem, 13vw, 9.5rem);
  max-width: 10ch;
}

.page-open .lede {
  margin-top: 1.6rem;
}

.prose {
  display: grid;
  gap: 1.1rem;
  max-width: 40rem;
  padding-bottom: clamp(3rem, 8vw, 5rem);
}

.prose p {
  font-size: 1.12rem;
  line-height: 1.6;
}

.pull {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 560;
  font-variation-settings: "SOFT" 58;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.work-piece {
  padding: clamp(2.2rem, 5vw, 3.4rem) 0;
  border-top: 1px solid rgba(12, 11, 10, 0.16);
  scroll-margin-top: 5.5rem;
}

.work-piece:last-of-type {
  border-bottom: 1px solid rgba(12, 11, 10, 0.16);
}

.work-piece h2 {
  font-family: var(--serif);
  font-weight: 560;
  font-variation-settings: "SOFT" 58;
  font-size: clamp(3rem, 7vw, 5.5rem);
  letter-spacing: -0.015em;
  line-height: 1.05;
}

.work-piece p {
  margin-top: 0.9rem;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.12rem;
}

.close-note {
  padding: 2.5rem 0 4.5rem;
  max-width: 34rem;
  color: var(--muted);
}

/* Contact */

.facts {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.6rem;
  max-width: 40rem;
}

.fact-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.fact-value {
  display: block;
  font-size: 1.15rem;
  line-height: 1.45;
  max-width: 36rem;
}

.fact-value a,
.footer-place a,
.form-panel a {
  overflow-wrap: anywhere;
}

.form-panel {
  margin: 3rem 0 4.5rem;
  max-width: 36rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(12, 11, 10, 0.16);
}

.form-status {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cinnabar);
}

.form-panel h2 {
  margin: 0.6rem 0 0.5rem;
  font-family: var(--serif);
  font-weight: 560;
  font-variation-settings: "SOFT" 58;
  font-size: 2.4rem;
  letter-spacing: -0.015em;
  line-height: 1.1;
}

.form-panel p {
  color: var(--muted);
  margin-bottom: 1.2rem;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-inline-size: 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 1.1rem;
}

.field label {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

input,
textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(12, 11, 10, 0.28);
  border-radius: 0;
  padding: 0.55rem 0;
}

textarea {
  min-height: 6.5rem;
  resize: vertical;
}

.form-panel button {
  margin-top: 0.4rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  min-height: 44px;
  padding: 0.4rem 0;
  border: 0;
  border-bottom: 1px solid rgba(12, 11, 10, 0.28);
  background: transparent;
  color: var(--muted);
}

fieldset:disabled input,
fieldset:disabled textarea,
fieldset:disabled button {
  cursor: not-allowed;
  color: var(--muted);
}

/* Footer */

.site-footer {
  background: var(--ink);
  color: var(--ivory);
  padding: 3.2rem 0 1.4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) auto;
  gap: 2rem 3rem;
}

.footer-brand {
  font-family: var(--serif);
  font-weight: 560;
  font-variation-settings: "SOFT" 50;
  font-optical-sizing: auto;
  font-size: 1.8rem;
  letter-spacing: -0.015em;
  line-height: 1.1;
}

.footer-legal,
.footer-zh {
  margin-top: 0.55rem;
  color: var(--muted-on-dark);
  font-size: 0.92rem;
  line-height: 1.45;
}

.footer-label {
  margin: 0 0 0.3rem;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-on-dark);
}

.footer-place {
  font-style: normal;
}

.footer-place p + p {
  margin-top: 0.85rem;
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-nav a {
  display: inline-block;
  padding: 0.15rem 0;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-nav a:hover,
.site-footer a:hover {
  color: var(--ivory);
}

.footer-base {
  margin-top: 2.4rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(244, 240, 232, 0.14);
  color: var(--muted-on-dark);
  font-size: 0.85rem;
}

@media (max-width: 800px) {
  .studio a,
  .studio .row,
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .hero .display,
  .name-field .display,
  .page-open .display,
  .sheet-title {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media (forced-colors: active) {
  .site-header,
  .ground-ink,
  .ground-wash,
  .site-footer,
  .nav-check:checked ~ .site-nav {
    border: 1px solid CanvasText;
  }
}

@media print {
  .site-header {
    position: static;
  }

  .nav-toggle,
  .nav-check,
  .skip,
  .form-panel {
    display: none !important;
  }

  .site-nav {
    display: block !important;
    position: static !important;
    background: none !important;
    color: inherit !important;
  }

  .ground-ink,
  .ground-wash,
  .site-footer,
  .site-header {
    background: #fff !important;
    color: #000 !important;
  }
}
