/* ==========================================================================
   BLOCK FRAME — design system

   Concept: a development studio's identity built on the language of
   architectural drawings — ink-dark sheets, brass hardware, and the thin
   tick marks / corner registration crops you find on a blueprint border.
   "Frame" is taken literally: corner brackets frame every image and card,
   and a vertical ruler runs the site the way a title block runs a drawing.
   ========================================================================== */

:root {
  /* Color */
  --ink: #0b0d10;              /* primary background — near-black */
  --ink-raised: #14171b;       /* card / panel surface on ink */
  --ink-line: #262b31;         /* hairline borders on dark surfaces */
  --paper: #ede8dd;            /* warm off-white for light sections */
  --paper-line: #d8d1c0;
  --blueprint: #14324e;        /* cyanotype panel (comparison table) */
  --blueprint-line: #6f9bc2;
  --blueprint-line-soft: rgba(111, 155, 194, 0.35);
  --brass: #b98a4e;            /* accent — brass hardware */
  --brass-soft: rgba(185, 138, 78, 0.16);
  --on-accent: #0b0d10;        /* text sitting on top of a brass fill */
  --text: #ece7dc;             /* primary text on ink */
  --text-muted: #93989f;
  --text-on-paper: #14171b;
  --text-on-paper-muted: #6b6558;

  /* Type */
  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  /* Layout */
  --rail-width: 56px;
  --nav-height: 84px;
  --max-width: 1320px;
  --edge: clamp(20px, 4vw, 64px);
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

::selection {
  background: var(--brass);
  color: var(--on-accent);
}

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
}

.eyebrow--muted {
  color: var(--text-muted);
}

/* --------------------------------------------------------------------
   Side rail — the vertical "title block" ruler running the full page
   -------------------------------------------------------------------- */
.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail-width);
  border-right: 1px solid var(--ink-line);
  z-index: 40;
  display: none;
}

.rail__label {
  position: absolute;
  top: var(--nav-height);
  left: 0;
  width: var(--rail-width);
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rail__label span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.rail__ticks {
  position: absolute;
  top: 340px;
  bottom: 160px;
  left: 0;
  width: var(--rail-width);
  background-image: repeating-linear-gradient(
    to bottom,
    var(--ink-line) 0,
    var(--ink-line) 1px,
    transparent 1px,
    transparent 28px
  );
  background-position: 27px 0;
}

.rail__social {
  position: absolute;
  bottom: 28px;
  left: 0;
  width: var(--rail-width);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.rail__social a {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.rail__social a:hover,
.rail__social a:focus-visible {
  color: var(--brass);
}

.rail__social svg {
  width: 100%;
  height: 100%;
}

@media (min-width: 900px) {
  .rail {
    display: block;
  }
}

/* --------------------------------------------------------------------
   Nav
   -------------------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--edge);
  background: rgba(11, 13, 16, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ink-line);
}

@media (min-width: 900px) {
  .nav {
    padding-left: calc(var(--rail-width) + var(--edge));
  }
}

.nav__mark {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav__mark svg {
  width: 30px;
  height: 30px;
  color: var(--brass);
  overflow: visible;
}

/* Logo mark animation — brackets draw in like blueprint linework,
   then B and F pop in; F leans further out of frame on hover. */
.mark-bracket {
  stroke-dasharray: 14;
  stroke-dashoffset: 14;
  animation: bf-draw 0.7s ease forwards;
}

.mark-bracket--tl {
  animation-delay: 0.1s;
}

.mark-bracket--br {
  animation-delay: 0.35s;
}

.mark-letter {
  opacity: 0;
  transform: scale(0.6);
  transform-origin: center;
  transition: transform 0.25s ease;
  animation: bf-pop 0.4s ease forwards;
}

.mark-letter--b {
  animation-delay: 0.55s;
}

.mark-letter--f {
  animation-delay: 0.7s;
}

.nav__mark:hover .mark-letter--f,
.nav__mark:focus-visible .mark-letter--f {
  transform: scale(1) translate(2.5px, -2px);
}

@keyframes bf-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes bf-pop {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mark-bracket,
  .mark-letter {
    animation: none;
    stroke-dashoffset: 0;
    opacity: 1;
    transform: scale(1);
  }
}

.nav__links {
  display: none;
  align-items: center;
  gap: 34px;
}

.nav__links a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-bottom: 6px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav__links a:hover,
.nav__links a:focus-visible,
.nav__links a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--brass);
}

@media (min-width: 900px) {
  .nav__links {
    display: flex;
  }
}

.nav__cta {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--ink-line);
  color: var(--text);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.nav__cta:hover,
.nav__cta:focus-visible {
  border-color: var(--brass);
  color: var(--brass);
}

.nav__cta svg {
  width: 16px;
  height: 16px;
}

@media (min-width: 900px) {
  .nav__cta {
    display: flex;
  }
}

.nav__burger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--ink-line);
  background: none;
  color: var(--text);
  cursor: pointer;
}

@media (min-width: 900px) {
  .nav__burger {
    display: none;
  }
}

.nav__burger svg {
  width: 18px;
  height: 18px;
}

.mobile-menu {
  position: fixed;
  inset: var(--nav-height) 0 0 0;
  z-index: 45;
  background: var(--ink);
  padding: 40px var(--edge);
  display: none;
  flex-direction: column;
  gap: 22px;
}

.mobile-menu.is-open {
  display: flex;
}

.mobile-menu a {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text);
}

@media (min-width: 900px) {
  .mobile-menu {
    display: none !important;
  }
}

/* --------------------------------------------------------------------
   Page shell
   -------------------------------------------------------------------- */
.page {
  padding-top: var(--nav-height);
}

@media (min-width: 900px) {
  .page {
    padding-left: var(--rail-width);
  }
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--edge);
  padding-right: var(--edge);
}

.section {
  padding: 96px 0;
  position: relative;
}

.section--tight {
  padding: 64px 0;
}

.section--paper {
  background: var(--paper);
  color: var(--text-on-paper);
}

.section--blueprint {
  background: var(--blueprint);
  color: #eaf1f7;
}

.section__head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 48px;
  max-width: 640px;
}

.section__title {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.05;
  margin: 0;
}

.section__lede {
  font-size: 17px;
  color: var(--text-muted);
  margin: 0;
  max-width: 52ch;
}

.section--paper .section__lede,
.section--paper .eyebrow--muted {
  color: var(--text-on-paper-muted);
}

/* --------------------------------------------------------------------
   Framed media — the corner-bracket signature element
   -------------------------------------------------------------------- */
.framed {
  position: relative;
  padding: 18px;
}

.framed::before,
.framed::after,
.framed__media::before,
.framed__media::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--brass);
  opacity: 0.85;
}

.framed::before {
  top: 0;
  left: 0;
  border-right: none;
  border-bottom: none;
}

.framed::after {
  top: 0;
  right: 0;
  border-left: none;
  border-bottom: none;
}

.framed__media::before {
  bottom: 0;
  left: 0;
  top: auto;
  border-right: none;
  border-top: none;
}

.framed__media::after {
  bottom: 0;
  right: 0;
  top: auto;
  border-left: none;
  border-top: none;
}

.framed__media {
  position: relative;
  overflow: hidden;
}

.framed__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 16px 26px;
  border: 1px solid var(--brass);
  color: var(--brass);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  background: var(--brass);
  color: var(--on-accent);
}

.btn--solid {
  background: var(--brass);
  color: var(--on-accent);
}

.btn--solid:hover,
.btn--solid:focus-visible {
  background: transparent;
  color: var(--brass);
}

.btn--on-paper {
  border-color: var(--text-on-paper);
  color: var(--text-on-paper);
}

.btn--on-paper:hover,
.btn--on-paper:focus-visible {
  background: var(--text-on-paper);
  color: var(--paper);
}

.btn svg {
  width: 14px;
  height: 14px;
}

/* --------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--ink-line);
  padding: 48px 0;
}

.footer__row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.footer__links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------
   Scroll reveal
   -------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
