/*! Draftingware Confidential. Copyright (c) 2024–2026 Draftingware Technologies Pvt. Ltd. All rights reserved. */

/* ─── Breakpoint: ≤ 1279px (large tablet / small laptop) ─── */
@media (max-width: 1279px) {
   :root {
      --type-hero-size: 72px;
      --type-hero-lh: 70px;
      --type-menu-size: 56px;
      --type-menu-lh: 62px;
      --page-margin: 48px;
      --hero-box-height: auto;
   }

   .hero {
      padding: 74px 12px 10px;
   }

   .hero-box {
      padding-left: 60px;
      padding-right: 60px;
   }

   .hero-content {
      gap: 64px;
   }
   .hero-right {
      flex: 0 0 480px;
      width: 480px;
   }

   .platform-pillars {
      grid-template-columns: repeat(2, 1fr);
   }

   .stat-grid {
      grid-template-columns: repeat(2, 1fr);
   }
   .reality-headline {
      font-size: 24px;
   }

   .pillar-grid {
      grid-template-columns: repeat(3, 1fr);
   }
   .pillar-card__inner {
      padding: 24px 20px;
   }
   .platform-headline {
      font-size: 24px;
   }

   .product-headline {
      font-size: 42px;
   }

   .access-layout {
      gap: 48px;
   }
   .access-headline {
      font-size: 30px;
      line-height: 34px;
   }
}

/* ─── Breakpoint: ≤ 1024px (tablet landscape) ──────────── */
@media (max-width: 1024px) {
   .hero-content {
      gap: 48px;
   }
   .hero-right {
      flex: 0 0 380px;
      width: 380px;
   }

   .pillar-grid {
      grid-template-columns: 1fr;
      gap: 8px;
   }
   .pillar-card__inner {
      padding: 24px 20px;
      min-height: unset;
   }
   .platform-headline {
      font-size: 22px;
   }

   .access-layout {
      grid-template-columns: 1fr;
      gap: 40px;
   }
   .access-left {
      max-width: 560px;
   }
}

/* ─── Breakpoint: ≤ 1023px (tablet landscape / small laptop) ── */
@media (max-width: 1023px) {
   .hero-content {
      gap: 10px;
   }
   .hero-right {
      flex: 0 0 340px;
      width: 340px;
   }

   /* Product: 2-column grid */
   .product-headline {
      font-size: 36px;
   }
   .product-features {
      grid-template-columns: repeat(2, 1fr);
   }
   /* Reset 3-col right-edge rule */
   .product-feat:nth-child(3n) {
      border-right: 0.5px solid rgba(0, 0, 0, 0.08);
      padding-right: 32px;
   }
   .product-feat:nth-child(3n + 2),
   .product-feat:nth-child(3n + 3) {
      padding-left: 32px;
   }
   /* 2-col: right column has no right border */
   .product-feat:nth-child(2n) {
      border-right: none;
      padding-right: 0;
   }
   /* 2-col: left column has no left padding */
   .product-feat:nth-child(2n + 1) {
      padding-left: 0;
   }
   /* Bottom row (last 2): no bottom border */
   .product-feat:nth-child(n + 5) {
      border-bottom: none;
   }
   .product-feat:nth-child(n + 4) {
      border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
   }
}

/* ─── Breakpoint: ≤ 767px (tablet portrait / large phone) ── */
@media (max-width: 767px) {
   :root {
      --type-hero-size: 52px;
      --type-hero-lh: 52px;
      --type-section-size: 36px;
      --type-section-lh: 40px;
      --type-menu-size: 40px;
      --type-menu-lh: 46px;
      --section-pad-v: var(--section-pad-v-mobile);
      --page-margin: var(--page-margin-mobile);
   }

   /* Nav */
   .nav-links {
      display: none;
   }

   /* Hero */
   .hero {
      padding-left: 12px;
      padding-right: 12px;
   }

   .hero-box {
      padding-left: 16px;
      padding-right: 16px;
      border-radius: 16px;
      min-height: unset;
      flex-direction: column;
      justify-content: center;
      align-items: stretch;
      gap: 0;
   }

   .hero-content {
      flex-direction: column;
      align-items: flex-start;
      justify-content: center;
      gap: 0;
      width: 100%;
   }

   .hero-left {
      display: flex;
      flex-direction: row;
      align-items: center;
      gap: 12px;
      width: 100%;
      flex: 0 0 100%;
      padding-top: 0;
      box-sizing: border-box;
   }

   .hero-built {
      width: auto;
      font-size: clamp(32px, 9vw, 48px);
      line-height: 1;
      letter-spacing: -0.05em;
      white-space: nowrap;
      margin-bottom: 0;
   }

   .hero-subtext {
      flex: 1;
      min-width: 0;
      width: 0; /* ← forces flex child to use flex:1 for width reference */
      overflow-wrap: break-word;
      word-break: break-word;
      white-space: normal; /* ← ensure wrapping is on */
      font-size: clamp(11px, 2.8vw, 14px);
      line-height: 1.5;
      margin-top: 0;
      max-width: none;
      align-self: center;
   }

   .hero-word-fallback {
      display: none;
   }

   .hero-right {
      order: unset;
      display: flex;
      flex: 0 0 auto;
      width: 100%;
      height: 160px;
      min-height: 160px;
      margin-top: 24px;
      position: relative;
      overflow: hidden;
   }

   #hero-particle-canvas {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      display: block;
   }

   .btn-primary,
   .btn-ghost {
      width: 100%;
      justify-content: center;
   }

   /* Reality */
   .reality-grid {
      grid-template-columns: 1fr;
      gap: var(--space-8);
   }

   .reality-stat {
      grid-template-columns: 80px 1fr;
   }

   .reality-stat-num {
      font-size: 32px;
   }

   /* Platform */
   .platform-intro {
      grid-template-columns: 1fr;
      gap: var(--space-5);
   }

   .platform-pillars {
      grid-template-columns: 1fr;
   }

   /* Early access */
   .form-row--two {
      grid-template-columns: 1fr;
   }
   .form-row--submit {
      flex-direction: column;
      align-items: flex-start;
   }
   .form-submit {
      width: 100%;
      justify-content: center;
   }
   .access-headline {
      font-size: 26px;
      line-height: 30px;
   }

   /* Menu */
   .stat-grid {
      grid-template-columns: 1fr 1fr;
      gap: 8px;
   }
   .stat-number {
      font-size: 52px;
      color: var(--color-accent-amber);
   }
   .stat-card {
      border-radius: 16px;
      padding: 24px 20px;
   }
   .reality-headline {
      font-size: 20px;
   }

   .pillar-grid {
      grid-template-columns: 1fr;
      gap: 8px;
   }
   .pillar-card__inner {
      padding: 20px 16px;
      min-height: unset;
   }
   .platform-headline {
      font-size: 20px;
   }

   /* Product: 1-column stack */
   .product-headline {
      font-size: 32px;
      line-height: 1.08;
   }
   .product-body {
      font-size: 14px;
   }
   .product-features {
      grid-template-columns: 1fr;
   }
   .product-feat {
      padding: 20px 0;
      border-right: none;
      border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
   }
   /* Reset all nth-child column overrides */
   .product-feat:nth-child(3n),
   .product-feat:nth-child(2n) {
      border-right: none;
      padding-right: 0;
   }
   .product-feat:nth-child(3n + 2),
   .product-feat:nth-child(3n + 3),
   .product-feat:nth-child(2n + 1) {
      padding-left: 0;
   }
   /* Re-enable bottom border on all rows */
   .product-feat:nth-child(n + 4) {
      border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
   }
   /* Last item: no bottom border */
   .product-feat:last-child {
      border-bottom: none;
   }

   /* Menu overlay */
   [data-menu],
   .site-menu {
      width: 100%;
      height: 100%;
      padding: 0;
   }

   .menu-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      height: 72px;
      padding: 0 24px;
      flex-shrink: 0;
   }

   .menu-header .logo img,
   .menu-logo img,
   .menu-header img {
      height: 32px;
      width: auto;
      max-width: 180px;
      display: block;
      opacity: 1;
   }

   body.menu-overlay--open .nav-logo,
   body.menu-overlay--open .nav-brand,
   body.menu-overlay--open .site-nav a:first-child img {
      opacity: 0;
      pointer-events: none;
   }

   .menu-nav {
      flex: 1;
      display: flex;
      flex-direction: column;
      justify-content: flex-end;
      padding: 0 24px 20px;
   }

   .menu-nav-list {
      display: flex;
      flex-direction: column;
      gap: 0;
      padding: 0;
      margin: 0;
   }

   .menu-nav-item,
   .menu-nav-list a {
      font-size: clamp(52px, 14vw, 72px);
      font-weight: 600;
      line-height: 1.05;
      letter-spacing: -0.03em;
      padding: 6px 0;
      color: #1d1d1f;
      display: block;
   }

   .menu-nav-item__num,
   .menu-item-number,
   [class*="__num"],
   [class*="-num"] {
      font-size: clamp(12px, 3.2vw, 16px);
      font-weight: 400;
      color: #6e6e73;
      line-height: 1;
   }

   .menu-bottom {
      padding: 16px 24px 24px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 6px;
      flex-shrink: 0;
      border-top: 1px solid rgba(0, 0, 0, 0.07);
   }

   .menu-bottom a,
   .menu-bottom nav a {
      font-size: 13px;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      color: #1d1d1f;
   }

   .menu-copyright,
   .menu-bottom-meta {
      font-size: 11px;
      color: #6e6e73;
   }

   /* Hamburger: larger touch target */
   .nav-hamburger {
      width: 28px;
      height: 18px;
   }

   .nav-hamburger__line {
      height: 2px;
      background: #1d1d1f;
   }

   /* X state: recalculated for 18px height */
   body.menu-overlay--open .nav-hamburger__line--top {
      transform: translateY(8px) rotate(45deg);
   }

   body.menu-overlay--open .nav-hamburger__line--bot {
      transform: translateY(-8px) rotate(-45deg);
   }

   /* Section box: no sides on mobile — parent provides the 20px */
   .section-box {
      padding-left: 0;
      padding-right: 0;
   }

   .access-section {
      padding-left: 20px;
      padding-right: 20px;
   }

   .access-section .section-box {
      padding: 0;
   }

   /* Blog page: sole source of 20px horizontal on mobile */
   .blog-page {
      padding-left: 20px;
      padding-right: 20px;
   }

   /* Footer */
   .footer-inner {
      grid-template-columns: 1fr;
      gap: 40px;
      padding: 48px 16px;
   }

   .footer-bottom {
      flex-direction: column;
      align-items: flex-start;
      gap: 16px;
      padding: 20px 16px;
   }

   /* Nav */
   .site-nav .container {
      padding-left: 20px;
      padding-right: 20px;
   }

   .nav-logo img,
   .site-nav a img {
      height: 32px;
      width: auto;
      max-width: 180px;
   }
}

/* ─── Breakpoint: ≤ 375px (small phone) ────────────────────  */
@media (max-width: 375px) {
   :root {
      --type-hero-size: 40px;
      --type-hero-lh: 42px;
      --type-section-size: 30px;
      --type-section-lh: 34px;
      --type-menu-size: 32px;
      --type-menu-lh: 38px;
   }

   .hero-box {
      padding-left: 16px;
      padding-right: 16px;
   }

   .hero-left {
      gap: 8px;
   }

   .hero-built {
      font-size: clamp(36px, 18vw, 56px);
   }

   .hero-subtext {
      font-size: 10px;
      line-height: 1.45;
   }

   .stat-grid {
      grid-template-columns: 1fr;
   }
   .stat-number {
      font-size: 60px;
      color: var(--color-accent-amber);
   }
   .pillar-card__inner {
      padding: 16px 14px;
   }
   .access-headline {
      font-size: 22px;
      line-height: 26px;
   }
}

/* ─── Breakpoint: ≤ 767px landscape — rotate-device overlay ── */
@media (max-width: 767px) and (orientation: landscape) {
   .rotate-overlay {
      display: flex;
   }
}
