/* =========================================================
   Higherd – single page
   Mobile-first. Breakpoints: 480px, 768px (tablet), 1024px (desktop)
   ========================================================= */

/* ---------- 1. Design tokens ---------- */
:root {
  --color-primary:      #4F46E5;
  --color-primary-dark: #4338CA;
  --color-logo:         #5B21B6;
  --color-bg-light:     #E9E5FF;
  --color-text:         #0F0A1F;
  --color-text-muted:   #475569;
  --color-footer-1:     #2A0A4A;
  --color-footer-2:     #1A0533;
  --color-footer-3:     #5C0A1A;
  --color-footer-glow:  #3B0F7A;
  --color-footer-head:  #B9A8E0;
  --color-white:        #FFFFFF;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --gutter: 16px;
  --content-max: 1200px;
  --tap: 44px;
  --radius-pill: 999px;
  --transition: 180ms ease;
}

/* ---------- 2. Reset & base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-footer-2);
  -webkit-font-smoothing: antialiased;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

h1,
h2,
p,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

/* Visible focus for keyboard users (white ring + purple halo works on video and dark footer) */
:focus-visible {
  outline: 3px solid var(--color-white);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(79, 70, 229, 0.6);
}

/* Hidden SVG sprite */
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ---------- 3. Shared components ---------- */

/* Logo */
.logo {
  display: inline-block;
  border-radius: 6px;
}

.logo img {
  height: 46px;
  width: auto;
}

/* Pill button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0 1.5rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--transition), transform var(--transition);
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn--primary:hover {
  background: var(--color-primary-dark);
}

.btn--primary:active {
  transform: translateY(1px);
}

/* Social icon buttons (circular outline, fill white on hover) */
.social {
  display: flex;
  gap: 12px;
}

.social__link {
  display: grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.04);
  transition: background-color var(--transition), color var(--transition), border-color var(--transition);
}

.social__link svg {
  width: 20px;
  height: 20px;
}

.social__link:hover {
  background: var(--color-white);
  border-color: var(--color-white);
  color: var(--color-logo);
}

/* ---------- 4. Hero ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;      /* fallback */
  min-height: 100svh;
  padding: 20px var(--gutter) 16px;
  color: var(--color-white);
  overflow: hidden;
  isolation: isolate;
}

/* Background video + poster fallback */
.hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--color-footer-2) url("../assets/img/hero-poster.jpg") center / cover no-repeat;
}

.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Portrait screens: show the whole landscape frame so the video's own text isn't cropped.
   #090909 matches the video's background, so the letterbox is invisible. */
@media (max-aspect-ratio: 1/1) {
  .hero__media {
    background-color: #090909;
    background-size: contain;
  }

  .hero__video {
    object-fit: contain;
  }
}

/* Shade only the top and bottom edges (logo, buttons, chevron);
   the middle stays clear so the video's own typography reads cleanly */
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(26, 5, 51, 0.8),
    rgba(26, 5, 51, 0.35) 12%,
    transparent 24%,
    transparent 72%,
    rgba(26, 5, 51, 0.7)
  );
}

/* Top bar */
.hero__bar {
  display: flex;
  align-items: center;
  min-height: var(--tap);
}

/* Socials + contact: bottom area on mobile */
.hero__actions {
  grid-row: 2;
  align-self: end;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Scroll-down chevron */
.hero__scroll {
  grid-row: 3;
  justify-self: center;
  display: grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  margin-top: 12px;
  border-radius: 50%;
  color: var(--color-white);
  opacity: 0.85;
}

.hero__scroll svg {
  width: 28px;
  height: 28px;
  animation: nudge 1.8s ease-in-out infinite;
}

.hero__scroll:hover {
  opacity: 1;
}

@keyframes nudge {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}

/* ---------- 4a. Intro (headline below the video) ---------- */
.intro {
  color: var(--color-text);
  background: linear-gradient(180deg, var(--color-white), var(--color-bg-light));
}

.intro__inner {
  display: grid;
  gap: 1.25rem;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 4rem var(--gutter) 1rem;
}

.intro__title {
  font-size: clamp(2.25rem, 4vw + 1rem, 4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.intro__subline {
  max-width: 34rem;
  font-size: clamp(1.0625rem, 0.4vw + 0.95rem, 1.25rem);
  line-height: 1.55;
  color: var(--color-text-muted);
}

@media (min-width: 1024px) {
  .intro__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 26rem);
    align-items: end;
    gap: 4rem;
    padding-top: 6rem;
  }
}

/* ---------- 4b. Contact section (lavender → white, form card) ---------- */
.contact {
  scroll-margin-top: 0;
  box-shadow: 0 -2px 0 var(--color-bg-light);   /* hides a sub-pixel seam with the intro band */
  color: var(--color-text);
  background: linear-gradient(180deg, var(--color-bg-light) 0%, #F4F2FF 45%, var(--color-white) 100%);
}

/* Focus ring for light backgrounds */
.contact :focus-visible {
  outline-color: var(--color-primary);
  box-shadow: none;
}

.contact__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);   /* stops the marquee from widening the column */
  gap: 3rem;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 4rem var(--gutter) 5rem;
}

.contact__title {
  font-size: clamp(2rem, 3vw + 1.25rem, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.contact__lead {
  margin-top: 1rem;
  font-size: 1.125rem;
  color: var(--color-text-muted);
}

.contact__lead a {
  color: var(--color-text-muted);
  text-underline-offset: 3px;
}

.contact__lead a:hover {
  color: var(--color-primary);
}

.contact__label {
  margin: 2.5rem 0 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748B;
}

.contact__label--accent {
  margin-top: 3rem;
  font-weight: 600;
  color: var(--color-primary);
}

/* Feature list */
.features {
  display: grid;
  gap: 1.1rem;
}

.features li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-primary);
}

.features svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 1px;
}

/* "Trusted by" marquee */
.clients {
  display: flex;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.clients__track {
  display: flex;
  flex-shrink: 0;
  gap: 1rem;
  padding-right: 1rem;
  animation: marquee 30s linear infinite;
}

.clients:hover .clients__track {
  animation-play-state: paused;
}

.clients__track li {
  display: grid;
  place-items: center;
  height: 56px;
  padding: 0 1.25rem;
  border-radius: 8px;
  background: var(--color-white);
  box-shadow: 0 1px 3px rgba(15, 10, 31, 0.08);
  font-weight: 700;
  font-size: 0.9375rem;
  color: #6B7280;
  white-space: nowrap;
}

@keyframes marquee {
  to { transform: translateX(-100%); }
}

/* Form card */
.contact__card {
  padding: 1.5rem 1.25rem;
  border-radius: 16px;
  background: var(--color-white);
  box-shadow:
    0 0 0 1px rgba(226, 232, 240, 0.7),
    0 20px 25px -5px rgba(15, 10, 31, 0.06),
    0 8px 10px -6px rgba(15, 10, 31, 0.05);
}

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

.form__title {
  font-size: 0.9375rem;
  font-weight: 600;
}

.form__row {
  display: grid;
  gap: 1.1rem;
}

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

.field label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
}

.req {
  color: #A5B4FC;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: var(--tap);
  padding: 0.55rem 0.85rem;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  background: var(--color-white);
  font: inherit;
  font-size: 1rem;      /* 16px avoids iOS zoom on focus */
  color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

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

.field select {
  appearance: none;
  padding-right: 2.5rem;
  background: var(--color-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F0A1F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 0.85rem center / 16px no-repeat;
  cursor: pointer;
}

.field ::placeholder {
  color: #94A3B8;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: #CBD5E1;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18);
}

.field [aria-invalid="true"] {
  border-color: #DC2626;
}

.field [aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.field__error {
  font-size: 0.8125rem;
  color: #DC2626;
}

.field__error:empty {
  display: none;
}

.form__status {
  font-size: 0.875rem;
  color: #B91C1C;
}

.form__status:empty {
  display: none;
}

.form__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.25rem;
}

/* Light pill button (as on the reference contact page) */
.btn--light {
  border: 0;
  background: #F1F5F9;
  color: var(--color-text);
  cursor: pointer;
  font-family: inherit;
}

.btn--light:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn--light[disabled] {
  cursor: progress;
  opacity: 0.7;
}

/* Success message */
.form__success {
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  padding: 2.5rem 0;
  text-align: center;
  color: var(--color-text-muted);
  outline: none;
}

.form[hidden],
.form__success[hidden] {
  display: none;
}

.form__success-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 0.5rem;
  border-radius: 50%;
  background: var(--color-bg-light);
  color: var(--color-primary);
}

.form__success-icon svg {
  width: 28px;
  height: 28px;
}

.form__success-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
}

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

  .contact__card {
    padding: 2rem;
  }
}

@media (min-width: 1024px) {
  .contact__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 32rem);
    align-items: start;
    gap: 4rem;
    padding-top: 6rem;
    padding-bottom: 6rem;
  }

  .contact__intro {
    padding-top: 1rem;
  }
}

/* ---------- 5. Footer ---------- */
.footer {
  color: var(--color-white);
  background:
    radial-gradient(60% 55% at 0% 0%, rgba(59, 15, 122, 0.95), transparent 70%),
    radial-gradient(55% 60% at 100% 100%, rgba(92, 10, 26, 0.95), transparent 70%),
    linear-gradient(135deg, var(--color-footer-1), var(--color-footer-2));
}

.footer__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 3.5rem var(--gutter) 2rem;
}

.footer__top {
  display: grid;
  gap: 2.5rem;
}

.footer__brand .logo img {
  height: 52px;
}

.footer__tagline {
  margin-top: 1.75rem;
  font-size: clamp(1.75rem, 1.5vw + 1.4rem, 2rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* Link groups */
.footer__groups {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem 2.5rem;
}

.footer__heading {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-footer-head);
}

.footer__links {
  display: grid;
  gap: 0.25rem;
  margin-top: 0.75rem;
}

.footer__links a,
.footer__legal a {
  display: inline-block;
  padding: 0.35rem 0;   /* comfortable tap height */
  font-size: 15px;
  line-height: 1.6;
  text-decoration: none;
  text-underline-offset: 3px;
}

.footer__links a:hover,
.footer__legal a:hover {
  text-decoration: underline;
}

/* Bottom bar */
.footer__bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
}

.footer__copy {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.9);
}

.footer__legal {
  display: flex;
  gap: 1.75rem;
}

/* ---------- 6. Breakpoint: ≥480px ---------- */
@media (min-width: 480px) {
  .footer__groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- 7. Breakpoint: ≥768px (tablet) ---------- */
@media (min-width: 768px) {
  :root {
    --gutter: 32px;
  }

  .hero {
    grid-template-rows: auto 1fr auto;
    padding-top: 24px;
  }

  /* Socials + contact move to the top-right, aligned with the logo */
  .hero__actions {
    grid-row: auto;   /* otherwise grid row 2 becomes its positioning box */
    position: absolute;
    top: 24px;
    right: var(--gutter);
    padding: 0;
    border: 0;
    gap: 20px;
  }

  .footer__groups {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer__bottom {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    text-align: left;
  }

  .footer__legal {
    justify-self: end;
  }
}

/* ---------- 8. Breakpoint: ≥1024px (desktop) ---------- */
@media (min-width: 1024px) {
  :root {
    --gutter: 48px;
  }

  .footer__inner {
    padding-top: 5rem;
  }

  .footer__top {
    grid-template-columns: 35% 1fr;
    gap: 2rem;
  }

  .footer__groups {
    gap: 3rem 2.5rem;
  }
}

/* Wide screens: keep the gutter in line with the footer's 1200px column */
@media (min-width: 1296px) {
  :root {
    --gutter: calc((100vw - var(--content-max)) / 2);
  }

  .footer__inner,
  .intro__inner,
  .contact__inner {
    padding-left: 0;
    padding-right: 0;
  }
}

/* ---------- 9. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  /* Hide the video; .hero__media shows the poster as background */
  .hero__video {
    display: none;
  }

  .hero__scroll svg,
  .clients__track {
    animation: none;
  }

  /* Without the animation, let visitors scroll the client row instead */
  .clients {
    overflow-x: auto;
  }

  .clients__track[aria-hidden="true"] {
    display: none;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
