/* M_ portfolio — editorial layout. Pages built by tools/build.py
   Type: Geist (text) · Instrument Serif italic (accents) · Geist Mono (labels) */

:root {
  color-scheme: dark;
  --bg: #000000;
  --surface: #0d0d0d;
  --surface-2: #151515;
  --line: #1f1f1f;
  --line-2: #2c2c2c;
  --text: #ededed;
  --text-2: #b4b4b4;
  --muted: #707070;
  --blue: #0287ec;
  --green: #3ccf8e;

  --sans: "Geist", "IBM Plex Sans", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "Geist Mono", ui-monospace, monospace;

  --side: 248px;
  --gut: 64px;
  --max: 1080px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, figure, blockquote, dl, dd { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--blue); color: #fff; }
:focus-visible { outline: 1px solid var(--blue); outline-offset: 4px; }

/* ---------------- type */
h1 {
  font-size: clamp(40px, 5.6vw, 76px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -.045em;
  max-width: 14ch;
}
h2 { font-size: clamp(28px, 3.2vw, 40px); font-weight: 500; line-height: 1.1; letter-spacing: -.035em; }
h3 { font-size: 18px; font-weight: 500; line-height: 1.35; letter-spacing: -.015em; }
h1 em, h2 em, .foot-big em, .serif {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -.01em;
}
h1 em { color: var(--blue); font-size: 1.08em; }
h2 em { font-size: 1.1em; color: var(--text-2); }
.serif { font-style: italic; }
.lead { margin-top: 28px; max-width: 34em; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.55; color: var(--text-2); letter-spacing: -.01em; }
.lead.serif { font-size: clamp(24px, 2.4vw, 32px); line-height: 1.2; color: var(--text-2); }
.label { font-family: var(--mono); font-size: 12px; font-weight: 400; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); margin-right: 10px; vertical-align: 1px; box-shadow: 0 0 0 3px rgba(60, 207, 142, .15); }
.ic { width: 18px; height: 18px; flex: none; }
.ic-sm { width: 15px; height: 15px; }
.ic-lg { width: .7em; height: .7em; stroke-width: 1.4; }
.ul { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; transition: text-decoration-color .2s; }
.ul:hover { text-decoration-color: var(--blue); }

/* ---------------- sidebar */
.side {
  position: fixed; inset: 0 auto 0 0; width: var(--side); z-index: 20;
  display: flex; flex-direction: column; padding: 36px 28px 30px;
  border-right: 1px solid var(--line); background: var(--bg);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand span { display: grid; line-height: 1.3; }
.brand b { font-weight: 500; font-size: 15px; letter-spacing: -.01em; }
.brand small { font-size: 11px; color: var(--muted); letter-spacing: .02em; }
.nav { display: grid; gap: 2px; margin-top: 56px; }
.nav-link {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; margin: 0 -12px;
  border-radius: 8px; color: var(--muted); font-size: 15px; transition: color .2s, background .2s;
}
.nav-link .ic { width: 17px; height: 17px; }
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-link.is-active { color: var(--text); }
.nav-link.is-active .ic { color: var(--blue); }
.main { position: relative; }
.corner { position: absolute; top: 34px; right: var(--gut); z-index: 5; max-width: none; }
.copy {
  display: inline-flex; align-items: center; gap: 10px; height: 38px; padding: 0 16px;
  border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface);
  font-family: var(--mono); font-size: 13px; color: var(--text-2); transition: color .2s, border-color .2s;
}
.copy:hover { color: var(--text); border-color: var(--text-2); }
.copy-ic { position: relative; width: 15px; height: 15px; flex: none; }
.copy-ic .ic { position: absolute; inset: 0; transition: opacity .25s, transform .35s var(--ease); }
.copy-ic .i-mail { color: var(--muted); }
.copy-ic .i-ok { color: var(--green); stroke-width: 2.4; opacity: 0; transform: scale(.4) rotate(-20deg); }
.copy.done .i-mail { opacity: 0; transform: scale(.4); }
.copy.done .i-ok { opacity: 1; transform: none; }
.copy-in { position: relative; overflow: hidden; display: block; }
.copy-in span { display: block; transition: transform .35s var(--ease); white-space: nowrap; }
.copy-b { position: absolute; left: 0; top: 0; transform: translateY(110%); color: var(--green); }
.copy.done .copy-a { transform: translateY(-110%); }
.copy.done .copy-b { transform: none; }
.copy.done { border-color: rgba(60, 207, 142, .5); background: rgba(60, 207, 142, .08); }
.topbar { display: none; }

/* ---------------- main */
.main { margin-left: var(--side); padding: 0 var(--gut); }
.main > * { max-width: var(--max); }
.hero { padding: 132px 0 96px; }
.hero h1 { margin-top: 22px; }
.hero > h1:first-child { margin-top: 0; }
.hello { font-family: var(--serif); font-style: italic; font-size: clamp(30px, 3.4vw, 44px); line-height: 1.1; color: var(--text-2); }
.js-hello { display: inline-block; transition: opacity .35s var(--ease), transform .35s var(--ease); }
.js-hello.out { opacity: 0; transform: translateY(-8px); }
.wave { display: inline-block; font-style: normal; transform-origin: 70% 80%; animation: wave 2.6s ease-in-out infinite; }
@keyframes wave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(14deg); } 20% { transform: rotate(-8deg); } 40% { transform: rotate(-4deg); } 50% { transform: rotate(10deg); } }
.hero-sm { padding: 112px 0 64px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px;
  border: 1px solid var(--line-2); border-radius: 999px; font-size: 15px; font-weight: 500;
  transition: border-color .2s, background .2s, color .2s;
}
.btn:hover { border-color: var(--text-2); }
.btn .ic { transition: transform .25s var(--ease); }
.btn:hover .ic { transform: translateX(3px); }
.btn-solid { background: var(--text); color: #000; border-color: var(--text); }
.btn-solid:hover { background: var(--blue); border-color: var(--blue); color: #fff; }

.sec { padding: 72px 0; border-top: 1px solid var(--line); }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 48px; }
.sec-head h2 { margin-top: 10px; }
.more { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-2); white-space: nowrap; transition: color .2s; }
.more:hover { color: var(--blue); }
.more .ic { transition: transform .25s var(--ease); }
.more:hover .ic { transform: translateX(3px); }

/* project cards */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 56px 32px; }
.card { display: block; }
.card-media { border-radius: 14px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.card-media img { width: 100%; height: auto; aspect-ratio: 5 / 4; object-fit: cover; object-position: top; transition: transform .8s var(--ease), opacity .3s; }
.card:hover .card-media img { transform: scale(1.03); }
.card-text { padding-top: 18px; }
.card-text h3 { font-size: 19px; transition: color .2s; }
.card:hover .card-text h3 { color: var(--blue); }
.card-text p { margin-top: 6px; font-size: 12px; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); }
.card-text p span { margin: 0 6px; color: var(--line-2); }

/* rows (services, toolbox) */
.rows { border-top: 1px solid var(--line); }
.row {
  display: grid; grid-template-columns: 56px 1.1fr 1.6fr 1fr; gap: 24px; align-items: baseline;
  padding: 28px 0; border-bottom: 1px solid var(--line);
}
.row .num { font-size: 12px; color: var(--muted); }
.row p { color: var(--text-2); font-size: 15px; }
.row .tags { font-size: 12px; color: var(--muted); text-align: right; }
.row-2 { grid-template-columns: 180px 1fr; }
.clients { font-size: clamp(20px, 2vw, 26px); line-height: 1.55; letter-spacing: -.02em; color: var(--text-2); max-width: 46em; }
.clients > span { white-space: nowrap; }
.clients i { font-style: normal; color: var(--line-2); margin: 0 10px 0 6px; }
.archive-row {
  display: grid; grid-template-columns: 180px 1fr 20px; gap: 24px; align-items: center;
  margin-top: 72px; padding: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  color: var(--text-2); transition: color .2s;
}
.archive-row:hover { color: var(--blue); }

/* project page */
.back { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); transition: color .2s; }
.back:hover { color: var(--text); }
.hero-sm h1 { max-width: 18ch; }
h1.two-line { max-width: none; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts > div { padding: 22px 24px 24px 0; }
.facts > div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.facts dd { margin-top: 8px; font-size: 15px; color: var(--text); }
.facts .links { display: grid; gap: 4px; }
.facts .links a { display: inline-flex; align-items: center; gap: 6px; transition: color .2s; }
.facts .links a:hover { color: var(--blue); }
.overview { display: grid; grid-template-columns: 180px 1fr; gap: 24px; border-top: 0; }
.overview > div > p { font-size: 18px; line-height: 1.7; color: var(--text-2); max-width: 38em; letter-spacing: -.005em; }
.overview > div > .note { margin-top: 20px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.shots { columns: 3; column-gap: 18px; margin-top: 32px; }
.shot {
  display: block; break-inside: avoid; margin-bottom: 18px; padding: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; cursor: zoom-in;
  transition: border-color .3s;
}
.shot:hover { border-color: var(--line-2); }
.shot img { width: 100%; border-radius: 5px; }
.next { display: grid; gap: 10px; padding: 64px 0 24px; border-top: 1px solid var(--line); }
.next-t { display: flex; align-items: center; gap: 14px; font-size: clamp(36px, 4.6vw, 60px); font-weight: 500; letter-spacing: -.045em; line-height: 1.05; transition: color .2s; }
.next-t .ic { transition: transform .3s var(--ease); }
.next:hover .next-t { color: var(--blue); }
.next:hover .next-t .ic { transform: translateX(8px); }

/* about */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 56px; padding-bottom: 96px; align-items: start; }
.portrait { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.portrait img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.about-text p { font-size: 19px; line-height: 1.65; color: var(--text-2); margin-bottom: 22px; letter-spacing: -.01em; }
.about-text b { color: var(--text); font-weight: 500; }

.exps { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.exp h3 { font-size: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.exp ul { list-style: none; padding: 0; margin: 0; }
.exp li { padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--text-2); font-size: 15px; }
.quote { font-family: var(--serif); font-style: italic; font-size: clamp(28px, 3.4vw, 44px); line-height: 1.2; letter-spacing: -.01em; max-width: 24em; }
.quote .label { font-style: normal; margin-bottom: 24px; }

/* contact */
.contact { max-width: 760px; padding-bottom: 96px; }
.form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 22px 20px;
  padding: 36px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 18px;
}
.form label { display: grid; gap: 8px; }
.form label > span { font-size: 14px; font-weight: 500; color: var(--text); }
.form .full { grid-column: 1 / -1; }
.form input, .form textarea {
  width: 100%; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 10px;
  background: var(--surface-2); color: var(--text); font: inherit; font-size: 16px; resize: vertical;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.form input::placeholder, .form textarea::placeholder { color: var(--muted); }
.form input:hover, .form textarea:hover { border-color: #3a3a3a; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--blue); background: #181818; box-shadow: 0 0 0 3px rgba(2, 135, 236, .18); }
.form-foot { margin-top: 6px; }
.form-foot .btn { height: 48px; padding: 0 26px; }
.contact-alt { margin-top: 24px; font-size: 15px; color: var(--muted); }

/* message pages */
.message { min-height: 78vh; display: flex; flex-direction: column; justify-content: center; }

/* footer */
.foot { padding: 96px 0 40px; border-top: 1px solid var(--line); }
.foot-big {
  display: inline-flex; align-items: center; gap: .2em; margin-top: 16px;
  font-size: clamp(56px, 9vw, 128px); font-weight: 500; line-height: 1; letter-spacing: -.05em; transition: color .25s;
}
.foot-big em { font-size: 1.05em; padding-left: .12em; }
.foot-big .ic { transition: transform .35s var(--ease); }
.foot-big:hover { color: var(--blue); }
.foot-big:hover .ic { transform: translate(6px, -6px); }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; margin-top: 88px; font-size: 13px; color: var(--muted); }
.foot-links { display: flex; gap: 20px; }
.foot-links a:hover { color: var(--text); }
.message + .foot, .contact + .foot { padding-top: 40px; }

/* reveal */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.cards .card:nth-child(2n).reveal { transition-delay: .08s; }

/* ---------------- responsive */
@media (max-width: 1100px) {
  :root { --side: 216px; --gut: 44px; }
  .row { grid-template-columns: 40px 1fr 1.4fr; }
  .row .tags { display: none; }
  .row-2 { grid-template-columns: 140px 1fr; }
  .shots { columns: 2; }
}
@media (max-width: 860px) {
  :root { --gut: 20px; }
  .side { display: none; }
  .corner { display: none; }
  .topbar {
    position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
    height: 60px; padding: 0 var(--gut); background: rgba(0, 0, 0, .8);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
  }
  .topbar .brand b { font-size: 15px; font-weight: 500; }
  .topbar nav { display: flex; gap: 18px; font-size: 14px; }
  .topbar nav a { color: var(--muted); }
  .topbar nav a.is-active { color: var(--text); }
  .main { margin-left: 0; }
  .hero { padding: 72px 0 64px; }
  .hero-sm { padding: 56px 0 44px; }
  .sec { padding: 56px 0; }
  .sec-head { margin-bottom: 32px; }
  .cards { grid-template-columns: 1fr; gap: 44px; }
  .row { grid-template-columns: 32px 1fr; gap: 6px 16px; }
  .row p { grid-column: 2; }
  .row-2 { grid-template-columns: 1fr; }
  .row-2 p { grid-column: 1; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts > div { padding: 18px 16px 18px 0; }
  .facts > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .facts > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .overview, .about, .exps { grid-template-columns: 1fr; gap: 32px; }
  .portrait { max-width: 320px; }
  .shots { columns: 1; }
  .shot { padding: 10px; }
  .archive-row { grid-template-columns: 1fr 20px; }
  .archive-row .label { display: none; }
  .form { grid-template-columns: 1fr; padding: 22px; }
  .foot { padding-top: 64px; }
  .foot-row { margin-top: 56px; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* tech stack chips */
.techs { display: flex; flex-wrap: wrap; gap: 10px; }
.tech {
  display: inline-flex; align-items: center; gap: 9px; padding: 8px 14px 8px 11px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font-size: 14px; color: var(--text-2); transition: border-color .25s, color .25s, background .25s;
}
.tech .ic { width: 17px; height: 17px; color: var(--text-2); transition: color .25s, transform .3s var(--ease); }
.tech:hover { border-color: var(--line-2); color: var(--text); background: var(--surface-2); }
.tech:hover .ic { color: var(--brand, var(--blue)); transform: scale(1.12); }
.row-2 { align-items: center; }

/* about: studio card */
.studio {
  display: grid; grid-template-columns: 1fr auto; gap: 14px 24px; align-items: center;
  margin-top: 36px; padding: 24px 26px; border: 1px solid var(--line-2); border-radius: 16px;
  background: #161616; transition: border-color .25s, background .25s;
}
.studio .label { grid-column: 1 / -1; }
.studio img { height: 18px; width: auto; }
.studio-txt { grid-column: 1; color: var(--text-2); font-size: 15px; }
.studio-link { grid-column: 2; grid-row: 2 / 4; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); transition: color .2s; }
.studio-link .ic { transition: transform .25s var(--ease); }
.studio:hover { border-color: var(--text-2); background: #1c1c1c; }
.studio:hover .studio-link { color: var(--text); }
.studio:hover .studio-link .ic { transform: translate(2px, -2px); }
@media (max-width: 860px) {
  .studio { grid-template-columns: 1fr; }
  .studio-link { grid-column: 1; grid-row: auto; }
}

/* inline Ficavo logo in hero copy */
.inline-logo { display: inline-block; vertical-align: baseline; padding: 0 2px; border-bottom: 1px solid var(--line-2); transition: border-color .2s, opacity .2s; }
.inline-logo img { display: inline-block; height: .72em; width: auto; vertical-align: baseline; }
.inline-logo:hover { border-color: var(--text); }
