/* One Up Studio
   Layout: a matte-black, gold-finished board on off-white, with charcoal bands for signal and contact. */

:root {
  --paper: #F7F6F3;
  --charcoal: #25282B;
  --charcoal-deep: #1B1D1F;
  --charcoal-soft: #55595E;
  --gold: #FFCF14;
  --gold-bright: #FFDC04;
  --on-dark: #F7F6F3;
  --on-dark-soft: #C6C8CA;
  --line: #D9D6CE;

  --font: "Albert Sans", "Century Gothic", "Segoe UI", Arial, sans-serif;

  --step-hero: clamp(2.75rem, 6.1vw, 5.5rem);
  --step-h2: clamp(2.1rem, 4vw, 3.4rem);
  --step-h3: 1.3rem;
  --step-lead: clamp(1.1rem, 1.5vw, 1.3rem);

  --gutter: clamp(20px, 4vw, 48px);
  --section: clamp(104px, 10vw, 144px);
  --radius: 14px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--charcoal);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--gold); color: var(--charcoal-deep); }

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }

h1, h2 { font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; text-wrap: balance; }
h1 { font-size: var(--step-hero); }
h2 { font-size: var(--step-h2); line-height: 1.06; }
h3 { font-size: var(--step-h3); font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; }

.lead { font-size: var(--step-lead); line-height: 1.5; color: var(--charcoal-soft); max-width: 34em; text-wrap: pretty; }

.wrap { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section-head { display: grid; gap: 16px; margin-bottom: clamp(40px, 5vw, 64px); }
.tint { background: #FFFFFF; }
.dark { background: var(--charcoal); color: var(--on-dark); }
.dark .lead { color: var(--on-dark-soft); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 88px); align-items: center; }
.split > * { min-width: 0; }
.split h2 + .lead { margin-top: 20px; }
.split .lead + .button { margin-top: 36px; }

a:focus-visible, button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; box-shadow: 0 0 0 3px var(--charcoal-deep); }

.skip { position: fixed; left: 16px; top: -80px; z-index: 30; padding: 12px 18px; background: var(--gold); color: var(--charcoal-deep); border-radius: 8px; }
.skip:focus { top: 16px; }

/* Buttons */
.button {
  display: inline-block;
  padding: 19px 32px;
  border: 0;
  border-radius: 15px;
  background: var(--gold);
  color: var(--charcoal-deep);
  font: 600 1.0625rem/1.2 var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s, transform .18s;
}
.button:hover { background: var(--gold-bright); transform: translateY(-2px); }
.button-small { padding: 12px 20px; font-size: .95rem; white-space: nowrap; }

/* Floating menu: a raised translucent bar. Light glides along its edges to the link you point at.
   --glass sets how solid the bar is: 0 is clear, 1 is solid. The width on .menu matches the sections. */
.menu { --glass: .70; position: fixed; z-index: 20; inset: 14px 0 auto; width: calc(min(1280px, 100%) - 2 * var(--gutter)); margin-inline: auto; }
.menu-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: none;
  height: 68px;
  padding: 0 11px 0 28px;
  border-radius: 20px;
  box-shadow: 0 0 0 1px rgb(8 9 10 / .75), 0 1px 2px rgb(0 0 0 / .35), 0 14px 30px rgb(15 16 17 / .20);
}
/* the glass itself, kept on its own layer so the phone link bar can stay fixed to the screen */
.menu-row::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent 8px, #FFF 118px, transparent 250px) 0 0 / 100% 1.5px no-repeat, linear-gradient(90deg, transparent 8px, rgb(255 255 255 / .6) 118px, transparent 250px) 0 100% / 100% 1.5px no-repeat, rgb(20 22 23 / var(--glass));
  -webkit-backdrop-filter: blur(16px) saturate(1.4) brightness(.72);
  backdrop-filter: blur(16px) saturate(1.4) brightness(.72);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .20), inset 0 2px 0 rgb(255 255 255 / .06);
}
/* Scroll light: a gold line that grows along the bottom edge as the page scrolls */
@supports (animation-timeline: scroll()) {
  .menu-row::after { content: ""; position: absolute; left: 22px; right: 22px; bottom: 0; height: 2px; border-radius: 2px; background: linear-gradient(90deg, rgb(255 207 20 / .35), var(--gold)); box-shadow: 0 0 10px rgb(255 207 20 / .45); transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; animation: scroll-light linear both; animation-timeline: scroll(root); }
  @keyframes scroll-light { to { transform: scaleX(1); } }
}
.menu-logo { flex: none; }
.menu-logo img { width: 156px; max-width: none; }
.menu-links { --i: 0; --w: clamp(92px, 10vw, 122px); position: relative; display: grid; grid-template-columns: repeat(4, var(--w)); height: 100%; margin-left: auto; }
.menu-links::before, .menu-links::after {
  content: "";
  position: absolute;
  left: calc(var(--i) * var(--w) - 20px);
  width: calc(var(--w) + 40px);
  height: 1.5px;
  background: linear-gradient(90deg, transparent, rgb(255 207 20 / .6) 25%, #FFF8DC 50%, rgb(255 207 20 / .6) 75%, transparent);
  box-shadow: 0 0 14px rgb(255 220 90 / .45);
  opacity: 0;
  pointer-events: none;
  transition: left .35s cubic-bezier(.3, .9, .3, 1), opacity .25s;
}
.menu-links::before { top: 0; }
.menu-links::after { bottom: 0; }
.menu-links:has(a:hover)::before, .menu-links:has(a:hover)::after,
.menu-links:has(a:focus-visible)::before, .menu-links:has(a:focus-visible)::after { opacity: 1; }
.menu-links:has(a:nth-child(2):hover), .menu-links:has(a:nth-child(2):focus-visible) { --i: 1; }
.menu-links:has(a:nth-child(3):hover), .menu-links:has(a:nth-child(3):focus-visible) { --i: 2; }
.menu-links:has(a:nth-child(4):hover), .menu-links:has(a:nth-child(4):focus-visible) { --i: 3; }
.menu-links a { display: grid; place-items: center; height: 100%; color: #fff; font-size: 1.05rem; font-weight: 400; text-decoration: none; transition: color .2s; }
.menu-links a:hover { color: var(--gold); }
.menu .button-small { display: grid; place-items: center; height: 46px; padding: 0 22px; border-radius: 13px; }
.menu .button-small:hover { transform: none; }
/* Welcome */
.hero { overflow: clip; background: var(--paper); padding-block: clamp(128px, 14vw, 176px) clamp(64px, 8vw, 112px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(32px, 4vw, 64px); align-items: center; }
.hero-text { position: relative; z-index: 1; }
.hero-text h1 { font-size: clamp(3rem, 5.1vw, 4.7rem); white-space: nowrap; }
.hero-text h1 span { display: block; }
.hero-text .lead { margin-top: 28px; max-width: 24em; }
.hero-text .button { margin-top: 40px; }
/* The image runs to the right edge of the page. Multiply blends its white background into the page. */
.hero-board { --bleed: max(var(--gutter), 50vw - 640px + var(--gutter)); width: min(116% + var(--bleed), 1040px); max-width: none; justify-self: end; margin-right: calc(-1 * var(--bleed)); mix-blend-mode: multiply; }

/* Metrics strip */
.metrics { background: var(--charcoal); color: var(--on-dark); }
.metrics-row { display: grid; grid-template-columns: repeat(4, auto); justify-content: space-between; gap: 24px; margin-block: 0; padding-block: clamp(26px, 2.8vw, 38px); list-style: none; }
.metrics-row li { display: flex; align-items: baseline; gap: 14px; }
.metrics-row strong { color: var(--gold); font-size: clamp(2.2rem, 4vw, 3.4rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.metrics-row span { font-size: var(--step-lead); }
/* Projects */
.projects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(40px, 4vw, 56px) clamp(24px, 2.6vw, 36px); }
.project-image { overflow: hidden; border-radius: var(--radius); background: var(--charcoal); }
.project img { width: 100%; aspect-ratio: 8 / 5; object-fit: cover; transition: transform .4s; }
@media (hover: hover) { .project:hover img { transform: scale(1.04); } }
.project h3 { margin-top: 20px; }
.project p { margin-top: 6px; color: var(--charcoal-soft); max-width: 24em; }
.image-note { margin-top: clamp(40px, 4vw, 56px); color: var(--charcoal-soft); }

/* Fiducial marks, like the alignment dots in the corners of a board */
#pcb-layout, #contact { --f: clamp(14px, 2vw, 30px); background: url("images/fiducial.svg") var(--f) var(--f) no-repeat, url("images/fiducial.svg") calc(100% - var(--f)) var(--f) no-repeat, url("images/fiducial.svg") var(--f) calc(100% - var(--f)) no-repeat, url("images/fiducial.svg") calc(100% - var(--f)) calc(100% - var(--f)) no-repeat, var(--charcoal); }

/* PCB layout feature: the image runs to the right edge of the page */
#pcb-layout { overflow: clip; }
.eye { width: calc(100% + max(var(--gutter), 50vw - 640px + var(--gutter))); max-width: none; aspect-ratio: 16 / 10; max-height: 520px; object-fit: cover; border-radius: var(--radius) 0 0 var(--radius); background: var(--charcoal-deep); }
/* Six points: each marker is drawn like a gold via on a trace */
.capabilities { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(36px, 3.6vw, 52px) clamp(28px, 4vw, 64px); margin: clamp(56px, 6vw, 84px) 0 0; padding: 0; list-style: none; }
.capabilities li { position: relative; padding-top: 30px; }
.capabilities li::before { content: ""; position: absolute; left: 0; top: 0; width: 15px; height: 15px; border: 4px solid var(--gold); border-radius: 50%; }
.capabilities li::after { content: ""; position: absolute; left: 15px; right: 0; top: 6.5px; height: 2px; background: linear-gradient(90deg, var(--gold), rgb(255 207 20 / 0)); }
.capabilities h3 { font-size: clamp(1.35rem, 1.9vw, 1.65rem); letter-spacing: -0.02em; }
.capabilities p { margin-top: 6px; color: var(--on-dark-soft); text-wrap: balance; }
/* Services */
.services-grid { display: grid; grid-template-columns: minmax(0, 3.5fr) minmax(0, 6.5fr); gap: clamp(40px, 5vw, 72px); align-items: center; }
.stackup { mix-blend-mode: multiply; }
.services { display: grid; grid-template-columns: 1fr 1fr; gap: 44px 40px; }
.service img { width: 52px; height: 52px; margin-bottom: 14px; }
.service p { margin-top: 6px; color: var(--charcoal-soft); }

/* Photo band */
.band img { width: 100%; aspect-ratio: 21 / 9; max-height: 640px; object-fit: cover; object-position: 80% 60%; background: var(--charcoal-deep); }

/* Major contributions: name and description slide over the image on hover or keyboard focus */
.contributions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(18px, 1.9vw, 26px); }
.contribution { margin: 0; border-radius: var(--radius); }
.contribution-tile { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--charcoal); }
.contribution-tile img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.contribution-text h3 { font-size: 1.15rem; line-height: 1.25; }
.contribution-text p { margin-top: 8px; font-size: 1rem; line-height: 1.45; }
.contribution:focus-visible { outline: 3px solid var(--gold); outline-offset: 6px; }
@media (hover: hover) and (min-width: 721px) {
  .contribution-tile img { transition: transform .4s; }
  .contribution-text { position: absolute; inset: 0; display: flex; flex-direction: column; overflow-y: auto; padding: 20px; background: rgb(27 29 31 / .9); color: var(--on-dark); opacity: 0; transform: translateY(10px); transition: opacity .25s, transform .25s; }
  .contribution-text h3 { margin-top: auto; color: var(--gold); }
  .contribution:hover .contribution-text, .contribution:focus .contribution-text { opacity: 1; transform: none; }
  .contribution:hover .contribution-tile img { transform: scale(1.04); }
}
@media (hover: hover) and (min-width: 1001px) and (max-width: 1180px) {
  .contribution-text { padding: 16px; }
  .contribution-text h3 { font-size: 1.05rem; }
  .contribution-text p { margin-top: 6px; font-size: .93rem; line-height: 1.4; }
}
/* Touch screens have no hover and small windows have no room, so the text sits under the image */
@media (hover: none), (max-width: 720px) {
  .contributions { row-gap: 32px; }
  .contribution-tile { overflow: visible; background: none; }
  .contribution-tile img { border-radius: var(--radius); }
  .contribution-text { margin-top: 14px; }
  .contribution-text p { margin-top: 5px; color: var(--charcoal-soft); }
}
/* About: the photo runs to the right edge of the page */
#about { overflow: clip; }
.about-art { width: calc(100% + max(var(--gutter), 50vw - 640px + var(--gutter))); max-width: none; aspect-ratio: 3 / 2; max-height: 520px; object-fit: cover; border-radius: var(--radius) 0 0 var(--radius); background: var(--paper); }
.founder { display: grid; grid-template-columns: clamp(160px, 14vw, 200px) minmax(0, 1fr); gap: 28px; align-items: center; margin-top: 28px; }
.portrait { overflow: hidden; border-radius: var(--radius); background: var(--charcoal); }
.portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.founder + .button { margin-top: 36px; }

/* Contact */
.contact-grid { align-items: start; }
.contact-details { margin-top: 36px; font-size: var(--step-lead); line-height: 1.7; }
.contact-details a { color: var(--gold); text-underline-offset: 4px; }
.form { display: grid; gap: 20px; padding: clamp(24px, 3vw, 40px); border-radius: var(--radius); background: var(--paper); color: var(--charcoal); }
.field { display: grid; gap: 7px; }
.field label { font-weight: 600; }
.field input, .field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #8B8E91;
  border-radius: 8px;
  background: #fff;
  color: var(--charcoal);
  font: 400 1.0625rem/1.4 var(--font);
}
.field textarea { resize: vertical; min-height: 132px; }
.field input:focus, .field textarea:focus { outline: 3px solid var(--gold); outline-offset: 0; border-color: var(--charcoal); }
.form .button { justify-self: start; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Footer */
.footer { padding-block: 48px; background: var(--charcoal-deep); color: var(--on-dark-soft); }
.footer-grid { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; }
.footer img { width: 260px; }

/* Thank-you and error pages */
.message-page { min-height: 100vh; display: grid; align-items: center; background: var(--charcoal); color: var(--on-dark); }
.message-page .wrap { padding-block: 140px 80px; }
.message-page .lead { margin-top: 28px; color: var(--on-dark-soft); }
.message-page .lead a { color: var(--gold); }
.message-page .button { margin-top: 40px; }
.open-circuit { display: block; width: min(100%, 520px); margin-top: 64px; }

/* Tablet */
@media (max-width: 1000px) {
  .hero-grid, .split, .services-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-text h1 { font-size: clamp(1.7rem, 8.9vw, 4.7rem); }
  .hero-board { width: min(100% + var(--gutter), 680px); margin-right: calc(-1 * var(--gutter)); }
  .projects, .contributions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics-row { grid-template-columns: 1fr 1fr; gap: 22px 32px; }
  .about-art, .eye { width: 100%; border-radius: var(--radius); }
  .capabilities { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stackup { max-width: 420px; margin-inline: auto; width: 100%; order: 2; }
}

/* Phone: the menu links move to a second floating bar within thumb reach */
@media (max-width: 720px) {
  .menu { inset: 10px 0 auto; }
  .menu-row { height: 60px; padding: 0 9px 0 18px; border-radius: 18px; }
  .menu-logo img { width: 128px; }
  .menu .button-small { height: 42px; padding: 0 18px; }
  .menu-links {
    position: fixed;
    left: var(--gutter);
    right: var(--gutter);
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    display: flex;
    height: 56px;
    margin: 0;
    padding: 0 4px;
    border-radius: 18px;
    background: rgb(20 22 23 / .80);
    -webkit-backdrop-filter: blur(16px) saturate(1.4) brightness(.72);
    backdrop-filter: blur(16px) saturate(1.4) brightness(.72);
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / .20), 0 0 0 1px rgb(8 9 10 / .75), 0 14px 30px rgb(15 16 17 / .34);
  }
  .menu-links::before, .menu-links::after { display: none; }
  .menu-links a { flex: 1; font-size: .95rem; }
  .projects, .services { grid-template-columns: minmax(0, 1fr); }
  .service { display: grid; grid-template-columns: 52px 1fr; column-gap: 18px; }
  .service img { grid-row: 1 / 3; margin: 0; }
  .services { gap: 30px; }
  .band img { aspect-ratio: 4 / 3; object-position: 92% 50%; }
  .capabilities { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .metrics-row { gap: 24px 16px; }
  .metrics-row li { flex-direction: column; gap: 6px; }
  .metrics-row strong { font-size: 2.4rem; }
  .metrics-row span { font-size: 1rem; line-height: 1.3; }
  .founder { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .portrait { width: 210px; }
  .form .button { justify-self: stretch; }
  .footer { padding-bottom: 112px; }
}

@media (max-width: 370px) {
  .menu-links a { font-size: .88rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button, .contribution-tile img, .contribution-text, .menu-links::before, .menu-links::after, .project img { transition: none; }
  .menu-row::after { display: none; }
  .button:hover { transform: none; }
}
