* {
  box-sizing: border-box;
}
@font-face {
  font-family: "WhiteFish Lane";
  src: url("../assets/whitefish/lane-narrow.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--wf-ink);
  background: var(--wf-paper);
  font-family: var(--wf-font-body);
  line-height: 1.6;
}

h1,
h2,
h3,
p,
figure,
blockquote {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--wf-font-display);
  font-feature-settings: "kern" 0, "liga" 0, "clig" 0;
  font-kerning: none;
  font-variant-ligatures: none;
  font-synthesis: none;
  letter-spacing: 0.03em !important;
  word-spacing: 0.045em;
  line-height: 0.98;
  text-rendering: optimizeLegibility;
}

.guide-header,
.guide-section,
.guide-footer {
  padding-right: max(24px, calc((100vw - 1240px) / 2));
  padding-left: max(24px, calc((100vw - 1240px) / 2));
}

.guide-header {
  min-height: 88vh;
  padding-top: 48px;
  padding-bottom: 64px;
  color: var(--wf-white);
  background: var(--wf-ink);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.guide-header p,
.guide-header span,
.section-code,
figcaption {
  font-family: var(--wf-font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.guide-header p {
  color: var(--wf-water);
}

.guide-header h1 {
  max-width: 1100px;
  margin: 14vh 0;
  font-size: clamp(4.8rem, 12vw, 10.5rem);
  font-weight: 500;
}

.guide-header span {
  color: rgba(255, 255, 255, 0.58);
}

.guide-section {
  padding-top: 120px;
  padding-bottom: 120px;
}

.section-code {
  padding-bottom: 18px;
  margin-bottom: 64px;
  color: var(--wf-ocean);
  border-bottom: 1px solid var(--wf-rule);
}

.dark-section .section-code,
.language-section .section-code {
  color: var(--wf-water);
  border-bottom-color: rgba(255, 255, 255, 0.22);
}

.intro-grid,
.voice-grid,
.relationship-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 10vw;
}

.intro-grid h2,
.relationship-section h2 {
  font-size: clamp(3rem, 6.5vw, 6.8rem);
  font-weight: 500;
}

.lead {
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
  line-height: 1.4;
}

.dark-section,
.language-section {
  color: var(--wf-white);
  background: var(--wf-ink);
}

.logo-stage {
  min-height: 540px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.logo-stage-dark {
  background:
    linear-gradient(90deg, transparent calc(50% - 0.5px), rgba(255, 255, 255, 0.12) 50%, transparent calc(50% + 0.5px)),
    linear-gradient(transparent calc(50% - 0.5px), rgba(255, 255, 255, 0.12) 50%, transparent calc(50% + 0.5px));
}

.brand-logo {
  display: block;
  height: auto;
}

.stack-logo {
  width: min(340px, 74vw);
}

.lateral-logo {
  width: min(270px, 78%);
}

.logo-rules,
.visual-principles {
  display: grid;
  margin-top: 56px;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  grid-template-columns: repeat(4, 1fr);
}

.logo-rules article,
.visual-principles article {
  padding: 28px 26px 16px 0;
}

.logo-rules article + article,
.visual-principles article + article {
  padding-left: 26px;
  border-left: 1px solid rgba(255, 255, 255, 0.24);
}

.logo-rules b,
.swatch b {
  display: block;
  margin-bottom: 10px;
  font-size: 1.15rem;
}

.logo-rules p,
.production-note {
  color: rgba(255, 255, 255, 0.66);
}

.logo-variants {
  display: grid;
  margin-top: 72px;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.variant-stage {
  min-height: 340px;
  display: grid;
  place-items: center;
}

.variant-stage.light {
  background: var(--wf-white);
}

.variant-stage.ink {
  background: #102f42;
}

.variant-stage.paper {
  background: var(--wf-paper);
}

.asset-mask {
  background: currentColor;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}

.stack-mask {
  width: min(190px, 70%);
  aspect-ratio: 171.33 / 153.66;
  -webkit-mask-image: url("../assets/whitefish/logo.svg");
  mask-image: url("../assets/whitefish/logo.svg");
}

.text-mask {
  width: min(220px, 74%);
  aspect-ratio: 495.24 / 100;
  -webkit-mask-image: url("../assets/whitefish/text.svg");
  mask-image: url("../assets/whitefish/text.svg");
}

.fish-mask {
  width: min(190px, 70%);
  aspect-ratio: 495.19 / 324.25;
  -webkit-mask-image: url("../assets/whitefish/fish.svg");
  mask-image: url("../assets/whitefish/fish.svg");
}

.ink-asset { color: var(--wf-ink); }
.ocean-asset { color: var(--wf-ocean); }
.water-asset { color: var(--wf-water); }

.variant-stage .stack-logo {
  width: min(190px, 70%);
}

figcaption {
  padding: 12px 0;
  color: rgba(255, 255, 255, 0.58);
}

.production-note {
  max-width: 780px;
  margin-top: 42px;
}

.swatches {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.swatch {
  min-height: 320px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.swatch span {
  font-family: var(--wf-font-mono);
  font-size: 0.78rem;
}

.swatch p {
  min-height: 4.8em;
  margin: 24px 0 0;
  font-size: 0.9rem;
}

.swatch.ink { color: var(--wf-white); background: var(--wf-ink); }
.swatch.ocean { color: var(--wf-white); background: var(--wf-ocean); }
.swatch.water { color: var(--wf-ink); background: var(--wf-water); }
.swatch.ice { background: var(--wf-ice); }
.swatch.paper { background: var(--wf-white); }

.ratio {
  max-width: 850px;
  margin: 42px 0 0;
  font-family: var(--wf-font-mono);
  font-size: 0.85rem;
}

.type-section {
  background: var(--wf-white);
}

.type-grid {
  border-top: 1px solid var(--wf-rule);
}

.type-sample {
  display: grid;
  padding: 36px 0;
  border-bottom: 1px solid var(--wf-rule);
  grid-template-columns: 260px 1fr;
  gap: 48px;
}

.type-sample > span {
  font-family: var(--wf-font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
}

.display-sample strong {
  font-family: var(--wf-font-display);
  font-size: clamp(3rem, 7vw, 7rem);
  font-feature-settings: "kern" 0, "liga" 0, "clig" 0;
  font-kerning: none;
  font-variant-ligatures: none;
  font-synthesis: none;
  font-weight: 400;
  letter-spacing: 0.03em !important;
  word-spacing: 0.045em;
  line-height: 0.95;
  text-rendering: optimizeLegibility;
}

.display-sample p {
  grid-column: 2;
}

.body-sample p {
  max-width: 700px;
  font-size: 1.15rem;
}

.mono-sample code {
  color: var(--wf-ocean);
  font-family: var(--wf-font-mono);
  font-size: 1.1rem;
  line-height: 1.8;
}

.voice-grid h2 {
  color: var(--wf-water);
  font-size: clamp(2.5rem, 5vw, 5rem);
  font-weight: 500;
}

.voice-grid p {
  max-width: 580px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.1rem;
}

.struck {
  margin-bottom: 8px;
  text-decoration: line-through;
  text-decoration-color: var(--wf-water);
}

.language-section blockquote {
  padding-top: 72px;
  margin: 96px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  font-family: var(--wf-font-display);
  font-size: clamp(2.8rem, 7vw, 7.2rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.visual-section {
  background: var(--wf-ice);
}

.visual-principles {
  border-top-color: var(--wf-rule);
}

.visual-principles article + article {
  border-left-color: var(--wf-rule);
}

.visual-principles span {
  color: var(--wf-ocean);
  font-family: var(--wf-font-mono);
  font-size: 0.78rem;
}

.visual-principles h3 {
  margin: 90px 0 18px;
  font-size: 2rem;
  font-weight: 500;
}

.relationship-section {
  background: var(--wf-paper);
}

.relationship-grid {
  margin-top: 80px;
  padding-top: 28px;
  border-top: 1px solid var(--wf-rule);
}

.relationship-grid p {
  font-size: 1.15rem;
}

.guide-footer {
  min-height: 430px;
  padding-top: 70px;
  padding-bottom: 46px;
  color: rgba(255, 255, 255, 0.56);
  background: var(--wf-ink);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 60px;
}

.footer-brand-logo {
  width: 210px;
}

.guide-footer p {
  font-family: var(--wf-font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-align: right;
}

@media (max-width: 860px) {
  .intro-grid,
  .voice-grid,
  .relationship-grid,
  .type-sample {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .logo-rules,
  .visual-principles,
  .logo-variants,
  .swatches {
    grid-template-columns: 1fr;
  }

  .logo-rules article + article,
  .visual-principles article + article {
    padding-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-left: 0;
  }

  .visual-principles article + article {
    border-top-color: var(--wf-rule);
  }

  .display-sample p {
    grid-column: 1;
  }

  .guide-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .guide-footer p {
    text-align: left;
  }
}
