/* Portrait Technologies — marketing site.
   Palette and type follow portrait/DESIGN_SYSTEM.md (Logo 3 brand kit + Rasa foundations). */

:root {
  --off-black: #191419;
  --surface: #26181D;
  --elevated: #331C21;
  --maroon: #5B292D;
  --maroon-deep: #4A2125;
  --cream: #F4F0E6;
  --paper: #F1EEE5;
  --taupe: #D4CAB6;
  --gold: #B7A981;
  --muted: #B2AEA8;
  --grey: #8E908E;
  --charcoal: #42403B;
  --ink: #2A2226;          /* body text on paper */
  --ink-soft: #4F474A;     /* secondary text on paper */
  --line-light: #DDD6C8;
  --error: #DD8079;
  --green: #67B47D;

  --serif: "Inknut Antiqua", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --wrap: 1120px;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1, h2, .display, .h2, .statement { text-wrap: balance; }
p, .lede { text-wrap: pretty; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--cream); color: var(--maroon); padding: 8px 14px; border-radius: 4px; font-weight: 700;
}
.skip-link:focus { left: 8px; }

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

/* ---------- Type roles ---------- */

.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--maroon);
  margin: 0 0 18px;
}
.dark .eyebrow { color: var(--gold); }

.display {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(34px, 5.2vw, 60px);
  line-height: 1.18;
  letter-spacing: -0.01em;
}
.h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.25;
}
.h3 { font-family: var(--sans); font-weight: 600; font-size: 19px; line-height: 1.35; }
.lede { font-size: clamp(18px, 1.6vw, 20px); line-height: 1.6; max-width: 640px; }
.muted { color: var(--ink-soft); }
.dark .muted { color: var(--muted); }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(25, 20, 25, 0.94);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid rgba(91, 41, 45, 0.7);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--cream); }
.brand img { height: 36px; width: auto; }
.brand span { font-family: var(--serif); font-size: 19px; font-weight: 500; letter-spacing: 0.01em; }

.nav { display: flex; align-items: center; gap: 32px; }
.nav a {
  color: var(--taupe); text-decoration: none; font-size: 15px; font-weight: 500;
  padding: 6px 0; border-bottom: 1px solid transparent;
  transition: color .15s, border-color .15s;
}
.nav a:hover { color: var(--cream); }
.nav a[aria-current="page"] { color: var(--cream); border-bottom-color: var(--gold); }
.nav .btn { padding: 10px 18px; border-bottom: 0; color: var(--maroon); }
.nav a.btn, .nav a.btn:hover, .nav a.btn[aria-current="page"] { color: var(--maroon); border-bottom: 0; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--grey); color: var(--cream);
  border-radius: 4px; padding: 8px 12px; font: 500 14px var(--sans); cursor: pointer;
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .nav {
    display: none; position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--off-black); border-bottom: 1px solid var(--maroon); padding: 8px 24px 20px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid rgba(91,41,45,.6); font-size: 17px; }
  .nav a[aria-current="page"] { border-bottom-color: rgba(91,41,45,.6); color: var(--cream); }
  .nav .btn { margin-top: 16px; text-align: center; padding: 14px; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block; text-decoration: none; cursor: pointer;
  font: 700 15px/1 var(--sans); letter-spacing: 0.01em;
  padding: 16px 26px; border-radius: 4px; border: 1px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--cream); color: var(--maroon); }
.btn-primary:hover { background: var(--taupe); }
.btn-maroon { background: var(--maroon); color: var(--cream); }
.btn-maroon:hover { background: var(--maroon-deep); }
.btn-ghost { background: transparent; color: var(--cream); border-color: var(--grey); }
.btn-ghost:hover { background: var(--maroon); border-color: var(--maroon); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

/* ---------- Sections ---------- */

.section { padding: 112px 0; }
.section-tight { padding: 80px 0; }
.dark { background: var(--off-black); color: var(--cream); }
.dark-surface { background: var(--surface); color: var(--cream); }
.maroon-band { background: var(--maroon); color: var(--cream); }
.paper { background: var(--paper); }
.cream-bg { background: var(--cream); }

.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head .h2 + p { margin-top: 18px; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 120px 0 128px; }
.hero .wrap { position: relative; z-index: 1; }
.hero .display { max-width: 760px; }
.hero .lede { margin-top: 28px; color: var(--taupe); }
.hero-mark {
  position: absolute; right: max(24px, calc((100vw - var(--wrap)) / 2 + 24px)); top: 50%;
  transform: translateY(-50%); height: 78%; max-height: 460px; width: auto; opacity: .9;
  pointer-events: none;
}
.hero-sub { padding: 96px 0 88px; }

@media (max-width: 900px) {
  .hero-mark { opacity: .12; height: 70%; right: -40px; }
}
@media (max-width: 760px) { .hero-mark { display: none; } .hero { padding: 72px 0 80px; } .hero-sub { padding: 64px 0 64px; } }

/* Dot rule: a quiet nod to the mark */
.dots {
  height: 10px; width: 120px; margin: 0 0 28px;
  background-image: radial-gradient(circle, var(--gold) 3.5px, transparent 4px);
  background-size: 20px 10px; background-repeat: repeat-x; opacity: .85;
}
.paper .dots, .cream-bg .dots { background-image: radial-gradient(circle, var(--maroon) 3.5px, transparent 4px); }

/* Grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: 5fr 6fr; gap: 72px; align-items: start; }
@media (min-width: 861px) { .split > .sticky { position: sticky; top: 112px; } .person .portrait-frame { position: sticky; top: 112px; } }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 36px; } }

/* Cards */
.card {
  background: #FBF9F4; border: 1px solid var(--line-light); border-radius: var(--radius);
  padding: 32px 28px;
}
.card .h3 { margin-bottom: 10px; }
.card p:last-child { margin-bottom: 0; }
.card .num {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .12em; color: var(--maroon);
  display: block; margin-bottom: 22px; text-transform: uppercase;
}
.dark .card, .dark-surface .card { background: var(--surface); border-color: var(--maroon); }
.dark-surface .card { background: var(--elevated); }
.dark .card .num, .dark-surface .card .num { color: var(--gold); }
.dark .card p, .dark-surface .card p { color: var(--muted); }

/* Moments timeline */
.moments { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 0; border-top: 1px solid var(--maroon); }
.moments li { padding: 32px 28px 8px 0; position: relative; }
.moments li::before {
  content: ""; position: absolute; top: -7px; left: 0; width: 13px; height: 13px; border-radius: 50%;
  background: var(--cream); box-shadow: 0 0 0 4px var(--off-black);
}
.moments .when { font-family: var(--mono); font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); display: block; margin-bottom: 12px; }
.moments h3 { font-family: var(--serif); font-weight: 500; font-size: 21px; margin-bottom: 10px; }
.moments p { color: var(--muted); font-size: 16px; }
@media (max-width: 860px) {
  .moments { grid-template-columns: 1fr; border-top: 0; border-left: 1px solid var(--maroon); padding-left: 28px; }
  .moments li { padding: 0 0 32px; }
  .moments li::before { top: 6px; left: -35px; }
}

/* Principles list */
.principles { list-style: none; margin: 0; padding: 0; }
.principles li { padding: 26px 0; border-top: 1px solid var(--line-light); display: grid; grid-template-columns: 220px 1fr; gap: 24px; }
.principles li:last-child { border-bottom: 1px solid var(--line-light); }
.principles strong { font-weight: 600; font-size: 17px; }
.principles p { margin: 0; color: var(--ink-soft); }
@media (max-width: 680px) { .principles li { grid-template-columns: 1fr; gap: 6px; } }

/* Quote / statement */
.statement { font-family: var(--serif); font-weight: 500; font-size: clamp(24px, 3vw, 34px); line-height: 1.4; max-width: 880px; margin: 0; }

/* Surfaces table-like list */
.surface-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 48px; }
.surface-list div { padding: 24px 0; border-top: 1px solid rgba(183,169,129,.2); }
.surface-list h3 { font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.surface-list .who { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); margin-left: 8px; font-weight: 500; }
.surface-list p { margin: 0; color: var(--muted); font-size: 16px; }
@media (max-width: 680px) { .surface-list { grid-template-columns: 1fr; } }

/* CTA band */
.cta { text-align: left; }
.cta .wrap { display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.cta .h2 { max-width: 560px; }
.cta p { margin: 14px 0 0; color: var(--taupe); max-width: 560px; }

/* ---------- Team ---------- */

.person { display: grid; grid-template-columns: 300px 1fr; gap: 64px; align-items: start; padding: 72px 0; border-top: 1px solid var(--line-light); }
.person:first-child { border-top: 0; padding-top: 0; }
.person:last-child { padding-bottom: 0; }
.portrait-frame {
  aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--maroon);
  position: relative;
}
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; }
.portrait-frame.placeholder { display: flex; align-items: center; justify-content: center; }
.portrait-frame.placeholder span {
  font-family: var(--serif); font-size: 64px; color: var(--cream); letter-spacing: .04em;
}
.portrait-frame.placeholder::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(244,240,230,.10) 3px, transparent 3.5px);
  background-size: 18px 18px;
}
.person .role { font-family: var(--mono); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--maroon); margin: 10px 0 26px; }
.person .bio { max-width: 640px; }
.person .bio p { color: var(--ink-soft); }
.person .bio p:first-child { color: var(--ink); font-size: 18.5px; }
@media (max-width: 820px) {
  .person { grid-template-columns: 1fr; gap: 28px; padding: 56px 0; }
  .portrait-frame { max-width: 260px; }
}

/* ---------- Contact form ---------- */

.form { display: grid; gap: 22px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: end; }
@media (max-width: 600px) { .form .row { grid-template-columns: 1fr; } }
.field label { display: block; white-space: nowrap; font-size: 14.5px; font-weight: 600; margin-bottom: 8px; color: var(--ink); }
.field .opt { font-weight: 400; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  width: 100%; font: 400 16px/1.4 var(--sans); color: var(--ink);
  background: #FFFDF8; border: 1px solid #C9C0B0; border-radius: 4px; padding: 13px 14px;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--maroon); box-shadow: 0 0 0 3px rgba(91,41,45,.15);
}
.field [aria-invalid="true"] { border-color: #B3443C; }
.field .err { display: none; color: #A3372F; font-size: 14px; margin-top: 6px; }
.field .err.show { display: block; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: 14px; color: var(--ink-soft); margin: 0; }
.form-status { border-radius: 4px; padding: 16px 18px; font-size: 15.5px; display: none; }
.form-status.ok { display: block; background: #E8F1E8; color: #23472C; border: 1px solid #B9D3BE; }
.form-status.fail { display: block; background: #F8E6E3; color: #7A2A24; border: 1px solid #E5BDB7; }
.btn[disabled] { opacity: .6; cursor: progress; }

.contact-aside .eyebrow { margin-top: 2px; }
.contact-aside .item { padding: 22px 0; border-top: 1px solid var(--line-light); }
.contact-aside .item:last-child { border-bottom: 1px solid var(--line-light); }
.contact-aside h3 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.contact-aside .item p { margin: 0; color: var(--ink-soft); font-size: 16px; }

/* ---------- Prose (privacy) ---------- */

.prose > * { max-width: 720px; }
.prose h2 { font-family: var(--serif); font-weight: 500; font-size: 24px; margin: 48px 0 14px; }
.prose p, .prose li { color: var(--ink-soft); }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 8px; }

/* ---------- Footer ---------- */

.site-footer { background: var(--off-black); color: var(--muted); padding: 64px 0 40px; font-size: 15px; border-top: 1px solid var(--maroon); }
.footer-top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding-bottom: 40px; border-bottom: 1px solid rgba(91,41,45,.7); }
.footer-top .brand img { height: 44px; }
.footer-top p { margin: 18px 0 0; max-width: 340px; }
.footer-links { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-links h4 { font-family: var(--mono); font-weight: 500; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin: 0 0 14px; }
.footer-links ul { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { text-decoration: none; color: var(--taupe); }
.footer-links a:hover { color: var(--cream); }
.footer-bottom { padding-top: 28px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 14px; color: var(--grey); }

.rule-top { border-top: 1px solid var(--line-light); }
