/* Moralfish Labs — moralfish.dev
   Palette and type follow /brand/brand-guidelines.md.
   No build step: this file is served as-is. */

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/geist-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/geist-mono-latin.woff2') format('woff2');
}

:root {
  --ink: #171a18;
  --paper: #f5f5ee;
  --coral: #ff594b;
  --acid: #d3e329;
  --ink-muted: #b4b6ad;
  --ink-dim: #aeb3a5;
  --ink-line: #43463f;
  --ink-line-soft: #343830;
  --paper-muted: #51554c;
  --paper-dim: #595e52;
  --paper-line: #c7ccc1;
  --sans: 'Geist', system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 32px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 6px;
}
::selection { background: var(--acid); color: var(--ink); }
h1, h2, h3, h4, p { margin: 0; }

.mono { font-family: var(--mono); }
.coral { color: var(--coral); }
.wrap { width: min(1400px, calc(100% - 112px)); margin-inline: auto; }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: 1.5px; }

.skip {
  position: fixed; top: -100px; left: 20px; z-index: 10;
  background: var(--acid); color: var(--ink); padding: 12px 16px;
}
.skip:focus { top: 20px; }

/* Header ------------------------------------------------------------------ */
.nav {
  height: 116px;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  border-bottom: 1px solid var(--ink-line);
}
.brand { flex-shrink: 0; display: block; }
.wordmark { width: 250px; }
.logo { display: flex; align-items: flex-start; width: 250px; position: relative; }
.logo img { height: auto; display: block; }
.logo-fish { width: 20.93%; margin-right: 2.42%; position: relative; z-index: 1; }
.logo-m { width: 16.52%; margin-right: 0.35%; }
.logo-rest { width: 59.78%; }
.nav nav { display: flex; gap: 40px; font-size: 14px; }
.nav nav a { padding: 12px 0; }
.nav nav a span { color: var(--ink-dim); margin-left: 7px; font-size: 12px; font-family: var(--mono); }
.nav nav a:hover { color: var(--acid); }

/* Hero -------------------------------------------------------------------- */
.hero-eyebrow {
  display: flex; justify-content: space-between; gap: 20px;
  font-size: 13px; padding: 32px 0; color: #c3c6bb;
}
.hero-eyebrow i {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--acid); margin-right: 9px; vertical-align: 1px;
}
.hero-main {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 5%;
  padding: 32px 0 70px; align-items: center;
}
h1 {
  font-size: clamp(64px, 7.4vw, 112px);
  font-weight: 500; letter-spacing: -0.065em; line-height: 0.99;
  margin-bottom: 32px;
}
h1 em { color: var(--coral); font-style: normal; }
.hero-copy > p { font-size: 17px; line-height: 1.7; color: #bfc2b8; letter-spacing: -0.3px; }
.hero-actions { display: flex; align-items: center; gap: 36px; flex-wrap: wrap; margin-top: 28px; }
.cta {
  display: inline-flex; align-items: center; gap: 48px;
  padding: 16px 22px; background: var(--acid); color: var(--ink);
  font-size: 14px; font-weight: 550;
  transition: background 0.2s ease;
}
.cta:hover { background: var(--coral); }
.cta span { font-size: 22px; line-height: 1; }
.text-link {
  display: inline-flex; gap: 22px; font-size: 14px;
  border-bottom: 1px solid var(--ink-line); padding: 14px 0;
}
.text-link:hover { border-color: var(--coral); }

.hero-mark {
  position: relative; margin: 10px 0 0; align-self: stretch;
  display: flex; align-items: center; justify-content: center;
  min-height: 460px;
  border: 1px solid var(--ink-line-soft);
  background-image:
    linear-gradient(#33362d55 1px, transparent 1px),
    linear-gradient(90deg, #33362d55 1px, transparent 1px);
  background-size: 48px 48px;
  transition: border-color 0.35s ease;
}
.hero-fish {
  width: 62%; max-width: 420px; position: relative; z-index: 1;
  transform-origin: center;
  transition: transform 0.6s cubic-bezier(0.2, 0.75, 0.25, 1);
}
.hero-mark:hover > .hero-fish, .hero-mark:focus-visible > .hero-fish { transform: translate(8px, -6px) rotate(-4deg); }
.js .hero-fish { transition: none; }
.js .hero-mark:hover > .hero-fish, .js .hero-mark:focus-visible > .hero-fish { transform: none; }
.flair-layer { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.flair { position: absolute; left: 0; top: 0; width: 46px; height: auto; opacity: 0; will-change: transform; }
.hero-mark:hover, .hero-mark:focus-visible { border-color: #777f43; }
.hero-mark:focus-visible { outline: 2px solid var(--acid); outline-offset: 6px; }
.cross { position: absolute; color: #7d8376; font-family: var(--mono); font-size: 23px; line-height: 1; }
.top-cross { top: -13px; left: -8px; }
.bottom-cross { bottom: -13px; right: -8px; }
.specimen {
  position: absolute; bottom: 17px; left: 20px; right: 20px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 1.4px; line-height: 1.5;
  color: var(--paper);
}
.hero-foot {
  display: flex; justify-content: space-between; gap: 20px;
  padding: 23px 0; border-top: 1px solid var(--ink-line);
  font-size: 12px; letter-spacing: 1px; color: var(--ink-dim);
}

/* Section furniture --------------------------------------------------------- */
.section-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; font-size: 14px; }
h2 {
  font-size: clamp(42px, 5.2vw, 74px);
  line-height: 1.03; letter-spacing: -0.06em; font-weight: 500;
  margin: 35px 0 52px;
}

/* The work ------------------------------------------------------------------- */
.work { background: var(--paper); color: var(--ink); padding: 72px 0 90px; }
.projects { display: grid; grid-template-columns: 1fr 1fr; gap: 60px 32px; }
.project { min-width: 0; scroll-margin-top: 40px; }
.project-art {
  padding: 28px 30px 26px; min-height: 370px;
  display: flex; flex-direction: column; overflow: hidden;
  transition: transform 0.3s ease;
}
.project:hover .project-art { transform: translateY(-4px); }
.wavedeck .project-art { background: var(--acid); }
.noon .project-art { background: #dee4e6; }
.maatml .project-art { background: var(--ink); color: var(--paper); }
.motif .project-art { background: var(--coral); }
.project-overline { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; letter-spacing: 0.4px; }
.project-overline > span:last-child { font-size: 20px; }
.project-art h3 {
  font-size: clamp(30px, 3vw, 44px); font-weight: 500;
  letter-spacing: -0.05em; line-height: 1.05; margin: 28px 0 30px;
}
.diagram { margin-top: auto; }
.diagram-labels {
  display: flex; justify-content: space-between; gap: 10px;
  margin-top: 20px; font-size: 12px; letter-spacing: 0.7px;
}

.wave-diagram svg { display: block; width: 100%; height: 120px; color: var(--ink); }

.file-diagram { font-size: 12px; }
.folder-root { border-bottom: 1px solid #adb8bb; padding: 10px 0; display: flex; justify-content: space-between; }
.folder-root span:last-child { color: #546168; }
.file-row { display: flex; justify-content: space-between; padding: 10px 0 10px 15px; border-bottom: 1px solid #c2cccd; }
.file-row > span:last-child { display: flex; gap: 10px; align-items: center; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: #44564c; }
.dot.progress { background: #b75a29; }
.dot.next { background: transparent; border: 1px solid #7b898a; }

.model-diagram { font-size: 12px; padding-top: 12px; }
.contract { border: 1px solid #6e763d; color: var(--acid); text-align: center; padding: 14px; letter-spacing: 1px; }
.stages { display: flex; align-items: center; justify-content: space-between; padding: 33px 0 17px; gap: 7px; }
.stages span { border: 1px solid #5a5f50; padding: 9px 8px; }
.stages b { font-weight: 400; color: var(--acid); }

.pattern-row { display: grid; grid-template-columns: 38px repeat(12, 1fr); gap: 4px; margin-bottom: 6px; align-items: center; }
.pattern-row > span { font-size: 12px; }
.pattern-row i { display: block; height: 22px; background: #171a1817; border: 1px solid #171a1824; }
.pattern-row i.on { background: var(--ink); }
.pattern-row:nth-child(4) i.on { background: var(--acid); }

.project-info { padding-top: 24px; }
.project-name { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.project-name h4 { font-size: 25px; letter-spacing: -1px; font-weight: 550; }
.project-info > p { font-size: 16px; line-height: 1.65; color: var(--paper-muted); margin: 14px 0 22px; max-width: 480px; min-height: 80px; }

.notes { border-top: 1px solid var(--paper-line); }
.notes summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 0; font-size: 12px; letter-spacing: 0.4px;
}
.notes summary::-webkit-details-marker { display: none; }
.notes summary::after { content: '+'; font-size: 18px; line-height: 1; }
.notes[open] summary::after { content: '−'; }
.notes summary:hover { color: var(--coral); }
.notes-body { padding: 4px 0 24px; font-size: 15px; line-height: 1.7; color: #42483e; }
.notes-body > p + p { margin-top: 12px; }
.boundary { color: var(--ink); }
.scope { display: block; margin-top: 16px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px; color: #535d42; font-family: var(--mono); }
.install {
  display: inline-block; margin-top: 16px; padding: 8px 12px;
  font-family: var(--mono); font-size: 13px;
  background: var(--ink); color: var(--acid);
}
.notes-links { display: flex; gap: 28px; flex-wrap: wrap; }
.notes-link {
  display: inline-flex; gap: 12px; margin-top: 16px;
  font-size: 14px; color: var(--ink);
  border-bottom: 1px solid #a4aa97; padding-bottom: 4px;
}
.notes-link:hover { border-color: var(--coral); }

/* The lab -------------------------------------------------------------------- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 60px; padding-top: 110px; padding-bottom: 100px; }
.about h2 { margin-top: 30px; }
.about-copy > .intro { font-size: 30px; line-height: 1.3; letter-spacing: -1px; color: var(--paper); margin-bottom: 25px; }
.about-copy > p { font-size: 17px; line-height: 1.75; color: #b7bcb0; }
.about-copy > p + p { margin-top: 16px; }
.principles { grid-column: 1 / -1; list-style: none; margin: 30px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.principle { border-top: 1px solid #41453b; padding-top: 25px; }
.principle > span { display: block; font-size: 12px; color: var(--acid); margin-bottom: 18px; }
.principle h3 { font-size: 20px; line-height: 1.2; font-weight: 500; margin-bottom: 12px; letter-spacing: -0.5px; }
.principle p { font-size: 15px; line-height: 1.7; color: #afb4a7; }

/* Identity ------------------------------------------------------------------- */
.identity { background: var(--paper); color: var(--ink); padding: 75px 0; }
.identity-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 45px; }
.identity-heading h2 { margin-bottom: 0; }
.identity .text-link { border-color: #8c9183; }
.identity .text-link:hover { border-color: var(--coral); }
.brand-grid { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 14px; }
.brand-logo, .brand-mark {
  min-height: 285px; position: relative; padding: 35px 35px 60px;
  display: flex; align-items: center; justify-content: center;
}
.brand-logo { background: var(--ink); color: var(--paper); }
.brand-logo img { width: 100%; max-width: 520px; }
.brand-mark { background: var(--acid); color: var(--ink); }
.brand-mark img { width: 70%; max-width: 200px; }
.brand-logo > span, .brand-mark > span { position: absolute; bottom: 20px; left: 22px; right: 22px; font-size: 12px; letter-spacing: 1px; }
.palette { display: flex; flex-direction: column; }
.swatch { padding: 18px; display: flex; justify-content: space-between; gap: 10px; flex: 1; font-size: 12px; }
.swatch > span:last-child { font-size: 12px; }
.coral-swatch { background: var(--coral); }
.acid-swatch { background: var(--acid); }
.ink-swatch { background: var(--ink); color: var(--paper); }
.paper-swatch { background: var(--paper); border: 1px solid #d1d4c9; }
.brand-caption { display: grid; grid-template-columns: 1.35fr 1fr; gap: 12%; margin-top: 20px; }
.brand-caption p { font-size: 14px; line-height: 1.8; color: var(--paper-dim); }
.brand-caption a { display: inline-block; color: var(--ink); border-bottom: 1px solid #a4aa97; margin-top: 12px; }
.brand-caption a:hover { border-color: var(--coral); }

/* Contact -------------------------------------------------------------------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; padding-top: 110px; padding-bottom: 80px; align-items: start; }
.contact h2 { margin-top: 30px; }
.contact-copy > .intro { font-size: 30px; line-height: 1.3; letter-spacing: -1px; margin-bottom: 28px; }

/* Footer --------------------------------------------------------------------- */
.footer { padding-top: 60px; }
.footer-main { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding-bottom: 60px; }
.footer-main p { font-size: 28px; line-height: 1.15; letter-spacing: -1px; }
.back-top { font-size: 12px; letter-spacing: 1px; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  border-top: 1px solid #41453b; padding: 24px 0; color: var(--ink-dim); font-size: 12px;
}
.footer-bottom .mono { letter-spacing: 1px; }
.footer a:hover { color: var(--acid); }

/* 404 ------------------------------------------------------------------------ */
.missing { min-height: calc(100vh - 116px); display: flex; flex-direction: column; justify-content: center; padding: 60px 0; }
.missing .eyebrow { display: block; margin-bottom: 22px; }
.missing h1 { margin-bottom: 24px; }
.missing p { font-size: 17px; line-height: 1.7; color: #bfc2b8; max-width: 520px; }
.missing .hero-actions { margin-top: 32px; }

/* Responsive ----------------------------------------------------------------- */
@media (min-width: 1500px) {
  .hero-main { padding-top: 50px; padding-bottom: 90px; }
  .hero-mark { min-height: 530px; }
}
@media (max-width: 1000px) {
  .wrap { width: calc(100% - 64px); }
  .project-art { padding: 24px; min-height: 350px; }
  .stages span { padding: 8px 4px; }
  .pattern-row { gap: 3px; }
  .brand-grid { grid-template-columns: 1fr 1fr; }
  .palette { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .swatch { min-width: 180px; }
  .project-info > p { min-height: 105px; }
  .hero-foot > span:nth-child(2) { display: none; }
}
@media (max-width: 760px) {
  .wrap { width: calc(100% - 32px); }
  .nav { height: auto; min-height: 120px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 8px; padding: 16px 0; }
  .wordmark, .logo { width: 220px; }
  .nav nav { width: 100%; justify-content: space-between; gap: 12px; font-size: 13px; }
  .nav nav a { padding: 8px 0; min-height: 44px; display: flex; align-items: center; }
  .nav nav a span { display: none; }
  .hero-eyebrow { font-size: 12px; }
  .hero-eyebrow > span:last-child { display: none; }
  .hero-copy > p br { display: none; }
  .hero-main { grid-template-columns: 1fr; padding: 15px 0 45px; gap: 40px; }
  h1 { font-size: clamp(56px, 12vw, 86px); }
  .hero-mark { min-height: 320px; }
  .hero-mark > img { width: 66%; }
  .hero-foot > span:last-child { display: none; }
  .section-top { font-size: 12px; }
  .work { padding: 50px 0 60px; }
  .projects { grid-template-columns: 1fr; gap: 42px; }
  .project-art { min-height: 340px; padding: 24px; }
  .project-art h3 { font-size: clamp(32px, 9vw, 40px); }
  .project-name h4 { font-size: 24px; }
  .project-info > p { min-height: 0; }
  .about, .contact { grid-template-columns: 1fr; gap: 10px; padding-top: 60px; padding-bottom: 65px; }
  .principles { grid-template-columns: 1fr; gap: 0; margin-top: 10px; }
  .principle { margin-top: 24px; }
  .about h2, .contact h2 { margin-bottom: 35px; }
  .about-copy > .intro, .contact-copy > .intro { font-size: 26px; }
  .identity { padding: 50px 0; }
  .identity-heading { display: block; }
  .brand-grid { gap: 10px; }
  .brand-logo { grid-column: 1 / -1; min-height: 220px; padding: 28px 24px 56px; }
  .brand-mark { min-height: 250px; padding: 25px 25px 56px; }
  .brand-mark img { width: 100%; max-width: 160px; }
  .palette { grid-column: auto; flex-direction: column; }
  .swatch { min-width: 0; flex-wrap: wrap; gap: 4px; padding: 12px; }
  .brand-caption { grid-template-columns: 1fr; gap: 0; }
  .footer .wordmark { width: 220px; }
  .footer-main { flex-wrap: wrap; padding-bottom: 35px; }
  .footer-main p { font-size: 25px; }
  .footer-bottom { gap: 14px; line-height: 1.6; }
  .footer-bottom > .mono { display: none; }
}
@media (max-width: 450px) {
  .stages { gap: 3px; }
  .stages span { padding: 8px 3px; font-size: 11px; }
  .diagram-labels, .project-overline { letter-spacing: 0; }
  .cta { gap: 28px; }
  .hero-actions { gap: 20px; }
}
@media (max-width: 380px) {
  .nav nav { gap: 8px; font-size: 12px; }
  .wordmark, .logo { width: 190px; }
  .project-art { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .hero-mark:hover > .hero-fish, .hero-mark:focus-visible > .hero-fish { transform: none; }
  .project:hover .project-art { transform: none; }
}
