/*
 * TITUS Digital Holdings LLC: site styles.
 * Brand palette from the TITUS brand document. Fonts are self-hosted (SIL Open Font License).
 */

/* Fonts ------------------------------------------------------------------ */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-300.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-400.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-500.woff2") format("woff2");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/poppins-latin-400.woff2") format("woff2");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/poppins-latin-500.woff2") format("woff2");
}

/* Tokens ----------------------------------------------------------------- */

:root {
  --bg: #040f2b;
  --bg-2: #06173a;
  --line: rgba(180, 205, 255, 0.13);
  --fg: #eef3ff;
  --muted: #b4c2dc;
  --dim: #8696b8;
  --blue: #4498fd;
  --teal: #26c5ba;
  --mint: #67e1be;
  --pale: #dae8fc;
  --ink: #04122e;
  --head: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --beams: url("/assets/img/beams.jpg");
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}

/* Base ------------------------------------------------------------------- */

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

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a {
  color: inherit;
  text-decoration: none;
}

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

p {
  margin: 0;
}

::selection {
  background: rgba(68, 152, 253, 0.4);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 50;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--mint);
  color: var(--ink);
  font-family: var(--head);
  font-size: 14px;
}

.skip-link:focus {
  top: 12px;
}

.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}

.wrap.narrow {
  max-width: 760px;
}

@media (min-width: 900px) {
  .wrap {
    padding-left: max(56px, env(safe-area-inset-left, 0px));
    padding-right: max(56px, env(safe-area-inset-right, 0px));
  }
}

/* Type ------------------------------------------------------------------- */

h1,
h2 {
  margin: 0;
  font-family: var(--head);
  font-weight: 500;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(38px, 5.2vw, 66px);
  line-height: 1.06;
}

h2 {
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.12;
}

.eyebrow {
  margin: 0 0 16px;
  font-family: var(--head);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
}

.grad {
  background: linear-gradient(90deg, var(--blue), var(--teal) 70%, var(--mint));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  max-width: 560px;
  font-size: clamp(16px, 1.4vw, 18px);
  font-weight: 300;
  color: #d3dcee;
}

.rule {
  width: 50px;
  height: 2px;
  margin: 24px 0;
  border: 0;
  background: linear-gradient(90deg, var(--blue), var(--teal));
}

/* Buttons and links ------------------------------------------------------ */

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px;
}

.hero-actions {
  margin-top: 30px;
}

.page-actions {
  margin-top: 32px;
}

.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 13px 28px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--mint), var(--teal));
  color: var(--ink);
  font-family: var(--head);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.35s, filter 0.25s;
}

.btn:hover {
  filter: brightness(1.06);
  box-shadow: 0 0 0 4px rgba(38, 197, 186, 0.16), 0 10px 28px rgba(38, 197, 186, 0.25);
}

.btn:active {
  transform: scale(0.97);
}

.btn.ghost {
  border: 1.5px solid rgba(103, 225, 190, 0.7);
  background: transparent;
  color: var(--fg);
}

.btn.ghost:hover {
  background: rgba(103, 225, 190, 0.1);
}

.btn > *:not(.ripple) {
  position: relative;
  z-index: 1;
}

.arr {
  display: inline-block;
  transition: transform 0.3s var(--ease);
}

.btn:hover .arr {
  transform: translateX(4px);
}

.ripple {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 65%);
  transform: translate(-50%, -50%) scale(0);
  animation: ripple 0.65s ease-out forwards;
}

@keyframes ripple {
  to {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
  }
}

.link-under {
  padding-bottom: 6px;
  border-bottom: 1px solid var(--fg);
  font-family: var(--head);
  font-size: 14px;
  transition: color 0.25s, border-color 0.25s;
}

.link-under:hover {
  color: var(--mint);
  border-color: var(--mint);
}

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

.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 30;
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s;
}

.site-header.scrolled {
  background: rgba(4, 15, 43, 0.84);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.site-header.nav-open {
  background: var(--bg);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 18px;
}

/* Stacked logo: T mark, TITUS wordmark, tagline. */
.lockup {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  width: var(--logo-width);
}

.lockup img {
  width: 66.45%;
}

.lockup svg {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 5.1%;
}

.lockup .tagline {
  margin: 5% -0.42em 0 0;
  font-family: var(--head);
  font-size: max(7.5px, calc(var(--logo-width) * 0.035));
  letter-spacing: 0.42em;
  white-space: nowrap;
  color: rgba(218, 232, 252, 0.8);
}

.lockup-header {
  --logo-width: 130px;
}

.lockup-footer {
  --logo-width: 150px;
}

.menu {
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--head);
  font-size: 13.5px;
}

.menu a {
  position: relative;
  padding-block: 8px;
  transition: color 0.25s;
}

.menu a:hover,
.menu a[aria-current="page"] {
  color: var(--mint);
}

.menu a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--blue), var(--teal));
}

.burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: none;
  color: var(--fg);
  cursor: pointer;
}

.burger span,
.burger span::before,
.burger span::after {
  display: block;
  position: relative;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.25s;
}

.burger span::before,
.burger span::after {
  content: "";
  position: absolute;
  left: 0;
}

.burger span::before {
  top: -6px;
}

.burger span::after {
  top: 6px;
}

.nav-open .burger span {
  background: transparent;
}

.nav-open .burger span::before {
  transform: translateY(6px) rotate(45deg);
}

.nav-open .burger span::after {
  transform: translateY(-6px) rotate(-45deg);
}

/* Hero (home) ------------------------------------------------------------ */

.hero,
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: calc(-1 * var(--header-height, 80px));
  border-bottom: 1px solid var(--line);
}

.aurora {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--bg);
}

.aurora::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 30%;
  right: 0;
  background: var(--beams) center / 100% 100% no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8%);
  mask-image: linear-gradient(90deg, transparent 0, #000 8%);
  animation: glow 9s ease-in-out infinite alternate;
}

.aurora::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 90%, var(--bg) 100%);
}

@keyframes glow {
  from {
    filter: brightness(1);
  }

  to {
    filter: brightness(1.1);
  }
}

.sweep {
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: 0;
  z-index: 1;
  width: 34%;
  pointer-events: none;
  mix-blend-mode: screen;
  background: linear-gradient(90deg, rgba(68, 152, 253, 0) 0%, rgba(68, 152, 253, 0.35) 30%, rgba(150, 235, 225, 0.75) 50%, rgba(68, 152, 253, 0.35) 70%, rgba(68, 152, 253, 0) 100%);
  filter: blur(22px);
  opacity: 0;
  transform: translateX(-110%) skewX(-14deg);
  animation: sweep 9s linear infinite;
}

@keyframes sweep {
  0% {
    transform: translateX(-110%) skewX(-14deg);
    opacity: 0;
  }

  6%,
  94% {
    opacity: 0.9;
  }

  100% {
    transform: translateX(310%) skewX(-14deg);
    opacity: 0;
  }
}

.hero-body {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 40px;
  padding-top: calc(var(--header-height, 80px) + 70px);
  padding-bottom: 64px;
}

.side-note {
  margin: 0 0 6px;
  font-family: var(--head);
  font-size: 10.5px;
  line-height: 2.4;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Page hero (inner pages) ------------------------------------------------ */

.page-hero .aurora::before {
  left: 45%;
  opacity: 0.75;
}

.page-hero .inner {
  position: relative;
  z-index: 2;
  max-width: 760px;
  padding-top: calc(var(--header-height, 80px) + 70px);
  padding-bottom: 70px;
}

.page-hero h1 {
  font-size: clamp(36px, 4.6vw, 58px);
}

.page-hero .lede {
  margin-top: 20px;
}

/* Sections --------------------------------------------------------------- */

.block {
  padding-block: 88px;
}

.alt {
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 760px;
  margin-bottom: 44px;
}

.section-head p:not(.eyebrow) {
  font-size: 17px;
  font-weight: 300;
  color: var(--muted);
}

/* Company card ----------------------------------------------------------- */

.card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 640px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(12, 32, 74, 0.92), rgba(6, 20, 52, 0.92));
}

.card-title {
  font-size: clamp(24px, 2.4vw, 30px);
  line-height: 1.3;
}

.card-text {
  font-weight: 300;
  color: var(--muted);
}

.card-action {
  padding-top: 8px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag {
  padding: 5px 11px;
  border: 1px solid rgba(68, 152, 253, 0.25);
  border-radius: 999px;
  background: rgba(68, 152, 253, 0.12);
  color: var(--pale);
  font-family: var(--head);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Contact form ----------------------------------------------------------- */

.enquiry[hidden] {
  display: none;
}

.noscript-note {
  color: var(--muted);
}

.noscript-note a {
  color: var(--mint);
  text-decoration: underline;
}

.enquiry {
  display: grid;
  gap: 16px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(10, 29, 68, 0.55);
}

.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-family: var(--head);
  font-size: 13px;
  color: var(--pale);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(4, 15, 43, 0.7);
  color: var(--fg);
  font: inherit;
  font-size: 15px;
}

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

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(38, 197, 186, 0.18);
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: var(--muted);
}

.consent input {
  margin-top: 4px;
  accent-color: var(--teal);
}

.consent a {
  color: var(--mint);
  text-decoration: underline;
}

.form-msg {
  min-height: 1.2em;
  font-size: 14px;
  color: var(--mint);
}

/* Legal text ------------------------------------------------------------- */

.legal-text {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 820px;
  font-size: 15px;
  font-weight: 300;
  color: var(--muted);
}

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

.site-footer {
  padding-block: 48px 28px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 14px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.footer-brand {
  margin-bottom: 6px;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
}

.footer-legal span + span::before {
  content: "|";
  margin: 0 10px;
  color: var(--line);
}

.footer-legal a:hover {
  color: var(--mint);
}

/* Motion ----------------------------------------------------------------- */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.rise > * {
  animation: rise 0.7s var(--ease) backwards;
}

.rise > :nth-child(1) { animation-delay: 0.05s; }
.rise > :nth-child(2) { animation-delay: 0.15s; }
.rise > :nth-child(3) { animation-delay: 0.28s; }
.rise > :nth-child(4) { animation-delay: 0.38s; }
.rise > :nth-child(5) { animation-delay: 0.48s; }

.brand,
.menu li {
  animation: rise 0.6s var(--ease) backwards;
}

.menu li:nth-child(2) { animation-delay: 0.05s; }
.menu li:nth-child(3) { animation-delay: 0.1s; }
.menu li:nth-child(4) { animation-delay: 0.15s; }

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .sweep,
  .ripple {
    display: none;
  }

  .aurora::before,
  .rise > *,
  .brand,
  .menu li {
    animation: none;
  }

  .btn,
  .site-header {
    transition: none;
  }

  .btn:active {
    transform: none;
  }
}

/* Responsive ------------------------------------------------------------- */

@media (max-width: 960px) {
  .burger {
    display: inline-flex;
  }

  .menu-panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 6px max(24px, env(safe-area-inset-right, 0px)) 24px max(24px, env(safe-area-inset-left, 0px));
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    box-shadow: 0 30px 40px rgba(0, 0, 0, 0.4);
  }

  .nav-open .menu-panel {
    display: block;
  }

  .menu {
    flex-direction: column;
    gap: 0;
  }

  .menu li {
    border-bottom: 1px solid var(--line);
  }

  .menu a {
    display: block;
    padding-block: 15px;
    font-size: 17px;
  }

  .menu a[aria-current="page"]::after {
    display: none;
  }

  .hero-body {
    grid-template-columns: 1fr;
  }

  .aurora::before {
    left: 15%;
  }

  .side-note {
    margin-top: 4px;
  }
}

@media (max-width: 600px) {
  .lockup-header {
    --logo-width: 108px;
  }

  .hero-body {
    padding-top: calc(var(--header-height, 72px) + 40px);
    padding-bottom: 44px;
  }

  .aurora::before {
    left: 0;
    background-size: auto 115%;
    background-position: 68% 0;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .aurora::after {
    background:
      linear-gradient(90deg, rgba(4, 15, 43, 0.62) 0%, rgba(4, 15, 43, 0.3) 50%, rgba(4, 15, 43, 0) 100%),
      linear-gradient(180deg, rgba(4, 15, 43, 0) 0%, rgba(4, 15, 43, 0.15) 55%, rgba(4, 15, 43, 0.75) 85%, var(--bg) 100%);
  }

  .block {
    padding-block: 60px;
  }

  .card {
    padding: 26px;
  }

  .row2 {
    grid-template-columns: 1fr;
  }

  .actions {
    gap: 20px;
  }

  .footer-legal {
    flex-direction: column;
    gap: 6px;
  }

  .footer-legal span + span::before {
    display: none;
  }
}
