/* ================================================================
   DHDT — Digital HD Technologies
   Signal Design System
   ================================================================ */

/* -- Tokens -- */
:root {
  --void: #09090B;
  --surface: #18181B;
  --emerald: #10B981;
  --emerald-glow: rgba(16, 185, 129, 0.4);
  --emerald-dim: rgba(16, 185, 129, 0.08);
  --emerald-light: #34D399;
  --clean: #FAFAFA;
  --zinc: #52525B;
  --zinc-light: #71717A;
  --zinc-dark: #3F3F46;
  --border: #2A2A2E;

  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Manrope', sans-serif;
  --font-mono: 'Fira Code', monospace;

  --container: 1080px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--clean);
  background-color: var(--void);
  line-height: 1.65;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* -- Utility -- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* -- Scroll progress bar -- */
.accent-line {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--emerald);
  z-index: 1000;
  will-change: width;
  box-shadow: 0 0 8px var(--emerald-glow);
}

/* -- Reveal animations -- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal--left {
  transform: translateX(-32px) translateY(0);
}

.reveal--scale {
  transform: scale(0.96) translateY(12px);
}

.revealed {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal--left, .reveal--scale {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ================================================================
   NAV
   ================================================================ */
.nav {
  position: fixed;
  top: 2px;
  left: 0;
  right: 0;
  z-index: 900;
  transition: background-color 0.3s, backdrop-filter 0.3s;
}

.nav--scrolled {
  background-color: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.nav__logo img {
  height: 28px;
  width: auto;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav__link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--zinc-light);
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

.nav__link:hover,
.nav__link:focus-visible {
  color: var(--clean);
}

.nav__cta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--emerald);
  padding: 0.4rem 1rem;
  border: 1px solid var(--emerald-dim);
  border-radius: 6px;
  transition: background-color 0.2s, border-color 0.2s;
}

.nav__cta:hover,
.nav__cta:focus-visible {
  background-color: var(--emerald-dim);
  border-color: var(--emerald);
}

/* Mobile toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav__toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--clean);
  transition: transform 0.3s, opacity 0.3s;
}

.nav__toggle--open span:first-child {
  transform: translateY(3.25px) rotate(45deg);
}

.nav__toggle--open span:last-child {
  transform: translateY(-3.25px) rotate(-45deg);
}

/* Mobile menu */
.nav__mobile {
  display: none;
  flex-direction: column;
  padding: 1rem var(--gutter) 2rem;
  background-color: rgba(9, 9, 11, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav__mobile--open {
  display: flex;
}

.nav__mobile-link {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--zinc-light);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}

.nav__mobile-link:hover { color: var(--clean); }

.nav__mobile-cta {
  color: var(--emerald);
  border-bottom: none;
  margin-top: 0.5rem;
}

@media (max-width: 640px) {
  .nav__links { display: none; }
  .nav__toggle { display: flex; }
}

/* ================================================================
   HERO
   ================================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: 8rem 0 6rem;
  overflow: hidden;

  /* Dot grid */
  background-image: radial-gradient(rgba(16, 185, 129, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
}

.hero__glow {
  position: absolute;
  top: 30%;
  left: 50%;
  width: 600px;
  height: 600px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
  pointer-events: none;
  will-change: transform, opacity;
}

.hero__content {
  will-change: transform, opacity;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero__tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--emerald);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--clean);
  margin-bottom: 1.25rem;
}

.hero__tagline {
  font-family: var(--font-mono);
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: var(--emerald);
  margin-bottom: 2rem;
}

.hero__body {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  color: var(--zinc-light);
  line-height: 1.75;
  max-width: 600px;
  margin-bottom: 2.5rem;
}

.hero__actions {
  display: flex;
  gap: 1rem;
}

/* -- Button -- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: 8px;
  padding: 0.75rem 1.75rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
  text-decoration: none;
}

.btn--primary {
  background-color: var(--emerald);
  color: var(--void);
  position: relative;
  overflow: hidden;
}

.btn--primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 100%
  );
  transition: left 0.5s ease;
}

.btn--primary:hover::after,
.btn--primary:focus-visible::after {
  left: 100%;
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background-color: var(--emerald-light);
  box-shadow: 0 0 24px var(--emerald-glow);
  transform: translateY(-1px);
}

.btn--lg {
  padding: 1rem 2.25rem;
  font-size: 0.95rem;
}

/* ================================================================
   SECTION LABEL
   ================================================================ */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--emerald);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 3rem;
}

.section-label::before {
  content: '// ';
  color: var(--zinc-dark);
}

/* ================================================================
   SERVICES
   ================================================================ */
/* -- Section border grow -- */
.services,
.process,
.about,
.contact {
  position: relative;
  border-top: none;
}

.services::before,
.process::before,
.about::before,
.contact::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--border);
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.border-visible::before {
  width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .services::before,
  .process::before,
  .about::before,
  .contact::before {
    width: 100%;
    transition: none;
  }
}

.services {
  padding: 7rem 0;
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.card {
  position: relative;
  padding: 2rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-left: 2px solid var(--emerald-dim);
  border-radius: 8px;
  transition: border-color 0.4s, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s;
}

.card:hover {
  border-left-color: var(--emerald);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(16, 185, 129, 0.06),
              0 0 0 1px rgba(16, 185, 129, 0.1);
}

.card__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--zinc);
  margin-bottom: 1rem;
}

.card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--clean);
  margin-bottom: 0.75rem;
}

.card__body {
  font-size: 0.95rem;
  color: var(--zinc-light);
  line-height: 1.7;
}

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

/* ================================================================
   PROCESS
   ================================================================ */
.process {
  padding: 7rem 0;
}

.process__steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.step {
  display: flex;
  gap: 2rem;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
}

.step:first-child {
  border-top: 1px solid var(--border);
}

.step__number {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 500;
  color: var(--emerald);
  line-height: 1;
  min-width: 3rem;
  opacity: 0.7;
}

.step__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--clean);
  margin-bottom: 0.5rem;
}

.step__body {
  font-size: 0.95rem;
  color: var(--zinc-light);
  line-height: 1.7;
  max-width: 520px;
}

@media (max-width: 640px) {
  .step { gap: 1.25rem; }
  .step__number { font-size: 1.75rem; min-width: 2rem; }
}

/* ================================================================
   ABOUT
   ================================================================ */
.about {
  padding: 7rem 0;
}

.about__content {
  max-width: 560px;
}

.about__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.75rem;
  color: var(--clean);
  margin-bottom: 1.5rem;
}

.about__bio {
  font-size: 1rem;
  color: var(--zinc-light);
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.about__bio:last-of-type {
  margin-bottom: 1.5rem;
}

.about__tagline {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--emerald);
  margin-bottom: 1.5rem;
  opacity: 0.8;
}

.about__location {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--zinc);
}

.about__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--emerald);
  box-shadow: 0 0 6px var(--emerald-glow);
  animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ================================================================
   CONTACT
   ================================================================ */
.contact {
  padding: 7rem 0 5rem;
}

.contact__inner {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.contact__heading {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--clean);
  margin-bottom: 1rem;
}

.contact__body {
  font-size: 1.05rem;
  color: var(--zinc-light);
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

/* ================================================================
   CONTACT FORM
   ================================================================ */
.form__card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  position: relative;
  overflow: hidden;
}

/* Subtle emerald edge glow on the card */
.form__card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--emerald) 50%,
    transparent 100%
  );
  opacity: 0.3;
}

.form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form__field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: left;
}

.form__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--zinc-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.form__input,
.form__textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--clean);
  background-color: var(--void);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
  -webkit-appearance: none;
}

.form__input:hover,
.form__textarea:hover {
  border-color: var(--zinc);
  background-color: rgba(9, 9, 11, 0.8);
}

.form__input:focus,
.form__textarea:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px var(--emerald-dim), 0 0 16px rgba(16, 185, 129, 0.06);
  background-color: var(--void);
}

.form__input::placeholder,
.form__textarea::placeholder {
  color: var(--zinc-dark);
  font-weight: 400;
}

.form__textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.form__submit {
  margin-top: 0.75rem;
  width: 100%;
}

.form__submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.form__status {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  min-height: 1.2rem;
  text-align: center;
  transition: opacity 0.3s;
}

.form__status--success {
  color: var(--emerald);
}

.form__status--error {
  color: #ef4444;
}

.form__note {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--zinc);
  margin-top: 1.5rem;
  text-align: center;
}

.form__note a {
  color: var(--zinc-light);
  transition: color 0.2s;
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 2px;
}

.form__note a:hover {
  color: var(--emerald);
  text-decoration-color: var(--emerald);
}

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

/* ================================================================
   FOOTER
   ================================================================ */
.footer {
  position: relative;
  background-color: var(--surface);
  padding: 2.5rem 0;
}

.footer__accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--emerald) 50%,
    transparent 100%
  );
  opacity: 0.4;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.footer__company {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--clean);
  margin-bottom: 0.25rem;
}

.footer__tagline {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--emerald);
  opacity: 0.7;
}

.footer__right {
  text-align: right;
}

.footer__link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--zinc-light);
  transition: color 0.2s;
  display: block;
  margin-bottom: 0.25rem;
}

.footer__link:hover { color: var(--emerald); }

.footer__copy {
  font-size: 0.75rem;
  color: var(--zinc);
}

@media (max-width: 640px) {
  .footer__inner {
    flex-direction: column;
    gap: 1.5rem;
  }
  .footer__right { text-align: left; }
}

/* ================================================================
   FOCUS STYLES
   ================================================================ */
:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 2px;
}

/* ================================================================
   SELECTION
   ================================================================ */
::selection {
  background-color: rgba(16, 185, 129, 0.25);
  color: var(--clean);
}
