/* ==========================================================================
   DeilTech homepage hero
   Scoped to the hero-only homepage layout (ViewData["HeroLayout"] = true).
   Does not affect Privacy, Error, or any other page.

   Brand color/typography/spacing variables now live in tokens.css (loaded
   globally in _Layout.cshtml) so they are available site-wide, including on
   pages that don't load this stylesheet. Values are unchanged.
   ========================================================================== */

body.hero-page {
  margin: 0;
  min-height: 100vh;
  font-family: var(--dt-font);
  background: var(--dt-charcoal);
  overflow-x: hidden;
}

/* ========== Header / Navigation ========== */

.hero-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  /* Trimmed again alongside the larger .hero-header__mark below so the
     header's overall height grows only as much as the bigger logo
     requires, not by the full logo increase on top of unchanged padding. */
  padding: 1.2rem 0;
  background: transparent;
}

.hero-header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem;
  padding: 0 clamp(1.25rem, 4vw, 3.5rem);
}

.hero-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.95rem;
  text-decoration: none;
  color: var(--dt-white);
}

.hero-header__brand:hover,
.hero-header__brand:focus-visible {
  color: var(--dt-white);
  text-decoration: none;
  opacity: 0.9;
}

/* Approved stacked logo is taller than it is wide, so the header only
   constrains height — width follows automatically to preserve its
   aspect ratio (see .brand__lockup in components.css). Desktop size
   raised ~41% (4.25rem -> 6rem) per production-readiness pass; reduced
   at the tablet/mobile breakpoints below so the header doesn't grow
   excessively tall on smaller viewports. */
.hero-header__mark {
  height: 6rem;
  width: auto;
  max-width: 100%;
}

/* Visually hidden but still keyboard-focusable checkbox that drives the
   mobile nav toggle (avoids <details>, whose closed content cannot be
   forced visible by overriding a child's display property in current
   browsers). */
.hero-header__toggle-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  pointer-events: none;
}

.hero-header__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3.5rem;
}

.hero-header__nav a {
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--dt-white);
  text-decoration: none;
  transition: color 0.2s ease;
}

.hero-header__nav a:hover,
.hero-header__nav a:focus-visible {
  color: var(--dt-gold-hover);
}

.hero-header__nav a.is-active {
  color: var(--dt-gold);
}

.hero-header__right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.25rem;
}

.hero-header__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 0.4rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--dt-white);
  cursor: pointer;
}

.hero-header__toggle-input:focus-visible ~ .hero-header__right .hero-header__toggle {
  outline: 2px solid var(--dt-white);
  outline-offset: 3px;
}

.hero-header__toggle-icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.26rem;
  width: 1.1rem;
}

.hero-header__toggle-icon span {
  display: block;
  height: 2px;
  width: 100%;
  background: currentColor;
  border-radius: 999px;
}

.hero-header__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 3rem;
  min-width: 10rem;
  padding: 0 2.25rem;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--dt-charcoal);
  background: var(--dt-gold);
  border: 2px solid var(--dt-gold);
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.hero-header__cta:hover,
.hero-header__cta:focus-visible {
  color: var(--dt-charcoal);
  background: var(--dt-gold-hover);
  border-color: var(--dt-gold-hover);
  transform: translateY(-1px);
  text-decoration: none;
}

.hero-header__cta:focus-visible {
  outline: 2px solid var(--dt-white);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .hero-header__toggle {
    display: inline-flex;
  }

  .hero-header__nav {
    display: none;
    position: absolute;
    top: calc(100% + 0.65rem);
    right: clamp(1.25rem, 4vw, 3.5rem);
    z-index: 40;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.1rem;
    min-width: 12rem;
    padding: 0.5rem;
    background: rgba(26, 28, 31, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.5rem;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  }

  .hero-header__toggle-input:checked ~ .hero-header__nav {
    display: flex;
  }

  .hero-header__nav a {
    padding: 0.65rem 0.75rem;
    border-radius: 0.35rem;
  }

  .hero-header__nav a:hover,
  .hero-header__nav a:focus-visible {
    background: rgba(255, 255, 255, 0.08);
  }
}

@media (max-width: 480px) {
  .hero-header__cta {
    min-width: 0;
    padding: 0 1.1rem;
    font-size: 0.82rem;
  }
}

/* ========== Hero ========== */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
  background-color: var(--dt-charcoal);
  background-image: url("/images/hero/deiltech-hero-v1.webp");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: right 30%;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    90deg,
    rgba(26, 28, 31, 0.94) 0%,
    rgba(26, 28, 31, 0.82) 32%,
    rgba(26, 28, 31, 0.42) 62%,
    rgba(26, 28, 31, 0) 88%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 650px;
  margin: 0;
  /* Top offset nudged down ~24px (1.5rem) from the previous clamp so the
     content sits slightly lower under the taller header on standard
     desktop heights. The short-laptop safety-rail clamp below (max-height:
     820px) is intentionally left as-is to keep content above the fold on
     smaller laptop screens. */
  padding: clamp(10.25rem, calc(12vh + 4.25rem), 12.25rem) clamp(1.25rem, 4vw, 3.5rem) 2rem;
}

.hero__title {
  margin: 0 0 1.5rem;
  font-size: clamp(2.75rem, 5.5vw, 4.5rem);
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--dt-white);
}

.hero__title-line {
  display: block;
  line-height: 1.05;
}

.hero__title-line--second {
  margin-top: 0.4em;
}

.hero__subtitle {
  margin: 0 0 1.5rem;
  font-size: clamp(1.1rem, 1.8vw, 1.375rem);
  font-weight: 600;
  line-height: 1.45;
  color: var(--dt-gold);
}

.hero__body {
  margin: 0 0 2.25rem;
  max-width: 34rem;
  font-size: clamp(1rem, 1.2vw, 1.125rem);
  font-weight: 400;
  line-height: 1.7;
  color: var(--dt-muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 1rem;
}

a.hero__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  min-height: 56px;
  padding: 0 2.1rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  border-radius: 999px;
  white-space: nowrap;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

a.hero__btn--primary {
  color: var(--dt-charcoal);
  background: var(--dt-gold);
  border: 2px solid var(--dt-gold);
  box-shadow: 0 10px 26px rgba(8, 12, 20, 0.35);
}

a.hero__btn--primary:hover,
a.hero__btn--primary:focus-visible {
  color: var(--dt-charcoal);
  background: var(--dt-gold-hover);
  border-color: var(--dt-gold-hover);
  transform: translateY(-1px);
  text-decoration: none;
}

a.hero__btn--secondary {
  color: var(--dt-gold);
  background: transparent;
  border: 2px solid var(--dt-gold);
}

a.hero__btn--secondary:hover,
a.hero__btn--secondary:focus-visible {
  color: var(--dt-white);
  background: rgba(201, 138, 62, 0.14);
  border-color: var(--dt-gold-hover);
  transform: translateY(-1px);
  text-decoration: none;
}

a.hero__btn:focus-visible {
  outline: 2px solid var(--dt-white);
  outline-offset: 3px;
}

/* ========== Bottom services ribbon ========== */

.hero__ribbon {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  width: 100%;
  padding: 1.5rem clamp(1.25rem, 4vw, 3.5rem);
  background: rgba(15, 16, 18, 0.72);
  border-top: 1px solid var(--dt-gold-line);
  backdrop-filter: blur(6px);
}

.hero__ribbon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  padding: 0.35rem 0.9rem;
  text-align: center;
  border-left: 1px solid var(--dt-gold-line);
}

.hero__ribbon-item:first-child {
  border-left: none;
}

.hero__ribbon-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  color: var(--dt-gold);
}

.hero__ribbon-icon svg {
  width: 38px;
  height: 38px;
}

.hero__ribbon-label {
  max-width: 9rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.35;
  color: var(--dt-white);
  white-space: normal;
}

/* ========== Motion ========== */

@keyframes dt-fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dt-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.hero__title,
.hero__subtitle,
.hero__body,
.hero__actions {
  animation: dt-fade-up 0.7s ease-out both;
}

.hero__title {
  animation-delay: 0.05s;
}

.hero__subtitle {
  animation-delay: 0.18s;
}

.hero__body {
  animation-delay: 0.3s;
}

.hero__actions {
  animation-delay: 0.42s;
}

.hero__ribbon {
  animation: dt-fade-in 0.9s ease-out 0.55s both;
}

@media (prefers-reduced-motion: reduce) {
  .hero__title,
  .hero__subtitle,
  .hero__body,
  .hero__actions,
  .hero__ribbon {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ========== Desktop vertical rhythm (dock ribbon toward hero bottom) ========== */

@media (min-width: 992px) {
  .hero {
    justify-content: flex-end;
    min-height: calc(100vh + 2.25rem);
  }

  .hero__ribbon {
    margin-top: 4.5rem;
  }
}

/* ========== Laptop height safety (avoid clipping at common laptop heights) ========== */

@media (min-width: 992px) and (max-height: 820px) {
  .hero__content {
    padding-top: clamp(7.75rem, calc(9vh + 2.75rem), 9.25rem);
  }

  .hero__title {
    margin-bottom: 1.1rem;
  }

  .hero__subtitle {
    margin-bottom: 1.1rem;
  }

  .hero__body {
    margin-bottom: 1.5rem;
  }

  .hero__ribbon {
    padding-top: 1.1rem;
    padding-bottom: 1.1rem;
  }
}

/* ========== Tablet ========== */

@media (max-width: 991.98px) {
  .hero {
    min-height: 80vh;
  }

  .hero-header__mark {
    height: 5rem;
  }

  .hero__content {
    padding: clamp(5.5rem, 14vh, 7rem) clamp(1.25rem, 4vw, 2.5rem) 1.5rem;
  }

  .hero__title {
    font-size: clamp(2.4rem, 6vw, 3.4rem);
  }

  .hero__ribbon {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 1.4rem;
  }

  .hero__ribbon-item:nth-child(4) {
    border-left: none;
  }

  .hero__ribbon-icon,
  .hero__ribbon-icon svg {
    width: 34px;
    height: 34px;
  }
}

/* ========== Mobile ========== */

@media (max-width: 575.98px) {
  .hero {
    min-height: 70vh;
  }

  .hero-header__inner {
    padding: 0 1.1rem;
  }

  .hero-header__mark {
    height: 4.25rem;
  }

  .hero__content {
    padding: 5.5rem 1.1rem 1.25rem;
  }

  .hero__title {
    font-size: clamp(2.1rem, 8vw, 2.6rem);
  }

  .hero__subtitle {
    font-size: 1.05rem;
  }

  .hero__body {
    font-size: 0.98rem;
    margin-bottom: 1.5rem;
  }

  .hero__actions {
    flex-direction: column;
  }

  a.hero__btn {
    width: 100%;
  }

  .hero__ribbon {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 1.1rem;
    row-gap: 1.25rem;
  }

  .hero__ribbon-item:nth-child(3) {
    border-left: none;
  }

  .hero__ribbon-icon,
  .hero__ribbon-icon svg {
    width: 28px;
    height: 28px;
  }

  .hero__ribbon-label {
    font-size: 0.72rem;
    max-width: 7rem;
  }
}
