/* ui_kits/website — component styles
   Built to match the current JSX components.
   Tokens from colors_and_type.css.

   Breakpoints (mobile-first overrides at the bottom of each section):
     ≤  900px   tablet / large phone
     ≤  600px   phone
*/

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

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

.hd-wrap {
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding: 0 var(--wrap-pad);
}
@media (max-width: 600px) {
  .hd-wrap { padding: 0 20px; }
}

/* ─── Scroll progress bar ─────────────────────────────────── */
.hd-scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: transparent;
  z-index: 100;
  pointer-events: none;
}
.hd-scroll-progress-fill {
  height: 100%;
  background: var(--accent);
  transition: width 80ms linear;
}

/* ─── Nav ─────────────────────────────────────────────────── */
.hd-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
.hd-nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.hd-nav-brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.hd-nav-wordmark {
  height: 26px;
  width: auto;
  display: block;
}
.hd-nav-email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color var(--dur-base) var(--ease-out);
  white-space: nowrap;
}
.hd-nav-email:hover { color: var(--accent); }
.hd-nav-email-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: hd-blink 2.4s ease-in-out infinite;
}
@media (max-width: 600px) {
  .hd-nav { padding: 14px 0; }
  .hd-nav-wordmark { height: 22px; }
  .hd-nav-email { font-size: 12px; gap: 6px; }
  .hd-nav-email-dot { width: 6px; height: 6px; }
}
@media (max-width: 380px) {
  /* Hide the email text on tiny screens; keep the dot as availability indicator */
  .hd-nav-email { font-size: 0; gap: 0; }
  .hd-nav-email-dot { width: 8px; height: 8px; }
}

@keyframes hd-blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.3; }
}

/* ─── Hero ────────────────────────────────────────────────── */
.hd-hero {
  padding: 64px 0 88px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.hd-hero-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 56px;
  flex-wrap: wrap;
}
.hd-hero-avail {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.hd-hero-availdot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: hd-blink 2.4s ease-in-out infinite;
}
.hd-hero-location {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.hd-hero-title {
  /* Tighter clamp than the global hero so it never overflows */
  font-size: clamp(48px, 11vw, 160px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.035em;
  margin-bottom: 56px;
}
.hd-hero-line {
  display: block;
}
.hd-hero-dot {
  color: var(--accent);
  display: inline-block;
  will-change: transform;
}
.hd-hero-bottom {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: end;
}
.hd-hero-sub {
  font-size: var(--fs-lead);
  font-weight: 500;
  color: var(--muted);
  max-width: 460px;
  line-height: 1.55;
}
.hd-hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
@media (max-width: 760px) {
  .hd-hero { padding: 40px 0 64px; }
  .hd-hero-meta { margin-bottom: 36px; }
  .hd-hero-title { margin-bottom: 36px; }
  .hd-hero-bottom { grid-template-columns: 1fr; gap: 28px; align-items: start; }
  .hd-hero-ctas { justify-content: flex-start; }
}
@media (max-width: 480px) {
  .hd-hero-location { display: none; }
}

/* ─── Buttons ─────────────────────────────────────────────── */
.hd-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 13px 22px;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--dur-base) var(--ease-out),
              color var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out);
  white-space: nowrap;
}
.hd-btn-primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.hd-btn-primary:hover { background: var(--accent); border-color: var(--accent); }
.hd-btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-strong);
}
.hd-btn-ghost:hover { border-color: var(--ink); }
.hd-btn-arrow { transition: transform var(--dur-base) var(--ease-out); display: inline-block; }
.hd-btn-primary:hover .hd-btn-arrow { transform: translateY(2px); }

/* ─── Generic section ─────────────────────────────────────── */
.hd-section {
  padding: 96px 0;
  border-bottom: 1px solid var(--border);
}
@media (max-width: 760px) {
  .hd-section { padding: 64px 0; }
}
@media (max-width: 480px) {
  .hd-section { padding: 48px 0; }
}
.hd-sec-label {
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 24px;
}

/* ─── Problem section ─────────────────────────────────────── */
.hd-problem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.hd-problem-head {
  font-size: var(--fs-h2);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.025em;
  max-width: 14ch;
  text-wrap: balance;
}
.hd-problem-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.hd-problem-card {
  background: var(--paper-soft);
  padding: 28px 28px;
  border-radius: 4px;
}
.hd-problem-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.hd-problem-card-num {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent);
}
.hd-problem-card-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.hd-problem-card p {
  font-size: var(--fs-body);
  font-weight: 500;
  line-height: 1.6;
  color: var(--ink);
}
@media (max-width: 900px) {
  .hd-problem-grid { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 480px) {
  .hd-problem-card { padding: 22px 20px; }
}

/* ─── Offer (dark) ────────────────────────────────────────── */
.hd-offer {
  background: var(--ink);
  border-bottom: none;
  color: var(--paper);
}
.hd-offer .hd-sec-label { color: rgba(248,246,240,0.45); }
.hd-offer-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  align-items: end;
  margin-bottom: 56px;
}
.hd-offer-headline {
  font-size: var(--fs-h2);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--paper);
  text-wrap: balance;
}
.hd-offer-rows {
  display: flex;
  flex-direction: column;
}
.hd-offer-row {
  display: grid;
  grid-template-columns: 44px 1fr 28px;
  gap: 24px;
  padding: 32px 0;
  border-top: 1px solid var(--border-dark);
  align-items: start;
  transition: padding-left var(--dur-base) var(--ease-out);
}
.hd-offer-row:last-child { border-bottom: 1px solid var(--border-dark); }
.hd-offer-row:hover { padding-left: 8px; }
.hd-offer-row:hover .hd-offer-row-arrow { color: var(--accent); transform: translateX(4px); }
.hd-offer-row-num {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent);
  padding-top: 6px;
}
.hd-offer-row-title {
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 700;
  color: var(--paper);
  margin-bottom: 8px;
  letter-spacing: -0.015em;
}
.hd-offer-row p {
  font-size: var(--fs-small);
  font-weight: 400;
  line-height: 1.65;
  color: rgba(248,246,240,0.55);
  max-width: 56ch;
}
.hd-offer-row-arrow {
  font-size: 22px;
  color: rgba(248,246,240,0.35);
  align-self: center;
  transition: color var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
@media (max-width: 760px) {
  .hd-offer-head { grid-template-columns: 1fr; gap: 16px; margin-bottom: 32px; }
  .hd-offer-row { grid-template-columns: 32px 1fr; gap: 16px; padding: 24px 0; }
  .hd-offer-row-arrow { display: none; }
}

/* ─── Projects ────────────────────────────────────────────── */
.hd-projects-head {
  margin-bottom: 48px;
}
.hd-projects-headline {
  font-size: var(--fs-h2);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-wrap: balance;
  max-width: 18ch;
}
.hd-pcard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.hd-pcard-grid .hd-pcard.is-big {
  grid-column: span 2;
}
@media (max-width: 760px) {
  .hd-pcard-grid { grid-template-columns: 1fr; }
  .hd-pcard-grid .hd-pcard.is-big { grid-column: span 1; }
}

.hd-pcard {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 28px;
  background: var(--paper-soft);
  border-radius: 6px;
  text-decoration: none;
  color: var(--ink);
  min-height: 220px;
  transition: background var(--dur-base) var(--ease-out),
              color var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
}
.hd-pcard.is-big {
  min-height: 260px;
  padding: 36px;
}
.hd-pcard:hover {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-2px);
}
.hd-pcard:hover .hd-pcard-num { color: var(--accent); }
.hd-pcard:hover .hd-pcard-desc { color: rgba(248,246,240,0.55); }
.hd-pcard:hover .hd-pcard-stack { background: rgba(248,246,240,0.08); color: var(--paper); }
.hd-pcard:hover .hd-pcard-extlink { color: var(--accent); }

.hd-pcard-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.hd-pcard-num {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
  transition: color var(--dur-base) var(--ease-out);
}
.hd-pcard-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: 3px;
  white-space: nowrap;
}
.hd-badge-live    { background: var(--badge-live-bg); color: var(--badge-live-fg); }
.hd-badge-private { background: rgba(13,15,22,0.08); color: var(--muted); }

.hd-pcard-mid { display: flex; flex-direction: column; gap: 10px; }
.hd-pcard-name {
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.hd-pcard.is-big .hd-pcard-name {
  font-size: clamp(24px, 3.2vw, 36px);
}
.hd-pcard-extlink {
  color: var(--accent);
  font-weight: 700;
  transition: color var(--dur-base) var(--ease-out);
}
.hd-pcard-desc {
  font-size: var(--fs-small);
  font-weight: 400;
  line-height: 1.6;
  color: var(--muted);
  transition: color var(--dur-base) var(--ease-out);
  max-width: 56ch;
}
.hd-pcard-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}
.hd-pcard-stack {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  background: rgba(13,15,22,0.06);
  color: var(--ink);
  border-radius: 3px;
  transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
}
@media (max-width: 480px) {
  .hd-pcard { padding: 24px; min-height: 0; }
  .hd-pcard.is-big { padding: 28px; min-height: 0; }
}

/* ─── Contact ─────────────────────────────────────────────── */
.hd-contact-section {
  text-align: center;
}
.hd-contact-eyebrow { margin-bottom: 28px; }
.hd-contact-head {
  font-size: var(--fs-display);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin-bottom: 56px;
  text-wrap: balance;
}
.hd-contact-emails {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 64px;
}
.hd-contact-email {
  font-size: clamp(18px, 2.6vw, 26px);
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
  word-break: break-all;
  transition: color var(--dur-base) var(--ease-out);
  display: inline-block;
  will-change: transform;
  letter-spacing: -0.01em;
}
.hd-contact-email.is-primary {
  font-size: clamp(24px, 4.2vw, 44px);
  letter-spacing: -0.02em;
}
.hd-contact-email:hover { color: var(--accent); }

.hd-contact-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
  text-align: left;
}
.hd-contact-meta-col { display: flex; flex-direction: column; gap: 8px; }
.hd-contact-meta-label {
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.hd-contact-meta-col span:last-child {
  font-size: var(--fs-small);
  font-weight: 500;
  line-height: 1.55;
  color: var(--ink);
}
@media (max-width: 760px) {
  .hd-contact-head { margin-bottom: 40px; }
  .hd-contact-emails { margin-bottom: 48px; }
  .hd-contact-meta { grid-template-columns: 1fr; gap: 24px; padding-top: 36px; }
}

/* ─── Footer ──────────────────────────────────────────────── */
.hd-footer {
  padding: 28px 0;
}
.hd-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.hd-footer-id {
  font-weight: 700;
  font-size: var(--fs-meta);
  color: var(--ink);
}
.hd-footer-id span {
  color: var(--muted);
  font-weight: 400;
}
.hd-footer-year {
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 480px) {
  .hd-footer-id { font-size: 13px; }
  .hd-footer-id span { display: block; margin-top: 2px; }
}

/* ─── Reusable: badges (used elsewhere too) ───────────────── */
.hd-stack-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  background: var(--paper-soft);
  color: var(--ink);
  border-radius: 3px;
}
