/**
 * KOBU theme — mobile & tablet responsive overrides.
 * Loaded after style.css; breakpoints: 1024px, 768px, 680px.
 */

/* ——— Global tokens & overflow ——— */
@media (max-width: 1024px) {
  :root {
    --kobu-section-gap: 80px;
    --kobu-header-flow-gap: 76px;
  }
}

@media (max-width: 680px) {
  :root {
    --kobu-section-gap: 56px;
    --kobu-header-flow-gap: 72px;
  }

  html,
  body {
    overflow-x: clip;
  }

  .kobu-container {
    width: min(var(--kobu-container), calc(100% - 32px));
  }

  .kobu-site-header .kobu-container {
    width: calc(100% - 32px);
  }
}

/* ——— Header: logo + menu stay in one row on phones ——— */
@media (max-width: 680px) {
  .kobu-site-header__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    padding: 12px 0;
  }

  .kobu-logo,
  .custom-logo-link {
    height: 72px;
    width: 40px;
  }

  .kobu-menu-toggle {
    transform: none;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
  }

  .kobu-nav-drawer__inner {
    padding: 88px 20px 32px;
    gap: 28px;
  }

  .kobu-nav-drawer__main {
    padding-top: 16px;
  }

  .kobu-main-menu--drawer {
    align-items: center;
    gap: 24px;
    text-align: center;
  }

  .kobu-main-menu--drawer a {
    justify-content: center;
    text-align: center;
    font-size: clamp(32px, 10vw, 42px);
  }

  .kobu-drawer-service-menu,
  .kobu-drawer-service-menu ul {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 10px;
    text-align: left;
  }

  .kobu-drawer-service-menu li,
  .kobu-drawer-service-menu > li:nth-child(3n + 1) {
    width: 100%;
    text-align: left;
  }

  .kobu-drawer-service-menu a {
    display: block;
    text-align: left;
    font-size: 14px;
  }
}

/* ——— Home hero ——— */
@media (max-width: 1024px) {
  .kobu-home-hero__inner {
    min-height: min(72vh, 720px);
    padding: 120px 20px 60px;
    gap: 32px;
  }

  .kobu-home-hero__title-last {
    padding-left: clamp(0px, 6vw, 92px);
  }

  .kobu-home-hero__socials {
    position: static;
    flex-direction: row;
    width: auto;
    gap: 12px;
    margin-top: 8px;
    align-self: flex-end;
  }

  .kobu-home-hero__socials a {
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 680px) {
  .kobu-hero,
  .kobu-home-hero {
    min-height: 0;
  }

  .kobu-home-hero__inner {
    min-height: min(62vh, 560px);
    padding: 96px 16px 40px;
  }

  .kobu-home-hero__title-last {
    padding-left: 0;
    flex-wrap: wrap;
    gap: 6px;
  }

  .kobu-home-hero__services p {
    font-size: 12px;
    line-height: 1.4;
  }
}

/* ——— Touch: show project CTAs without hover ——— */
@media (hover: none), (pointer: coarse) {
  .kobu-home-project-card__slide.is-active .kobu-home-project-card__cta {
    opacity: 1;
    pointer-events: auto;
  }

  .kobu-projects-page__media .kobu-home-project-card__cta,
  .kobu-projects-page__media-link .kobu-home-project-card__cta {
    opacity: 1;
    pointer-events: auto;
  }

  .kobu-projects-page__img,
  .kobu-projects-page__video,
  .kobu-home-project-card__image-wrap img,
  .kobu-home-project-card__image-wrap video {
    filter: grayscale(0%);
  }
}

/* ——— Home projects / carousel ——— */
@media (max-width: 1024px) {
  .kobu-home-projects__inner {
    padding: 0 20px 48px;
    gap: 28px;
  }

  .kobu-home-projects__title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .kobu-home-projects__heading-text {
    text-align: left;
  }

  .kobu-home-projects__filters-row {
    gap: 16px 20px;
  }
}

@media (max-width: 680px) {
  .kobu-home-projects__inner {
    padding: 0 16px 40px;
    min-height: 0;
  }

  .kobu-home-projects-slider {
    min-height: 280px;
    height: clamp(280px, 56vw, 480px);
  }

  .kobu-home-projects__filter {
    min-height: 44px;
    padding-bottom: 8px;
    font-size: 13px;
  }

  .kobu-home-projects__arrows {
    width: auto;
    min-width: 108px;
  }

  .kobu-slider-arrow {
    min-width: 44px;
    min-height: 44px;
    padding: 12px;
  }

  .kobu-home-project-card__cta {
    padding: 24px 20px;
    font-size: 11px;
  }
}

/* ——— Home mission ——— */
@media (max-width: 900px) {
  .kobu-home-mission__layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .kobu-home-mission__column--left,
  .kobu-home-mission__column--mid,
  .kobu-home-mission__column--right {
    width: 100%;
  }

  .kobu-home-mission__mid-sync > .kobu-home-mission__strip-slot--23,
  .kobu-home-mission__right-sync > .kobu-home-mission__strip-slot--23 {
    display: none;
  }

  .kobu-home-mission__strip-shell {
    width: 100%;
  }

  .kobu-home-mission__strip-slot--1 {
    height: auto;
  }

  .kobu-home-mission__strip-slot--1 > .kobu-home-mission__strip--layered {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    height: auto;
    aspect-ratio: 16 / 10;
    overflow: hidden;
  }

  .kobu-home-mission__strip-crop {
    position: relative;
    aspect-ratio: 16 / 10;
    height: auto;
    width: 100%;
  }

  .kobu-home-mission__strip-img,
  .kobu-home-mission__strip-img--slice1,
  .kobu-home-mission__strip-img--slice2,
  .kobu-home-mission__strip-img--slice3 {
    position: absolute;
    inset: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    transform: none;
    object-fit: cover;
    object-position: center;
  }

  .kobu-home-mission__stack {
    gap: 24px;
  }

  .kobu-home-mission__column,
  .kobu-home-mission__mid-sync,
  .kobu-home-mission__right-sync {
    gap: 24px;
  }
}

/* ——— Header title dots: same position as Contact "GET IN TOUCH" ——— */
@media (max-width: 900px) {
  .kobu-projects-page__headline-line2,
  .kobu-services-hero__title .is-indented,
  .kobu-about-page__hero-title-row2,
  .kobu-contact__hero-title-row2 {
    display: block;
    width: auto;
    max-width: 100%;
    margin-left: 0;
    padding-left: 44px;
    box-sizing: border-box;
  }

  .kobu-projects-page__headline-line2-text,
  .kobu-about-page__hero-title-line2,
  .kobu-contact__hero-title-line2 {
    display: inline;
  }

  .kobu-home-projects__heading-dot,
  .kobu-services-hero__dot,
  .kobu-about-page__hero-title-dot,
  .kobu-contact__hero-title-dot,
  .kobu-project-detail__title-dot {
    display: inline-block;
    width: 16px;
    height: 16px;
    flex: none;
    align-self: auto;
    margin: 0 0 0 10px;
    vertical-align: baseline;
    transform: translateY(-2px);
  }

  .kobu-home-projects__heading > .kobu-home-projects__heading-dot,
  .kobu-services-intro__text h2 > .kobu-services-hero__dot {
    margin-left: 0;
  }

  .kobu-projects-page__headline-line2 > .kobu-home-projects__heading-dot {
    margin-left: 10px;
  }
}

@media (max-width: 680px) {
  .kobu-home-mission__inner {
    padding: 48px 16px 64px;
  }
}

/* ——— Footer ——— */
@media (max-width: 900px) and (min-width: 681px) {
  .kobu-site-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 48px 32px;
  }

  .kobu-site-footer__col--gap {
    display: none;
  }

  .kobu-site-footer__col--brand {
    grid-column: 1 / -1;
    padding-left: 0;
  }

  .kobu-site-footer__col--nav {
    align-items: flex-start;
    padding-right: 0;
  }

  .kobu-site-footer__menu {
    align-items: flex-start;
  }
}

@media (max-width: 680px) {
  .kobu-site-footer {
    padding-top: 100px;
    padding-bottom: 100px;
  }

  .kobu-site-footer__menu a {
    font-size: 16px;
    line-height: 1.5;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .kobu-scroll-top {
    width: 56px;
    height: 56px;
    bottom: 16px;
  }

  .kobu-scroll-top__icon {
    width: 22px;
    height: 22px;
  }
}

/* ——— Triptych heroes: one full image + text below (About, Contact, Services, Mission) ——— */
@media (max-width: 900px) {
  /* About */
  .kobu-about-page__hero-stack--mid {
    display: none;
  }

  .kobu-about-page__hero-stack--right .kobu-about-page__strip,
  .kobu-about-page__strip--2,
  .kobu-about-page__strip--3 {
    display: none;
  }

  .kobu-about-page__hero-grid {
    flex-direction: column;
    gap: 14px;
    padding: calc(var(--kobu-header-flow-gap) + 8px) 20px 0;
  }

  .kobu-about-page__strip--1 {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .kobu-about-page__strip--1 .kobu-about-page__strip-inner {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
  }

  .kobu-about-page__strip--1 .kobu-about-page__img {
    position: absolute;
    inset: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    transform: none;
    object-fit: cover;
    object-position: center;
  }

  .kobu-about-page__hero-title-block {
    align-self: stretch;
    max-width: none;
    width: 100%;
    margin-top: 12px;
  }

  .kobu-about-page__hero-lead {
    margin-top: 0;
    max-width: none;
  }

  /* Contact */
  .kobu-contact__hero-stack--mid {
    display: none;
  }

  .kobu-contact__hero-stack--right .kobu-contact__strip,
  .kobu-contact__strip--2,
  .kobu-contact__strip--3 {
    display: none;
  }

  .kobu-contact__strip--1 {
    width: 100%;
    max-width: none;
    height: auto;
    aspect-ratio: 16 / 10;
    margin: 0;
  }

  .kobu-contact__strip--1 .kobu-contact__strip-inner {
    position: relative;
    aspect-ratio: 16 / 10;
    height: 100%;
  }

  .kobu-contact__strip--1 .kobu-contact__img {
    position: absolute;
    inset: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    transform: none;
    object-fit: cover;
    object-position: center;
  }

  .kobu-contact__hero-col--left,
  .kobu-contact__hero-col--right {
    max-width: none;
    width: 100%;
  }

  /* Services: one hero image, slice labels as text rows below */
  .kobu-services-hero__triptych {
    margin-top: 32px;
    gap: 0;
  }

  .kobu-services-hero__triptych::before {
    display: block !important;
    content: '';
    position: static;
    top: auto;
    left: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    pointer-events: none;
    z-index: auto;
    margin-bottom: 16px;
    background-color: #3a3a3a;
    background-image: var(--kobu-triptych-img);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
  }

  .kobu-services-hero__panel {
    background-image: none !important;
    height: auto;
    aspect-ratio: auto;
    min-height: 0;
    margin-top: 0 !important;
    background-color: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding: 12px 0 16px;
  }

  .kobu-services-hero__panel:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .kobu-services-hero__panel-cap {
    position: static;
    left: auto;
    top: auto;
    right: auto;
  }

  .kobu-services-hero__panel-body {
    max-height: none;
    opacity: 1;
    margin-top: 8px;
    overflow: visible;
  }
}

/* ——— About page (stats, featured, etc.) ——— */
@media (max-width: 900px) {
  .kobu-about-page {
    overflow-x: clip;
  }

  .kobu-about-page__featured {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    height: min(56vw, 420px);
    margin-bottom: 48px;
  }

  .kobu-about-page__stat-num {
    font-size: clamp(48px, 12vw, 80px);
  }

  .kobu-about-page__process-head {
    padding: 28px 0 32px;
  }

  .kobu-about-page__process {
    margin-bottom: 56px;
  }

  .kobu-about-page__inner {
    padding-top: 56px;
  }

  .kobu-about-page__numbers {
    gap: 36px;
    margin-bottom: 56px;
  }
}

@media (max-width: 680px) {
  .kobu-about-page__stat,
  .kobu-about-page__stat:nth-child(2),
  .kobu-about-page__stat:nth-child(4) {
    width: 100%;
  }

  .kobu-about-page__stats-grid {
    flex-direction: column;
    gap: 32px;
  }
}

/* ——— Contact page (form) ——— */
@media (max-width: 680px) {
  .kobu-contact__input,
  .kobu-contact__textarea {
    font-size: 18px;
  }

  .kobu-contact__send {
    width: 72px;
    height: 72px;
  }

  .kobu-contact__form {
    gap: 28px;
  }

  .kobu-contact__form-wrap {
    padding: 0 16px;
  }

  .kobu-contact__hero-grid {
    gap: 16px !important;
  }

  .kobu-contact__hero-col--right {
    gap: 22px;
  }
}

/* ——— Projects page ——— */
@media (max-width: 900px) {
  .kobu-projects-page__inner {
    padding: calc(var(--kobu-header-flow-gap) + 40px) 20px 64px;
  }

  .kobu-projects-page__headline {
    font-size: clamp(32px, 8vw, 48px);
    margin-bottom: 24px;
  }

  .kobu-projects-page__hero {
    margin-bottom: 28px;
  }

  .kobu-projects-page__grid {
    gap: clamp(36px, 8vw, 56px);
  }
}

@media (max-width: 680px) {
  .kobu-projects-page__inner {
    padding: calc(var(--kobu-header-flow-gap) + 32px) 16px 64px;
  }

  .kobu-projects-page__chunk {
    gap: 28px;
  }

  .kobu-projects-page__meta {
    font-size: 14px;
  }
}

/* ——— Single project ——— */
@media (max-width: 900px) {
  .kobu-project-detail__text-block {
    padding-left: 24px;
    padding-right: 24px;
  }

  .kobu-project-detail__title-text {
    font-size: clamp(28px, 7vw, 40px);
  }
}

@media (max-width: 680px) {
  .kobu-project-detail__hero-inner,
  .kobu-project-detail__body-wrap,
  .kobu-project-detail__quote-wrap,
  .kobu-project-detail__inner-wrap {
    padding-left: 16px;
    padding-right: 16px;
  }

  .kobu-project-detail__text-block {
    padding-left: 16px;
    padding-right: 16px;
  }

  .kobu-project-detail__gallery-nav button {
    min-width: 44px;
    min-height: 44px;
  }
}

/* ——— Services page (spacing) ——— */
@media (max-width: 900px) {
  .kobu-services-page {
    padding-top: calc(var(--kobu-header-flow-gap) + 32px);
  }

  .kobu-services-page__inner {
    max-width: calc(100% - 32px);
  }

  .kobu-services-intro {
    margin-top: 56px;
  }

  .kobu-services-block--design {
    margin-top: 56px;
  }

  .kobu-services-block--building {
    margin-top: 56px;
  }

  .kobu-services-block--construction {
    margin-top: 48px;
  }
}

@media (max-width: 680px) {
  .kobu-services-hero__title {
    font-size: clamp(28px, 8vw, 36px);
  }

  .kobu-services-intro {
    margin-top: 36px;
  }

  .kobu-services-block--design,
  .kobu-services-block--building,
  .kobu-services-block--construction {
    margin-top: 36px;
  }

  .kobu-services-block__design-right .kobu-services-block__smalls figure {
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .kobu-services-note {
    font-size: 14px;
  }
}

/* ——— Generic page fallback ——— */
@media (max-width: 680px) {
  .kobu-page-hero {
    padding: calc(var(--kobu-header-flow-gap) + 24px) 0 32px;
  }

  .kobu-page-content {
    padding: 40px 0 64px;
  }
}
