/* ================================================
   RAWNAQ — RESPONSIVE CSS
   Mobile-first adjustments and breakpoints
   ================================================ */

/* ================================================
   LARGE DESKTOP (1920px+)
   ================================================ */
@media (min-width: 1920px) {
  :root {
    --fs-jumbo: 120px;
    --fs-hero:  96px;
  }

  .hero__bg-word {
    font-size: 16vw;
  }
}

/* ================================================
   STANDARD DESKTOP (1200px–1440px)
   Default — base styles apply
   ================================================ */

/* ================================================
   MEDIUM (768px–1200px)
   ================================================ */
@media (max-width: 1200px) {
  .process__header-panel {
    width: 45vw;
  }

  .process__panel {
    width: 55vw;
  }

  .difference__item-title {
    font-size: clamp(20px, 2.2vw, 36px);
  }
}

/* ================================================
   TABLET / SMALL DESKTOP (768px–1024px)
   ================================================ */
@media (max-width: 1024px) {
  .hero__container {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    text-align: left;
  }

  .hero__title {
    font-size: clamp(40px, 6.5vw, 76px);
    max-width: 100%;
  }

  .hero__stats,
  .hero__scroll-mouse {
    display: none;
  }

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

  .project--02,
  .project--04 {
    margin-left: 0;
  }
}

/* ================================================
   MOBILE (max-width: 768px)
   Primary mobile adjustments
   ================================================ */
@media (max-width: 768px) {

  /* Nav */
  .nav__center {
    display: none;
  }

  #scroll-progress {
    display: none;
  }

  /* Hero */
  #hero {
    height: auto;
    min-height: 100vh;
    padding-bottom: var(--space-2xl);
  }

  .hero__container {
    grid-template-columns: 1fr;
    padding-top: calc(var(--nav-height) + 32px);
    padding-bottom: var(--space-xl);
    gap: var(--space-xl);
  }

  .hero__title {
    font-size: clamp(36px, 9.5vw, 56px);
    max-width: 100%;
    margin-bottom: var(--space-xs);
  }

  .hero__sub {
    max-width: 100%;
    font-size: var(--fs-body);
  }

  .hero__bg-word {
    display: none;
  }

  .hero__cta-row {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-lg);
  }

  .hero__bottom-bar {
    display: none;
  }

  /* Chapter shift — no sticky on mobile */
  .shift__pin-container {
    height: auto;
  }

  .shift__sticky {
    position: relative;
    height: auto;
    padding: var(--space-2xl) 0;
  }

  .shift__content {
    padding: 0 clamp(24px, 5vw, 48px);
  }

  .shift__line-text {
    font-size: clamp(32px, 8vw, 56px);
    transform: translateY(0) !important;
    opacity: 1 !important;
  }

  .shift__conclusion-text {
    font-size: clamp(28px, 7vw, 48px);
    transform: translateY(0) !important;
    opacity: 1 !important;
  }

  .shift__divider {
    width: 100% !important;
  }

  /* Transform chapter */
  #chapter-transform {
    min-height: auto;
  }

  .transform__canvas-area {
    position: relative;
    height: auto;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl) 0;
  }

  .transform__dom-text {
    margin-top: var(--space-lg);
  }

  .transform__statement {
    font-size: clamp(28px, 6.5vw, 44px);
  }

  .transform__desc {
    margin-top: var(--space-lg);
  }

  /* ── Services: mobile accordion ── */
  .services__pin-container {
    height: auto;
  }

  /* Kill the two-col sticky, make it a plain block */
  .services__sticky {
    position: relative;
    height: auto;
    display: block;
    padding: var(--space-2xl) clamp(20px, 5vw, 40px);
  }

  /* Hide the desktop left-panel (big title + desc) */
  .services__left {
    display: none;
  }

  /* Right panel = full width, no extra padding */
  .services__right {
    padding: 0;
    display: block;
  }

  /* Chapter label sits above the cards */
  .services__right .chapter__label {
    display: none; /* already shown via services__left on desktop */
  }

  /* ── Mobile chapter header block ── */
  .services__mobile-header {
    display: block; /* overrides desktop display:none */
    margin-bottom: var(--space-2xl);
  }

  /* Show chevron on mobile */
  .services__item-chevron {
    display: flex;
  }

  /* Panel uses max-height animation — override display:none from base */
  .services__item-panel {
    display: block;
  }

  .services__mobile-header .chapter__label {
    margin-bottom: var(--space-md);
  }

  .services__mobile-header-title {
    font-family: var(--f-display);
    font-size: clamp(32px, 9vw, 52px);
    font-weight: 300;
    line-height: 0.95;
    letter-spacing: -0.04em;
    color: var(--c-light);
    margin-bottom: var(--space-sm);
  }

  .services__mobile-header-sub {
    font-size: var(--fs-body);
    color: var(--c-muted);
    font-weight: 300;
    max-width: 320px;
  }

  /* ── Accordion items ── */
  .services__items {
    gap: 0;
    border-top: 1px solid rgba(89, 99, 96, 0.2);
  }

  /* Each row is now a full accordion trigger */
  .services__item {
    opacity: 1 !important;
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
    border-bottom: 1px solid rgba(89, 99, 96, 0.2);
    cursor: pointer;
    overflow: hidden;
    transition: background 0.3s ease;
  }

  .services__item:active {
    background: rgba(89, 99, 96, 0.05);
  }

  /* Row header (num + name + chevron) */
  .services__item-row {
    display: flex;
    align-items: center;
    width: 100%;
    padding: var(--space-lg) 0;
    gap: var(--space-md);
  }

  .services__item-num {
    font-family: var(--f-mono);
    font-size: var(--fs-xs);
    letter-spacing: var(--ls-wide);
    color: var(--c-muted-2);
    flex-shrink: 0;
    width: 28px;
    transition: color 0.4s ease;
  }

  .services__item-name {
    font-family: var(--f-display);
    font-size: clamp(28px, 7vw, 44px);
    font-weight: 300;
    letter-spacing: -0.03em;
    color: var(--c-light);
    flex: 1;
    line-height: 1;
  }

  /* Chevron indicator */
  .services__item-chevron {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    color: var(--c-muted-2);
    transition: transform 0.4s var(--ease-out-expo), color 0.4s ease;
  }

  .services__item-chevron svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  /* Expandable description panel */
  .services__item-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s var(--ease-out-expo), padding 0.4s ease;
    padding-bottom: 0;
  }

  .services__item-panel-inner {
    padding-bottom: var(--space-xl);
    padding-left: 44px; /* align with name (28px num + gap) */
    color: var(--c-muted);
    font-size: var(--fs-body);
    line-height: var(--lh-body);
    font-weight: 300;
    max-width: 340px;
  }

  /* Active / open state */
  .services__item.is-active .services__item-num {
    color: var(--c-emerald);
  }

  .services__item.is-active .services__item-name {
    color: var(--c-emerald);
  }

  .services__item.is-active .services__item-chevron {
    transform: rotate(180deg);
    color: var(--c-emerald);
  }

  .services__item.is-active .services__item-panel {
    max-height: 200px;
  }

  /* Process — vertical stack */
  .process__pin-container {
    height: auto;
  }

  .process__sticky {
    position: relative;
    height: auto;
  }

  .process__track {
    flex-direction: column;
    height: auto;
    transform: none !important; /* Override GSAP horizontal */
  }

  .process__header-panel,
  .process__panel {
    width: 100%;
    height: auto;
    padding: var(--space-xl) clamp(24px, 5vw, 48px);
    border-right: none;
    border-bottom: 1px solid rgba(89, 99, 96, 0.12);
  }

  .process__panel-num {
    position: relative;
    bottom: auto;
    right: auto;
    font-size: 64px;
    margin-bottom: var(--space-md);
    -webkit-text-stroke: 1px rgba(89, 99, 96, 0.2);
  }

  .process__panel-title {
    font-size: clamp(28px, 7vw, 48px);
  }

  /* Gallery — single column */
  .project--01,
  .project--02,
  .project--03,
  .project--04 {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    margin-left: 0;
    margin-right: 0;
  }

  .project--02 .project__img-wrapper {
    order: -1;
  }

  .project__img-wrapper--portrait {
    aspect-ratio: 4/3;
  }

  .project__img-wrapper--wide {
    aspect-ratio: 16/9;
  }

  /* Difference */
  .difference__items {
    grid-template-columns: 1fr;
  }

  .difference__item {
    border-right: none;
  }

  .difference__item-title {
    font-size: clamp(20px, 5vw, 32px);
  }

  /* CTA */
  .cta__headline {
    font-size: clamp(36px, 9vw, 72px);
  }

  .cta__bg-text {
    display: none;
  }

  /* Menu */
  .menu__item-link {
    font-size: clamp(36px, 10vw, 72px);
  }

  /* Footer */
  .footer__top {
    flex-direction: column;
  }

  .footer__brand,
  .footer__form-area {
    max-width: 100%;
    width: 100%;
  }

  .footer__statement {
    font-size: clamp(24px, 6vw, 40px);
  }

  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer__nav {
    flex-wrap: wrap;
    gap: var(--space-md);
  }

  /* Chapter labels */
  .chapter__label {
    margin-bottom: var(--space-lg);
  }
}

/* ================================================
   SMALL MOBILE (max-width: 430px)
   Fine-tuning for smallest phones
   ================================================ */
@media (max-width: 430px) {

  .hero__title {
    font-size: 11vw;
  }

  .shift__line-text {
    font-size: 9vw;
  }

  .cta__headline {
    font-size: 10vw;
  }

  .menu__item-link {
    font-size: 10vw;
  }

  .form__input,
  .form__textarea {
    font-size: 16px; /* Prevents iOS zoom on focus */
  }
}

/* ================================================
   LANDSCAPE MOBILE
   ================================================ */
@media (max-width: 900px) and (orientation: landscape) {
  .hero__title {
    font-size: clamp(32px, 6vh, 64px);
  }

  .transform__canvas-area {
    min-height: 80vh;
  }
}

/* ================================================
   HIGH DPI DISPLAY
   ================================================ */
@media (min-resolution: 2dppx) {
  /* Ensure sharp SVG rendering */
  .nav__logo img,
  .footer__logo {
    image-rendering: -webkit-optimize-contrast;
  }
}

/* ================================================
   PRINT
   ================================================ */
@media print {
  #loader,
  #cursor,
  #cursor-follower,
  #webgl-canvas,
  #scroll-progress,
  .noise-overlay {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  #nav {
    position: relative;
  }
}
