/* ==========================================================================
   HYTES — components.css
   Reusable UI: header, buttons, cards, chips, forms, footer.
   ========================================================================== */

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

.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease),
              backdrop-filter 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.header.is-stuck {
  background: rgba(8, 13, 32, 0.78);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--line-dark);
  box-shadow: 0 10px 40px -28px rgba(0, 0, 0, 0.9);
}

.header__inner {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Brand lockup: supplied logo mark + wordmark */
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-right: auto;
  flex: 0 0 auto;
}

.brand__mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 6px 20px -10px rgba(3, 204, 254, 0.7);
}

.brand__text { display: flex; flex-direction: column; line-height: 1; }

.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-variation-settings: "wdth" 118;
  font-size: 1.19rem;
  letter-spacing: 0.16em;
  color: var(--white);
}

.brand__tag {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-top: 5px;
}

.nav { display: flex; align-items: center; gap: 0.35rem; }

.nav__link {
  position: relative;
  padding: 0.55rem 0.8rem;
  border-radius: 8px;
  font-size: 0.938rem;
  font-weight: 500;
  color: var(--text-on-dark-muted);
  transition: color 0.2s var(--ease);
  white-space: nowrap;
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  bottom: 0.28rem;
  height: 1.5px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s var(--ease);
}

.nav__link:hover { color: var(--white); }
.nav__link:hover::after,
.nav__link.is-current::after { transform: scaleX(1); }
.nav__link.is-current { color: var(--white); }

.header__cta { flex: 0 0 auto; }

/* Mobile toggle */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line-dark);
  color: var(--white);
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }

/* The in-menu CTA only exists for the mobile drawer. */
.nav__cta { display: none; }

/* Tighten the bar before it has to collapse. */
@media (max-width: 1280px) {
  .header__inner { gap: 0.75rem; }
  .nav__link { padding-inline: 0.55rem; font-size: 0.906rem; }
  .brand__name { font-size: 1.09rem; letter-spacing: 0.13em; }
}

@media (max-width: 1120px) {
  .nav-toggle { display: flex; }
  .header__cta { display: none; }
  .nav__cta { display: block; }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem var(--gutter) 1.6rem;
    background: rgba(8, 13, 32, 0.97);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line-dark);
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.85);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
  }

  .nav.is-open { opacity: 1; transform: none; visibility: visible; pointer-events: auto; }

  .nav__link {
    padding: 0.95rem 0.25rem;
    font-size: 1.06rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0;
  }
  .nav__link::after { display: none; }
  .nav__link.is-current { color: var(--cyan); }

  .nav__cta { margin-top: 1.25rem; }
  .nav__cta .btn { width: 100%; }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.969rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.2;
  text-align: center;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease),
              background 0.25s var(--ease), border-color 0.25s var(--ease),
              color 0.25s var(--ease);
}

.btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: linear-gradient(100deg, var(--blue) 0%, #2f5bff 55%, var(--violet) 130%);
  color: var(--white);
  box-shadow: var(--shadow-blue);
}
.btn--primary:hover { box-shadow: 0 20px 44px -16px rgba(2, 99, 254, 0.7); }

.btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.22);
  color: var(--white);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.4); }

.btn--outline {
  background: var(--white);
  border-color: var(--line-strong);
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}
.btn--outline:hover { border-color: var(--blue); color: var(--blue); }

.btn--sm { padding: 0.62rem 1.1rem; font-size: 0.9rem; }
.btn--lg { padding: 1rem 1.75rem; font-size: 1.031rem; }
.btn--block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.85rem; }

/* --------------------------------------------------------------------------
   Icons
   -------------------------------------------------------------------------- */

.icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.icon-tile {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, rgba(2, 99, 254, 0.12), rgba(110, 75, 255, 0.12));
  border: 1px solid rgba(2, 99, 254, 0.18);
  color: var(--blue);
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.icon-tile--dark {
  background: linear-gradient(150deg, rgba(3, 204, 254, 0.14), rgba(110, 75, 255, 0.16));
  border-color: var(--line-dark);
  color: var(--cyan);
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */

.card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 2.4vw, 1.9rem);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
  height: 100%;
}

.card h3 { margin-top: 1.15rem; margin-bottom: 0.55rem; font-size: var(--step-1); }
.card p { color: var(--text-muted); font-size: 0.969rem; line-height: 1.62; }

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(2, 99, 254, 0.35);
  box-shadow: var(--shadow-lg);
}
.card:hover .icon-tile {
  background: linear-gradient(150deg, var(--blue), var(--violet));
  border-color: transparent;
  color: var(--white);
}

.card--dark {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015));
  border-color: var(--line-dark);
  box-shadow: none;
  color: var(--text-on-dark);
}
.card--dark p { color: var(--text-on-dark-muted); }
.card--dark:hover { border-color: rgba(3, 204, 254, 0.4); box-shadow: 0 24px 60px -34px rgba(3, 204, 254, 0.6); }

/* --------------------------------------------------------------------------
   Chips & pills
   -------------------------------------------------------------------------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.42rem 0.95rem 0.42rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line-dark);
  background: rgba(255, 255, 255, 0.05);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-on-dark);
}

.pill__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(3, 204, 254, 0.16);
  animation: pulse-dot 2.6s var(--ease) infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(3, 204, 254, 0.18); }
  50%      { box-shadow: 0 0 0 7px rgba(3, 204, 254, 0.04); }
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line-dark);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-on-dark);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.chip:hover { background: rgba(3, 204, 254, 0.1); border-color: rgba(3, 204, 254, 0.45); }
.chip[aria-pressed="true"] {
  background: linear-gradient(100deg, rgba(2, 99, 254, 0.9), rgba(110, 75, 255, 0.9));
  border-color: transparent;
  color: var(--white);
}

/* --------------------------------------------------------------------------
   Form
   -------------------------------------------------------------------------- */

.form { display: grid; gap: 1.15rem; }

.form__grid {
  display: grid;
  gap: 1.15rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.form__grid > .field--full { grid-column: 1 / -1; }

@media (max-width: 640px) {
  .form__grid { grid-template-columns: 1fr; }
}

.field { display: grid; gap: 0.42rem; }

.field__label {
  font-family: var(--font-mono);
  font-size: 0.688rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.field__label .req { color: var(--blue); }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.82rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text);
  font-size: 0.969rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.field textarea { min-height: 118px; resize: vertical; }

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a5570' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 18px;
  padding-right: 2.6rem;
}

.field input::placeholder,
.field textarea::placeholder { color: #98a2ba; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(2, 99, 254, 0.14);
}

.field__error {
  font-size: 0.813rem;
  color: #c1123c;
  min-height: 0;
  display: none;
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: #d61f47;
  background: #fff7f9;
}
.field.has-error .field__error { display: block; }

.form__note {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.844rem;
  color: var(--text-faint);
  line-height: 1.55;
}
.form__note .icon { width: 17px; height: 17px; margin-top: 2px; flex: 0 0 auto; color: var(--blue); }

.form__status {
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.05rem;
  font-size: 0.938rem;
  line-height: 1.5;
  display: none;
}
.form__status.is-success {
  display: block;
  background: #e8f8ef;
  border: 1px solid #98dcb5;
  color: #0a6b3a;
}
.form__status.is-error {
  display: block;
  background: #fdeef1;
  border: 1px solid #f3b6c3;
  color: #a5163a;
}

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

.footer {
  background: var(--ink);
  color: var(--text-on-dark-muted);
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
  border-top: 1px solid var(--line-dark);
}

.footer__grid {
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr) minmax(0, 0.95fr) minmax(0, 1.15fr);
}

@media (max-width: 900px) {
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .footer__grid { grid-template-columns: 1fr; }
}

.footer__brand p { margin-top: 1.1rem; max-width: 34ch; font-size: 0.938rem; }

.footer__title {
  font-family: var(--font-mono);
  font-size: 0.688rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 1rem;
}

.footer__list { display: grid; gap: 0.65rem; font-size: 0.938rem; }
.footer__list a { transition: color 0.2s var(--ease); }
.footer__list a:hover { color: var(--cyan); }

.footer__contact-item { display: flex; gap: 0.65rem; align-items: flex-start; font-size: 0.938rem; }
.footer__contact-item .icon { width: 18px; height: 18px; margin-top: 3px; color: var(--cyan); flex: 0 0 auto; }

.footer__social { display: flex; gap: 0.6rem; margin-top: 1.4rem; }
.footer__social a {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 10px;
  border: 1px solid var(--line-dark);
  color: var(--text-on-dark);
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.footer__social a:hover { background: rgba(3, 204, 254, 0.12); border-color: rgba(3, 204, 254, 0.45); color: var(--cyan); }

.footer__bottom {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.844rem;
}
.footer__legal { display: flex; gap: 1.25rem; flex-wrap: wrap; }
