/* Bruno Nardi — site styles (chrome + landing). Built on the Bruno Dev tokens. */

html, body { margin: 0; }
body { background: var(--bg); color: var(--text); overflow-x: hidden; }
#root { min-height: 100vh; position: relative; }

.bd-page { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.bd-section { position: relative; z-index: 1; padding: var(--space-24) 0; scroll-margin-top: 84px; }

/* faint studio-grid backdrop */
.bd-backdrop {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: linear-gradient(var(--border-subtle) 1px, transparent 1px),
                    linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
  background-size: 100% 64px, 64px 100%;
  -webkit-mask-image: radial-gradient(120% 75% at 50% 0%, #000 28%, transparent 78%);
          mask-image: radial-gradient(120% 75% at 50% 0%, #000 28%, transparent 78%);
  opacity: 0.5;
}
[data-theme="light"] .bd-backdrop { opacity: 0.8; }

/* shared type helpers */
.accent-italic {
  font-family: var(--font-accent); font-style: italic; font-weight: 500; color: var(--accent);
}
/* "technique" — JetBrains Mono, tech vibe: monospace, tighter + slightly smaller,
   in the cool brand-blue so it plays off the warm amber "style" */
.hero-tech {
  font-family: var(--font-mono); font-weight: 600; font-size: 0.82em;
  letter-spacing: -0.02em; color: var(--brand);
}
[data-theme="dark"] .hero-tech { color: #6E92C4; }
[data-theme="light"] .hero-tech { color: var(--blue-600); }
.bd-lead {
  font-family: var(--font-body); font-size: var(--text-lg); line-height: var(--leading-relaxed);
  color: var(--text-muted); margin: 0;
}
.bd-eyebrow-rule {
  display: inline-flex; align-items: center; gap: 9px;
}
.bd-eyebrow-rule::before { content: ""; width: 22px; height: 1px; background: var(--accent); }

/* ===== Button contrast + hover refinements ============================= *
 * The amber "spotlight" primary reads most legibly with DARK ink, not white:
 * on these mid-orange tones dark ink clears ~4.6-5.9:1 while white only ~3:1.
 * Rest/hover both brighten the amber so the hover is unmistakably "lit".
 * Higher specificity (.bd-btn.bd-btn--primary) wins over the runtime DS rule. */
.bd-btn.bd-btn--primary { color: #241204; }
.bd-btn.bd-btn--primary .bd-btn__icon { color: #241204; }
.bd-btn.bd-btn--primary:hover {
  background: var(--accent-hover); color: #1a0d02;
  box-shadow: var(--glow-accent); transform: translateY(-1px);
}
.bd-btn.bd-btn--primary:active { background: var(--accent-press); transform: translateY(1px); box-shadow: none; }
/* Light theme: the DS uses a darker orange-700 face that muddies dark ink —
   brighten to orange-600 (rest) / orange-500 (hover) for a clean AA contrast. */
[data-theme="light"] .bd-btn.bd-btn--primary { background: var(--orange-600); }
[data-theme="light"] .bd-btn.bd-btn--primary:hover { background: var(--orange-500); }
/* Quiet buttons: make the hover state clearly perceptible (the DS inset is very faint) */
.bd-btn.bd-btn--secondary:hover { background: color-mix(in srgb, var(--text) 8%, transparent); border-color: var(--text-subtle); }
.bd-btn.bd-btn--ghost:hover { background: color-mix(in srgb, var(--text) 7%, transparent); }

/* ===== Header ========================================================== */
.bd-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: var(--blur-panel); -webkit-backdrop-filter: var(--blur-panel);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--border);
}
.bd-header__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.bd-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.bd-brand img { display: block; }
.bd-brand__word {
  font-family: var(--font-display); font-weight: 700; font-size: 19px;
  letter-spacing: -0.02em; color: var(--text);
}
.bd-nav { display: flex; align-items: center; gap: 2px; }
.bd-nav__link {
  font-family: var(--font-body); font-size: 14px; font-weight: 500;
  padding: 8px 13px; border-radius: var(--radius-sm); text-decoration: none;
  color: var(--text-subtle); transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.bd-nav__link:hover { color: var(--text); background: var(--surface-inset); }
.bd-nav__link.is-active { color: var(--text); }
.bd-nav__link.is-active::after {
  content: ""; display: block; height: 2px; margin-top: 6px; border-radius: 2px;
  background: var(--accent);
}
.bd-header__actions { display: flex; align-items: center; gap: 10px; }

@media (max-width: 720px) {
  .bd-nav { display: none; }
}
/* Very small phones (≤360px): the brand wordmark + theme toggle + CTA together
   overrun the viewport. Drop the wordmark to the logomark so everything fits. */
@media (max-width: 360px) {
  .bd-brand__word { display: none; }
  .bd-header__actions { gap: 8px; }
}

/* ===== Hero ============================================================ */
.bd-hero { position: relative; z-index: 1; }
.bd-hero__inner {
  padding: 86px 0 92px;
}
.bd-hero__copy { max-width: 820px; }
.bd-hero__sub { margin: 26px 0 34px; max-width: 620px; }
.bd-hero__kicker { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; flex-wrap: wrap; }
.bd-hero h1 {
  font-size: clamp(40px, 5.6vw, 70px); line-height: 1.04; letter-spacing: -0.03em;
  margin: 0; color: var(--text);
}
.bd-hero__sub { margin: 26px 0 34px; max-width: 620px; }
.bd-hero__cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.bd-hero__meta {
  display: flex; gap: 28px; margin-top: 38px; flex-wrap: wrap;
}
.bd-hero__stat { display: flex; flex-direction: column; gap: 2px; }
.bd-hero__statnum {
  font-family: var(--font-display); font-weight: 700; font-size: 26px; letter-spacing: -0.02em; color: var(--text);
}
.bd-hero__statlbl {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-subtle);
}

/* Architecture card (hero visual) */
.bd-arch {
  display: block; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); overflow: hidden;
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.bd-arch:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow-xl); }
.bd-arch__bar {
  display: flex; align-items: center; gap: 7px; padding: 13px 16px; border-bottom: 1px solid var(--border);
}
.bd-arch__dot { width: 11px; height: 11px; border-radius: 50%; }
.bd-arch__file {
  font-family: var(--font-mono); font-size: 11px; color: var(--text-subtle); margin-left: 8px;
}
.bd-arch__live {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent);
}
.bd-arch__live::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent); animation: bd-pulse 2.4s var(--ease-out) infinite;
}
@keyframes bd-pulse { 0% { box-shadow: 0 0 0 0 rgba(220,126,58,0.5); } 70% { box-shadow: 0 0 0 7px rgba(220,126,58,0); } 100% { box-shadow: 0 0 0 0 rgba(220,126,58,0); } }
.bd-arch__body {
  position: relative; padding: 26px 22px 8px;
  background:
    radial-gradient(140% 90% at 88% -10%, var(--accent-soft), transparent 55%),
    var(--surface);
}
.bd-arch__diagram { display: flex; flex-direction: column; gap: 14px; }
.bd-arch__row { display: flex; align-items: center; gap: 12px; }
.bd-node {
  flex: 1; display: flex; align-items: center; gap: 10px;
  background: var(--surface-sunken); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 11px 13px;
}
.bd-node--accent { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: var(--inset-top); }
.bd-node__ico {
  width: 30px; height: 30px; flex-shrink: 0; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand);
}
.bd-node--accent .bd-node__ico { background: var(--accent-soft); color: var(--accent); }
.bd-node__t { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.bd-node__name { font-family: var(--font-display); font-weight: 600; font-size: 13.5px; color: var(--text); }
.bd-node__sub { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-subtle); }
.bd-arch__connector {
  width: 1px; height: 14px; margin-left: 28px; background: var(--border-strong);
}
.bd-arch__foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; margin-top: 18px; border-top: 1px solid var(--border); background: var(--surface-sunken);
}
.bd-arch__footnote { font-family: var(--font-mono); font-size: 11px; color: var(--text-subtle); }
.bd-eq { display: flex; align-items: flex-end; gap: 3px; height: 22px; }
.bd-eq span { width: 4px; border-radius: 2px; background: var(--accent); transform-origin: bottom; }
@keyframes bd-eqa { 0%,100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }

/* ===== Glance (career at a glance) ===================================== */
.bd-sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 38px; }
.bd-sec-head h2 { font-size: clamp(28px, 3.6vw, 42px); letter-spacing: -0.025em; margin: 13px 0 0; color: var(--text); max-width: 16ch; }
.bd-sec-head__copy { max-width: 560px; }

.bd-rail { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.bd-railrow {
  display: grid; grid-template-columns: 56px 1.4fr 1fr auto; align-items: center; gap: 20px;
  padding: 18px 8px; border-bottom: 1px solid var(--border); text-decoration: none; color: inherit;
  border-radius: var(--radius-sm);
  transition: background var(--dur-fast) var(--ease-out);
}
.bd-railrow:hover { background: var(--surface-inset); }
.bd-logoslot {
  width: 44px; height: 44px; border-radius: var(--radius-sm); overflow: hidden;
  border: 1px solid var(--border); background: var(--surface-sunken);
}
.bd-railrow__co { font-family: var(--font-display); font-weight: 600; font-size: 17px; color: var(--text); }
.bd-railrow__role { font-family: var(--font-body); font-size: 14px; color: var(--text-muted); }
.bd-railrow__date { font-family: var(--font-mono); font-size: 12px; color: var(--text-subtle); white-space: nowrap; }
.bd-railrow__go { color: var(--text-faint); transition: transform var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.bd-railrow:hover .bd-railrow__go { color: var(--accent); transform: translateX(3px); }
@media (max-width: 720px) {
  .bd-railrow { grid-template-columns: 40px 1fr auto; }
  .bd-railrow__role { display: none; }
}

/* ===== Stack =========================================================== */
.bd-stack-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.bd-stackcard__head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.bd-stackcard__ico {
  width: 38px; height: 38px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand);
}
.bd-stackcard__title { font-family: var(--font-display); font-weight: 600; font-size: 18px; color: var(--text); }
.bd-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.bd-chip {
  font-family: var(--font-mono); font-size: 12px; padding: 5px 11px; border-radius: var(--radius-pill);
  background: var(--surface-inset); border: 1px solid var(--border); color: var(--text-muted);
}

/* AI feature card */
.bd-ai {
  grid-column: 1 / -1; position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; align-items: center;
  background:
    radial-gradient(120% 140% at 92% 0%, var(--accent-soft), transparent 52%),
    var(--surface-raised);
  border: 1px solid var(--border); border-top: 2px solid var(--accent); border-radius: var(--radius-lg);
  padding: 30px 32px; box-shadow: var(--shadow-md);
}
.bd-ai h3 { font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -0.02em; margin: 14px 0 12px; color: var(--text); }
.bd-ai p { font-family: var(--font-body); font-size: 15.5px; line-height: 1.62; color: var(--text-muted); margin: 0; max-width: 46ch; }
.bd-ai__list { display: flex; flex-direction: column; gap: 12px; }
.bd-ai__item { display: flex; align-items: flex-start; gap: 12px; }
.bd-ai__check {
  width: 26px; height: 26px; flex-shrink: 0; border-radius: var(--radius-sm); margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent);
}
.bd-ai__itemt { font-family: var(--font-body); font-size: 14.5px; line-height: 1.45; color: var(--text); }
.bd-ai__itemt span { display: block; font-size: 13px; color: var(--text-subtle); margin-top: 1px; }
@media (max-width: 860px) {
  .bd-stack-grid { grid-template-columns: 1fr; }
  .bd-ai { grid-template-columns: 1fr; }
}

/* ===== Contact ========================================================= */
.bd-contact { border-top: 1px solid var(--border); background: var(--surface-sunken); }
.bd-contact__inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.bd-contact__title { font-size: clamp(30px, 4vw, 46px); letter-spacing: -0.025em; margin: 14px 0 18px; color: var(--text); }
.bd-contact__cta { margin-top: 28px; margin-bottom: 30px; }
.bd-contact__person { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-top: 22px; border-top: 1px solid var(--border); }
.bd-contact__name { font-family: var(--font-display); font-weight: 600; font-size: 16px; color: var(--text); }
.bd-contact__role { font-family: var(--font-body); font-size: 13.5px; color: var(--text-subtle); }
.bd-socials { display: flex; gap: 10px; }

.bd-contact__card { padding: 0 !important; }
.bd-contact__card .bd-card__body, .bd-contact__card { }
.bd-linklist { display: flex; flex-direction: column; }
.bd-linkrow {
  display: flex; align-items: center; gap: 14px; padding: 16px 20px;
  border-top: 1px solid var(--border); text-decoration: none; color: inherit;
  transition: background var(--dur-fast) var(--ease-out);
}
.bd-linkrow:first-of-type { border-top: none; }
.bd-linkrow:hover { background: var(--surface-inset); }
.bd-linkrow__icon {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-inset); border: 1px solid var(--border); color: var(--text-muted);
}
.bd-linkrow__icon.is-accent { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); color: var(--accent); }
.bd-linkrow__text { display: flex; flex-direction: column; min-width: 0; }
.bd-linkrow__label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-subtle); }
.bd-linkrow__value { font-family: var(--font-body); font-size: 14.5px; color: var(--text); }
.bd-linkrow__go { margin-left: auto; color: var(--text-faint); transition: transform var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.bd-linkrow:hover .bd-linkrow__go { color: var(--accent); transform: translate(2px, -2px); }

@media (max-width: 860px) {
  .bd-contact__inner { grid-template-columns: 1fr; gap: 40px; }
  .bd-hero__inner { padding: 72px 0 64px; }
}

@media (max-width: 600px) {
  .bd-hero__inner { padding: 54px 0 52px; }
  .bd-hero h1 { font-size: clamp(32px, 8.4vw, 44px); }
  .bd-hero__sub { margin: 22px 0 30px; }
  .bd-hero__meta { gap: 22px; margin-top: 30px; }
  .bd-section { padding: var(--space-16) 0; }
  .bd-sec-head { margin-bottom: 28px; }
}

/* ===== Footer ========================================================== */
.bd-footer { position: relative; z-index: 1; border-top: 1px solid var(--border); background: var(--surface-sunken); }
/* keep the .bd-page horizontal gutter — only override the vertical padding
   (a bare `28px 0` here zeroes the gutter, flushing the footer to the edge) */
.bd-footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 28px var(--gutter); }
.bd-footer__note { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); }

/* shared logo slot (monogram fallback + drop target) */
.logowrap { position: relative; display: inline-block; overflow: hidden; border: 1px solid var(--border); background: var(--surface-sunken); flex-shrink: 0; }
.logowrap--filled { background: #fff; border-color: var(--border-strong); }
.logowrap--filled .logowrap__mono { display: none; }
.logowrap__img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: contain; padding: 14%; box-sizing: border-box; }
.logowrap__mono { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; color: var(--text-subtle); }
.logowrap__slot { position: absolute; inset: 0; z-index: 2; width: 100% !important; height: 100% !important; display: block; }
/* The drop-target's empty-state chrome (icon + "Drop an image / or browse files"
   + dashed ring + tint) must never sit in front of a real logo. Hide it so only
   a user-dropped image (data-filled) ever paints. Drag-drop still works — the
   drop listeners live on the host element, not this overlay. */
.logowrap__slot::part(empty) { display: none !important; }
.logowrap__slot::part(ring) { display: none !important; }
.logowrap__slot::part(frame) { background: transparent !important; }

/* scroll/entrance reveal — pure CSS so content can never get stuck hidden.
   Animates to the visible end-state on load; reduced-motion collapses instantly. */
.bd-reveal { animation: bd-rise 0.7s var(--ease-out) both; }
@keyframes bd-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .bd-reveal { animation: none; } }
