/* Polymath NC: the workshop.
   Every color comes from the workshop art. Cyan is the only accent;
   flask green appears once, on the Free Consultation badge. */
/* Self-hosted fonts (SIL Open Font License; licenses in assets/fonts/).
   Each file is a variable font covering every weight the page uses. */
@font-face {
  font-family: "Rubik"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url("/assets/fonts/Rubik-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: "Nunito Sans"; font-style: normal; font-weight: 200 1000; font-display: swap;
  src: url("/assets/fonts/NunitoSans-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;
}

:root {
  --shadow: #1B2329;      /* deep workshop shadow: page base */
  --wall: #2A363F;        /* slate wall */
  --wall-2: #3A4852;      /* lit slate */
  --paper: #E8DEC6;       /* manila notes */
  --paper-2: #F3ECDB;
  --ink: #1B2329;         /* text on paper */
  --ink-2: #4A5259;
  --text: #E8DEC6;        /* text on the wall */
  --text-2: #B5B9B6;
  --glow: #62E0F0;        /* robot-eye cyan */
  --glow-soft: rgba(98, 224, 240, 0.22);
  --blueprint: #22506F;
  --flask: #8BE04E;       /* used once */
  --radius: 10px;
  --max: 1120px;
  --display: "Rubik", "Segoe UI", system-ui, sans-serif;
  --body: "Nunito Sans", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--shadow);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0; }
p { margin: 0; }
a { color: var(--glow); }

:focus-visible { outline: 3px solid var(--glow); outline-offset: 3px; border-radius: 6px; }
.on-paper :focus-visible { outline-color: var(--ink); }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 50;
  background: var(--paper); color: var(--ink); padding: 10px 16px; border-radius: 6px;
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 16px; }

/* ---------- Header ---------- */
.site-header {
  position: absolute; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px clamp(16px, 4vw, 48px);
}
.wordmark {
  font-family: var(--display); font-weight: 700; font-size: 1.25rem;
  color: var(--paper); text-decoration: none; letter-spacing: 0.01em;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}
.wordmark span {
  margin-left: 0.35em; padding: 0.05em 0.4em; border-radius: 5px;
  background: var(--paper); color: var(--ink); font-size: 0.8em; text-shadow: none;
}
.site-header nav { display: flex; gap: clamp(14px, 2.4vw, 30px); }
.site-header nav a {
  color: var(--paper); text-decoration: none; font-weight: 600; font-size: 0.95rem;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6);
}
.site-header nav a:hover { color: var(--glow); }

/* ---------- Opening scene ---------- */
.hero {
  position: relative; isolation: isolate;
  min-height: min(100vh, 920px);
  display: flex; align-items: center;
  padding: 110px clamp(16px, 5vw, 72px) 64px;
}
.hero-art {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover; object-position: 62% 40%;
}
/* Warm ceiling light, and a soft shade on the left so the panel reads cleanly */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 60% 45% at 58% 0%, rgba(255, 226, 160, 0.16), transparent 70%),
    linear-gradient(90deg, rgba(27, 35, 41, 0.72) 0%, rgba(27, 35, 41, 0.25) 45%, transparent 70%),
    linear-gradient(0deg, var(--shadow) 0%, transparent 18%);
}
.hero-panel {
  max-width: 520px;
  padding: clamp(24px, 3.2vw, 40px);
  border-radius: 14px;
  background: rgba(232, 222, 198, 0.86);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}
.kicker {
  font-family: var(--display); font-weight: 600; font-size: 0.8rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2);
}
.hero h1, .lost h1 {
  margin-top: 12px;
  font-size: clamp(2.1rem, 4.4vw, 3.3rem); font-weight: 700; letter-spacing: -0.01em;
}
.hero h1 em, .lost h1 em {
  font-style: normal; white-space: nowrap;
  background: linear-gradient(transparent 62%, var(--glow-soft) 62%, var(--glow-soft) 92%, transparent 92%);
}
.lede { margin-top: 16px; font-size: 1.12rem; color: var(--ink-2); }
.badge {
  display: inline-flex; align-items: center; gap: 9px; margin-top: 22px;
  padding: 7px 15px 7px 11px; border-radius: 999px;
  background: var(--flask); color: #15230D;
  font-family: var(--display); font-weight: 600; font-size: 0.95rem;
}
.bubble {
  width: 10px; height: 10px; border-radius: 50%;
  background: #E9FFD6; box-shadow: 0 0 0 3px rgba(21, 35, 13, 0.18);
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 9px;
  font-family: var(--display); font-weight: 600; text-decoration: none;
  transition: box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { box-shadow: 0 0 0 2px var(--glow), 0 0 22px var(--glow-soft); }
.btn-ghost { color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn-ghost:hover { background: rgba(27, 35, 41, 0.08); }

/* ---------- Shared section frame ---------- */
.section { padding: clamp(72px, 10vw, 120px) clamp(16px, 5vw, 48px); }
.wrap { max-width: var(--max); margin: 0 auto; }
.eyebrow {
  font-family: var(--display); font-weight: 600; font-size: 0.8rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--glow);
}
.section h2 { margin-top: 10px; font-size: clamp(1.9rem, 3.6vw, 2.7rem); font-weight: 700; color: var(--paper); }
.intro { margin-top: 14px; max-width: 58ch; color: var(--text-2); font-size: 1.12rem; }

/* ---------- The work: pinned blueprints ---------- */
.work {
  background:
    linear-gradient(rgba(98, 224, 240, 0.035) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(98, 224, 240, 0.035) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(180deg, var(--shadow), var(--wall));
}
.blueprints {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: clamp(32px, 5vw, 56px); margin-top: 52px;
}
.blueprint {
  position: relative;
  padding: 34px clamp(18px, 2.4vw, 28px) 28px;
  border: 1px solid rgba(98, 224, 240, 0.35); border-radius: 6px;
  background:
    linear-gradient(rgba(98, 224, 240, 0.13) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, rgba(98, 224, 240, 0.13) 1px, transparent 1px) 0 0 / 22px 22px,
    var(--blueprint);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  transform: rotate(-0.8deg);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.blueprint:nth-child(2n) { transform: rotate(0.8deg); }
.blueprint::before { /* the tack */
  content: ""; position: absolute; top: 12px; left: 50%; width: 14px; height: 14px; margin-left: -7px;
  border-radius: 50%; background: radial-gradient(circle at 35% 35%, #E6EBEE, #6C7A84 70%);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}
.blueprint:hover { transform: rotate(0deg) translateY(-6px); box-shadow: 0 28px 56px rgba(0, 0, 0, 0.45); }
.sheet {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(232, 222, 198, 0.8); margin-bottom: 14px;
}
.frame { display: block; border-radius: 8px; overflow: hidden; background: #0F1519; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35); }
.frame-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: #151D22; }
.frame-bar i { width: 9px; height: 9px; border-radius: 50%; background: #3A4852; }
.frame-bar b {
  margin-left: 10px; padding: 2px 10px; border-radius: 5px; background: #0F1519;
  font: 500 0.72rem var(--mono); color: var(--text-2);
}
.frame img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.blueprint h3 { margin-top: 22px; font-size: 1.4rem; color: var(--paper); }
.blueprint p:not(.sheet) { margin-top: 8px; color: #CFD6D6; }
.more { display: inline-block; margin-top: 14px; font-weight: 700; text-decoration: none; }
.more:hover { text-decoration: underline; }

/* ---------- How it works: manila notes ---------- */
.how { background: var(--wall); }
.notes {
  list-style: none; margin: 52px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 28px;
}
.note {
  position: relative; padding: 34px 26px 28px;
  background: linear-gradient(180deg, var(--paper-2), var(--paper));
  color: var(--ink); border-radius: 3px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3);
  transform: rotate(-1deg);
}
.note:nth-child(2) { transform: rotate(0.7deg) translateY(10px); }
.note:nth-child(3) { transform: rotate(-0.4deg); }
.note::before { /* tape */
  content: ""; position: absolute; top: -10px; left: 50%; width: 92px; height: 22px; margin-left: -46px;
  background: rgba(243, 236, 219, 0.55); border: 1px solid rgba(255, 255, 255, 0.35);
  transform: rotate(-2deg);
}
.step { font-family: var(--display); font-weight: 700; font-size: 2.2rem; line-height: 1; color: rgba(27, 35, 41, 0.22); }
.note h3 { margin-top: 12px; font-size: 1.3rem; }
.note p { margin-top: 8px; color: var(--ink-2); }

/* ---------- About ---------- */
.about { background: linear-gradient(180deg, var(--wall), var(--shadow)); }
.about-grid {
  display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px); align-items: center;
}
.portrait { margin: 0; padding: 12px 12px 14px; background: var(--paper); border-radius: 4px; transform: rotate(-1.5deg); box-shadow: 0 20px 44px rgba(0, 0, 0, 0.4); }
.portrait img { border-radius: 2px; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 25%; width: 100%; }
.about-copy p:not(.eyebrow) { margin-top: 16px; max-width: 56ch; font-size: 1.12rem; color: #D9D6CC; }
.about-copy .aside { color: var(--text-2); font-size: 1rem; }

/* ---------- Contact ---------- */
.contact { background: var(--shadow); }
.contact-grid {
  list-style: none; margin: 44px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 20px;
}
.contact-btn {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 16px; align-items: center;
  padding: 22px 24px; border-radius: 12px; text-decoration: none;
  background: var(--wall); border: 1px solid rgba(232, 222, 198, 0.14);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.contact-btn svg { grid-row: span 2; width: 30px; height: 30px; fill: var(--glow); }
.contact-btn .label { font-family: var(--display); font-weight: 700; font-size: 1.25rem; color: var(--paper); }
.contact-btn .detail { color: var(--text-2); font-size: 0.95rem; overflow-wrap: anywhere; }
.contact-btn:hover { border-color: var(--glow); box-shadow: 0 0 0 1px var(--glow), 0 0 28px var(--glow-soft); transform: translateY(-2px); }

/* ---------- Not found: the blueprint closet ----------
   The art is a cutout, so it sits straight on the wall under a soft robot-eye glow. */
.lost {
  position: relative; isolation: isolate;
  min-height: min(100vh, 920px);
  display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px); align-items: center;
  max-width: 1440px; margin: 0 auto;
  padding: 110px clamp(16px, 5vw, 72px) 64px;
}
.lost::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 60% 45% at 50% 0%, rgba(255, 226, 160, 0.10), transparent 70%),
    radial-gradient(ellipse 45% 55% at 72% 50%, var(--glow-soft), transparent 70%);
  opacity: 0.6;
}
.lost-panel {
  padding: clamp(24px, 3.2vw, 40px);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--paper-2), var(--paper));
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  transform: rotate(-0.8deg);
}
/* The cutout's left and bottom edges are straight; fade them into the wall */
.lost-art {
  width: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%), linear-gradient(0deg, transparent, #000 7%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent, #000 7%), linear-gradient(0deg, transparent, #000 7%);
  mask-composite: intersect;
}

/* ---------- Footer ---------- */
.site-footer { padding: 28px 16px 40px; text-align: center; color: var(--text-2); font-size: 0.9rem; border-top: 1px solid rgba(232, 222, 198, 0.08); }

/* ---------- Phones ---------- */
.mobile-bar { display: none; }

@media (max-width: 760px) {
  .site-header nav { display: none; }
  .hero { display: block; min-height: 0; padding: 0 16px 8px; }
  .hero-art { position: relative; inset: auto; z-index: 0; margin: 0 -16px; width: calc(100% + 32px); max-width: none; height: auto; aspect-ratio: 4 / 3.4; object-position: 64% 40%; }
  .hero::before { display: none; }
  .hero-panel { position: relative; z-index: 2; margin-top: -56px; max-width: none; }
  .about-grid { grid-template-columns: 1fr; }
  .lost { display: flex; flex-direction: column; gap: 0; min-height: 0; padding: 64px 16px 8px; }
  .lost-art { order: -1; margin: 0 -16px; width: calc(100% + 32px); max-width: none; }
  .lost-panel { position: relative; margin-top: -24px; transform: none; }
  .portrait { max-width: 300px; }
  .blueprint, .blueprint:nth-child(2n), .note, .note:nth-child(2), .note:nth-child(3) { transform: none; }

  body { padding-bottom: 68px; }
  .mobile-bar {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    position: fixed; inset: auto 0 0 0; z-index: 20;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(27, 35, 41, 0.92); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    border-top: 1px solid rgba(98, 224, 240, 0.25);
  }
  .mobile-bar a {
    padding: 11px; border-radius: 9px; text-align: center; text-decoration: none;
    font-family: var(--display); font-weight: 600; background: var(--paper); color: var(--ink);
  }
  .mobile-bar a + a { background: transparent; color: var(--paper); box-shadow: inset 0 0 0 2px var(--paper); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
