/* ================================================================
   ORYX — RESPONSIVE STYLESHEET
===================================================================
   Contains every layout adjustment for smaller screens and
   touch-based devices.

   BREAKPOINTS
   - 1200px: Small desktop
   - 1100px: Tablet navigation and mobile menu
   - 900px: Portrait tablet
   - 720px: Mobile
   - 430px: Small mobile
   - hover: none: Touch-device interaction adjustments

   BUYER NOTES
   - Base component styles are stored in style.css.
   - Keep this file loaded after style.css in every HTML page.
   - Test custom content at each breakpoint after editing text.
================================================================ */

/* ================================================================
   SMALL DESKTOP — 1200PX AND BELOW
================================================================ */

@media (max-width: 1200px) {
  .hero-title-block {
    width: 90%;
  }

  .hero-title-block h1 {
    font-size: clamp(4rem, 8vw, 8rem);
  }

  .hero-side-copy {
    left: 5%;
  }

  .hero-about {
    right: 5%;
    width: 36%;
  }

  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ================================================================
   TABLET NAVIGATION AND MOBILE MENU — 1100PX AND BELOW
================================================================ */

@media (max-width: 1100px) {
  .desktop-nav {
    display: none;
  }

  .header-shell {
    grid-template-columns: 1fr auto;
    grid-template-areas: "nav actions";
  }

  .brand {
    justify-self: start;
  }

  .menu-toggle {
    display: grid;
  }

  .mobile-menu {
    position: fixed;
    z-index: 1050;
    inset: 0;

    display: grid;
    align-items: start;

    padding: 104px 20px 20px;

    visibility: hidden;
    opacity: 0;

    background: rgba(8, 8, 8, 0.94);

    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);

    transition:
      opacity var(--transition),
      visibility var(--transition);
  }

  .mobile-menu.open {
    visibility: visible;
    opacity: 1;
  }

  .mobile-menu-panel {
    padding: 24px;

    background:
      radial-gradient(
        circle at 90% 0,
        rgba(255, 98, 68, 0.14),
        transparent 28%
      ),
      #111;

    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 26px;
  }

  .mobile-menu nav {
    display: grid;
  }

  .mobile-menu a:not(.button) {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 16px 3px;

    color: rgba(255, 255, 255, 0.62);

    border-bottom: 1px solid rgba(255, 255, 255, 0.12);

    font-family: "Space Grotesk", sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
  }

  .mobile-menu a.active {
    color: #ffb3ce;
  }

  .mobile-menu a svg {
    width: 18px;
  }

  .mobile-menu .button {
    margin-top: 24px;
  }

  .hero-editorial {
    min-height: 840px;
  }

  .hero-side-copy {
    display: none;
  }

  .hero-title-block {
    top: 32%;
    right: 4%;
    width: 90%;
  }

  .hero-about {
    width: 40%;
  }

  .hero-case {
    width: 34%;
  }

  .page-hero-grid {
    grid-template-columns: 1fr 0.7fr;
    gap: 45px;
  }

  .footer-top {
    grid-template-columns: 1.2fr repeat(3, 0.7fr);
    gap: 30px;
  }
}

/* ================================================================
   PORTRAIT TABLET — 900PX AND BELOW
================================================================ */

@media (max-width: 900px) {
  .section {
    padding: 100px 0;
  }

  .hero-title-block {
    top: 30%;
    right: 4%;
    width: 92%;
  }

  .hero-title-block h1 {
    font-size: clamp(3.7rem, 9.5vw, 6rem);
  }

  .hero-rotating-word {
    max-width: 100%;
    padding-right: 0.12em;
    font-size: 0.58em;
  }

  .hero-about {
    right: 5%;
    width: 45%;
  }

  .hero-case {
    width: 38%;
  }

  .editorial-grid,
  .story-grid,
  .contact-grid,
  .page-hero-grid {
    grid-template-columns: 1fr;
  }

  .editorial-grid,
  .story-grid {
    gap: 42px;
  }

  .editorial-index {
    display: flex;
    align-items: center;
    gap: 14px;
  }

  .editorial-index p {
    margin: 0;
  }

  .manifesto-copy > p {
    margin-left: 0;
  }

  .work-grid {
    grid-template-columns: 1fr;
  }

  .work-visual,
  .work-card-large .work-visual {
    min-height: 460px;
  }

  .metrics-band {
    grid-template-columns: repeat(2, 1fr);
  }

  .metrics-label,
  .metric-editorial {
    border-bottom: 1px solid var(--line);
  }

  .process-editorial .editorial-grid {
    gap: 52px;
  }

  .page-hero {
    min-height: 640px;
  }

  .page-hero-grid {
    align-items: start;
  }

  .page-hero-copy {
    max-width: 650px;
  }

  .story-sticky,
  .detail-sidebar,
  .faq-categories,
  .legal-nav {
    position: static;
  }

  .values-grid {
    grid-template-columns: 1fr;
  }

  .timeline {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 48px;
  }

  .detail-layout {
    grid-template-columns: 1fr;
    gap: 45px;
  }

  .detail-sidebar {
    display: flex;
    overflow-x: auto;
    gap: 5px;
  }

  .detail-sidebar a {
    flex: 0 0 auto;
  }

  .detail-sidebar svg {
    display: none;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 650px;
    margin-inline: auto;
  }

  .faq-shell,
  .legal-layout {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .faq-categories {
    display: flex;
    overflow-x: auto;
  }

  .faq-category {
    flex: 0 0 auto;
  }

  .legal-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 18px;

    padding-bottom: 18px;

    border-bottom: 1px solid var(--line);
  }

  .legal-nav a {
    border: 0;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* ================================================================
   MOBILE — 720PX AND BELOW
================================================================ */

@media (max-width: 720px) {
  body {
    background: var(--bg);
  }

  main {
    margin: 0;
  }

  /* Mobile navbar and header dimensions. */

  .site-header {
    top: 10px;
    right: auto;
    left: 50%;

    width: calc(100% - 20px);
    padding: 0;
  }

  .site-header .container {
    width: 100%;
  }

  .site-header.scrolled {
    top: 7px;
  }

  .header-shell {
    min-height: 62px;
    padding: 6px 7px 6px 12px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .brand-mark img {
    width: 35px;
    height: 35px;
  }

  .brand-name {
    font-size: 0.9rem;
  }

  .brand-descriptor {
    display: none;
  }

  .header-cta {
    display: none;
  }

  .mobile-menu {
    padding: 82px 10px 10px;
  }

  /* Global mobile containers and section spacing. */

  .container,
  .container-narrow {
    width: min(calc(100% - 30px), var(--container));
  }

  .section {
    padding: 82px 0;
  }

  .section-sm {
    padding: 58px 0;
  }

  /* Mobile homepage hero layout. */

  .hero-editorial {
    min-height: 1040px;
  }

  .hero-media {
    object-position: 39% center;
  }

  .hero-shade {
    background:
      linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.88) 0%,
        transparent 56%
      ),
      linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.22),
        rgba(0, 0, 0, 0.44)
      );
  }

  .hero-badge {
    top: 88px;
    left: 18px;
  }

  .hero-availability {
    top: 95px;
    right: 18px;
  }

  .hero-side-mark,
  .hero-scroll {
    display: none;
  }

  /*
   * The title uses the available width between both page margins.
   * The 12.5vw size prevents HUMAN-FIRST from leaving the viewport.
   */

  .hero-title-block {
    top: 25%;
    right: 18px;
    left: 18px;

    width: auto;
    max-width: none;
  }

  .hero-title-block h1 {
    max-width: 100%;
    margin: 0;

    font-size: clamp(3.1rem, 12.5vw, 5.25rem);
    line-height: 0.86;
    text-align: right;
  }

  .hero-rotating-word {
    display: block;

    max-width: 100%;
    padding-right: 0.14em;

    font-size: 0.56em;
    line-height: 1.08;
    white-space: nowrap;
  }

  .hero-about {
    right: 18px;
    bottom: clamp(285px, 58vw, 420px);

    width: calc(100% - 36px);
  }

  .hero-about p {
    max-width: 430px;
  }

  .hero-case {
    bottom: 20px;
    left: 18px;

    width: calc(100% - 36px);
  }

  .hero-case-image {
    aspect-ratio: 2.2;
  }

  .hero-wordmark {
    height: 20vw;
    margin: 0 0 -1vw;

    font-size: 25vw;
  }

  /* Mobile typography scale. */

  .manifesto-copy h2,
  .section-heading h2,
  .editorial-heading h2 {
    font-size: clamp(2.6rem, 12vw, 4.5rem);
  }

  .heading-row,
  .editorial-heading {
    align-items: flex-start;
    flex-direction: column;

    margin-bottom: 42px;
  }

  .heading-note {
    text-align: left;
  }

  /* Mobile service components. */

  .service-row {
    grid-template-columns: 45px 1fr 42px;
    gap: 12px;

    padding: 24px 2px;
  }

  .service-row p {
    display: none;
  }

  .service-row h3 {
    font-size: 1.35rem;
  }

  /* Mobile portfolio cards. */

  .work-visual,
  .work-card-large .work-visual {
    min-height: 340px;
  }

  /* Mobile metric layouts. */

  .metrics-band {
    grid-template-columns: 1fr;
  }

  .metrics-label,
  .metric-editorial {
    min-height: 180px;

    border-right: 0;
  }

  /* Mobile process rows. */

  .process-row {
    grid-template-columns: 78px 1fr 25px;
    gap: 12px;
  }

  .process-row p {
    display: none;
  }

  .process-row h3 {
    font-size: 1.2rem;
  }

  /* Mobile testimonial slider. */

  .testimonial {
    padding: 28px;
  }

  .testimonial-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  /* Mobile call-to-action panels. */

  .cta-panel {
    padding: 45px 24px;
  }

  .cta-panel h2 {
    font-size: clamp(2.8rem, 13vw, 4.8rem);
  }

  /* Mobile inner-page components. */

  .page-hero {
    min-height: 610px;
    padding: 135px 0 68px;

    background-position: 42% center;
  }

  .page-hero h1 {
    font-size: clamp(3.2rem, 15vw, 5.3rem);
  }

  .page-hero::after {
    right: 4vw;
    bottom: 1vw;

    font-size: 18vw;
    letter-spacing: 0.025em;
  }

  .bento-grid {
    grid-template-columns: 1fr;
  }

  .bento-card.large,
  .bento-card.medium,
  .bento-card.third,
  .bento-card.half {
    grid-column: auto;
    min-height: 340px;
  }

  .service-grid,
  .team-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    min-height: 340px;
  }

  .team-portrait {
    min-height: 280px;
  }

  .timeline {
    grid-template-columns: 1fr;
  }

  .integration-cloud {
    min-height: 430px;
  }

  .integration-core {
    width: 100px;
    height: 100px;
  }

  .integration-core img {
    width: 66px;
  }

  .integration-item {
    width: 52px;
    height: 52px;

    font-size: 0.6rem;
  }

  .architecture {
    grid-template-columns: 1fr;
  }

  .metrics-strip {
    grid-template-columns: 1fr;
  }

  .metric {
    border-right: 0;
    border-bottom: 1px solid rgba(17, 17, 17, 0.18);
  }

  .metric:last-child {
    border-bottom: 0;
  }

  .pricing-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .billing-toggle {
    justify-content: center;
  }

  .contact-grid {
    gap: 14px;
  }

  .contact-card {
    padding: 25px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .field.full {
    grid-column: auto;
  }

  /* Mobile footer layout. */

  .footer-top {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-brand {
    grid-column: auto;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer {
    margin: 0;
  }

  .back-to-top {
    right: 18px;
    bottom: 18px;
  }
}

/* ================================================================
   SMALL MOBILE — 430PX AND BELOW
================================================================ */

@media (max-width: 430px) {
  .hero-editorial {
    min-height: 980px;
  }

  .hero-badge {
    padding-right: 10px;
    font-size: 0.6rem;
  }

  .hero-availability p {
    font-size: 0.6rem;
  }

  .hero-title-block {
    right: 14px;
    left: 14px;
  }

  .hero-title-block h1 {
    font-size: clamp(2.9rem, 12.5vw, 3.4rem);
  }

  .hero-rotating-word {
    padding-right: 0.12em;
    font-size: 0.56em;
  }

  .hero-case-image {
    aspect-ratio: 2;
  }

  .button {
    --button-height: 48px;
    --button-orb-size: 38px;
  }

  .footer-legal {
    flex-wrap: wrap;
  }
}

/* ================================================================
   TOUCH DEVICES
   Removes pointer-only effects when hover is unavailable.
================================================================ */

@media (hover: none) {
  .cursor-glow {
    display: none;
  }

  .work-card:hover,
  .service-card:hover,
  .bento-card:hover {
    transform: none;
  }
}
