/* NGD component kit
   Reusable classes shared by the header, footer, and every section:
   buttons, cards, eyebrow labels, chips, form fields, project cards,
   and the primary site navigation. Ported from brand-guidelines.html.
   Depends on tokens.css and base.css being loaded first. */

/* Eyebrow label, pairs with the .reg mark defined in tokens.css */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: var(--sp-4);
}
.eyebrow .reg { width: 13px; height: 13px; }

/* Card surface */
.card {
  background: linear-gradient(180deg, var(--ink-2), rgba(36, 22, 33, .5));
  border: 1px solid var(--hair);
  border-radius: var(--radius-card);
  padding: 26px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--body);
  font-weight: 520;
  font-size: 15px;
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .25s cubic-bezier(.16,1,.3,1), box-shadow .25s cubic-bezier(.16,1,.3,1), background .25s cubic-bezier(.16,1,.3,1);
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--brand);
  color: var(--ink);
  box-shadow: 0 10px 30px -12px var(--brand);
}

.btn-secondary {
  background: transparent;
  border-color: var(--secondary);
  color: var(--paper);
}
.btn-secondary:hover { background: var(--secondary); }

.btn-ghost {
  background: var(--hair-soft);
  color: var(--paper);
}

/* Form fields */
.field { margin-top: 14px; }
.field label {
  display: block;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  /* paper-dim rather than paper-faint at this size, so the label still
     clears WCAG AA contrast (paper-faint drops under 4.5:1 on the ink
     background at 12px). */
  color: var(--paper-dim);
  margin-bottom: var(--sp-2);
}
.field input,
.field textarea {
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--hair);
  border-radius: var(--radius-control);
  padding: 15px 16px;
  color: var(--paper);
  font-family: var(--body);
  font-size: 15px;
  outline: none;
  transition: border-color .25s cubic-bezier(.16,1,.3,1), box-shadow .25s cubic-bezier(.16,1,.3,1);
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus,
.field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(41, 161, 221, .25);
}

/* Public form alerts (success/error banners) and inline field errors,
   shared by the contact page and homepage CTA forms. */
.form-alert {
  border-radius: var(--radius-control);
  padding: 14px 16px;
  margin-bottom: var(--sp-4);
  font-size: 14px;
}
.form-alert--error {
  background: rgba(216, 30, 91, .14);
  border: 1px solid var(--secondary);
}
.form-alert--success {
  background: rgba(41, 161, 221, .14);
  border: 1px solid var(--brand);
}
.field-error {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--secondary);
}
.field.has-error input,
.field.has-error textarea {
  border-color: var(--secondary);
}

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip-tag {
  font-size: 13px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--hair);
  color: var(--paper-dim);
}
.chip-tag.on {
  background: var(--secondary);
  border-color: var(--secondary);
  color: var(--paper);
}

/* Project card */
.project-card {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--hair);
  background: var(--ink-2);
}
.project-card .thumb {
  height: 150px;
  background: linear-gradient(120deg, var(--teal), var(--brand) 45%, var(--secondary));
  position: relative;
}
.project-card .thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(253, 240, 213, .25), transparent 55%);
}
.project-card .pc-body { padding: 20px; }
.project-card .pc-cat {
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand);
}
.project-card .pc-title {
  font-family: var(--display);
  font-size: 22px;
  margin: 8px 0 4px;
}
.project-card .pc-desc { font-size: 14px; color: var(--paper-dim); }

/* Skip link, visually hidden until keyboard focus. Fixed (not absolute) so
   its offscreen position is relative to the viewport, not the tall,
   position:relative body, which would otherwise push it thousands of
   pixels up the page. */
.skip-link {
  position: fixed;
  top: -80px;
  left: var(--sp-3);
  z-index: 100;
  padding: 12px 20px;
  background: var(--brand);
  color: var(--ink);
  font-weight: 520;
  text-decoration: none;
  border-radius: var(--radius-control);
  transition: top .25s cubic-bezier(.16,1,.3,1);
}

.skip-link:focus-visible,
.skip-link:focus {
  top: var(--sp-3);
}

/* Primary site navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(26, 15, 25, .72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hair-soft);
}

.site-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-top: var(--sp-3);
  padding-bottom: var(--sp-3);
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.site-header__logo {
  height: 34px;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex: 1;
  justify-content: flex-end;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  list-style: none;
}

.site-nav__list a {
  position: relative;
  display: inline-block;
  padding: 6px 2px;
  font-size: 15px;
  color: var(--paper-dim);
  text-decoration: none;
  transition: color .25s cubic-bezier(.16,1,.3,1);
}

.site-nav__list a::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 2px;
  height: 1px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s cubic-bezier(.16,1,.3,1);
}

.site-nav__list a:hover,
.site-nav__list a:focus-visible {
  color: var(--paper);
}

.site-nav__list a:hover::after,
.site-nav__list a:focus-visible::after {
  transform: scaleX(1);
}

/* Active top-level nav item, set via nav_is_active() in header.php */
.site-nav__list a.is-active {
  color: var(--paper);
}

.site-nav__list a.is-active::after {
  transform: scaleX(1);
  background: var(--secondary);
}

.site-nav__cta-item { flex: none; }

/* The CTA is a pill button rendered inside the nav list, not a plain text
   link, so it needs to win back its .btn styling from the higher-specificity
   .site-nav__list a rules (display, padding, colour) and opts out of the
   underline hover treatment given to the other items. */
.site-nav__list a.site-nav__cta {
  display: inline-flex;
  padding: 14px 26px;
  color: var(--ink);
}

.site-nav__list a.site-nav__cta::after { content: none; }

/* Mobile menu toggle, hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--hair);
  border-radius: var(--radius-control);
  background: var(--hair-soft);
  cursor: pointer;
  flex: none;
}

.nav-toggle__bar {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--paper);
  border-radius: 2px;
  transition: transform .3s cubic-bezier(.16,1,.3,1), opacity .3s cubic-bezier(.16,1,.3,1);
}

@media (max-width: 820px) {
  .site-nav {
    justify-content: flex-end;
  }

  .site-nav__list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: var(--sp-3) var(--gutter) var(--sp-4);
    background: var(--ink-2);
    border-bottom: 1px solid var(--hair);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .25s cubic-bezier(.16,1,.3,1), transform .25s cubic-bezier(.16,1,.3,1), visibility .25s;
  }

  .site-nav__list li { width: 100%; }
  .site-nav__list a { display: block; width: 100%; padding: 12px 2px; }

  .site-nav__cta-item { margin-top: var(--sp-3); }
  .btn.btn-primary.site-nav__cta { display: flex; width: 100%; justify-content: center; }

  .nav-toggle { display: flex; }

  .site-header.open .site-nav__list {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .site-header.open .nav-toggle__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .site-header.open .nav-toggle__bar:nth-child(2) {
    opacity: 0;
  }
  .site-header.open .nav-toggle__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

/* Site footer */
.site-footer {
  border-top: 1px solid var(--hair-soft);
  padding-top: var(--sp-6);
  padding-bottom: var(--sp-5);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--sp-5);
}

@media (max-width: 720px) {
  .site-footer__grid { grid-template-columns: 1fr; gap: var(--sp-4); }
}

.site-footer__brand strong {
  display: block;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 400;
  color: var(--paper);
  margin-bottom: var(--sp-2);
}

.site-footer__brand p {
  color: var(--paper-dim);
  font-size: 15px;
  max-width: 32ch;
}

.site-footer__nav ul,
.site-footer__social {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.site-footer__nav a,
.site-footer__social a,
.site-footer__contact a {
  color: var(--paper-dim);
  text-decoration: none;
  font-size: 15px;
  transition: color .25s cubic-bezier(.16,1,.3,1);
}

.site-footer__nav a:hover,
.site-footer__social a:hover,
.site-footer__contact a:hover,
.site-footer__nav a:focus-visible,
.site-footer__social a:focus-visible,
.site-footer__contact a:focus-visible {
  color: var(--brand);
}

.site-footer__contact {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.site-footer__social {
  margin-top: var(--sp-2);
}

.site-footer__bottom {
  margin-top: var(--sp-6);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--hair-soft);
  font-size: 13px;
  /* paper-dim, not paper-faint, to hold WCAG AA contrast at this size */
  color: var(--paper-dim);
}
