/*
 * Responsive polish - Oscilia Gle
 * Final UI/UX layer loaded after the cinematic theme styles.
 */

:root {
  --nav-logo-h: 82px;
  --nav-logo-h-scrolled: 62px;
  --nav-logo-h-mobile: 56px;
  --nav-pad-y: 18px;
  --section-y: 88px;
  --section-y-mobile: 56px;
  --hairline: rgba(245, 239, 230, 0.09);
}

body {
  text-rendering: geometricPrecision;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

/* Navigation: visible brand, less visual weight, better touch targets. */
.nav {
  min-height: 88px;
  padding-top: var(--nav-pad-y);
  padding-bottom: var(--nav-pad-y);
  gap: 28px;
}

.nav.scrolled {
  min-height: 72px;
  padding-top: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(245, 239, 230, 0.08);
}

.nav__logo {
  flex: 0 0 auto;
}

.nav__logo-img {
  height: var(--nav-logo-h) !important;
  image-rendering: auto;
  transform: translateZ(0);
}

.nav.scrolled .nav__logo-img {
  height: var(--nav-logo-h-scrolled) !important;
}

.nav__links {
  align-items: center;
  gap: clamp(24px, 3.2vw, 46px);
}

.nav__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 11px;
  letter-spacing: 0.18em;
  opacity: 0.74;
}

.nav__burger {
  display: none;
  position: relative;
  z-index: 260;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(245, 239, 230, 0.16);
  border-radius: 999px;
  background: rgba(28, 25, 23, 0.42);
}

.nav__burger span {
  position: absolute;
  width: 18px;
  height: 1px;
  background: var(--c-toile);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav__burger span:nth-child(1) { transform: translateY(-6px); }
.nav__burger span:nth-child(3) { transform: translateY(6px); }
.nav__burger--open span:nth-child(1) { transform: rotate(42deg); }
.nav__burger--open span:nth-child(2) { opacity: 0; }
.nav__burger--open span:nth-child(3) { transform: rotate(-42deg); }

.nav__mobile-overlay {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 210;
  background: rgba(8, 6, 5, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.nav__overlay--active {
  opacity: 1;
  pointer-events: auto;
}

/* Global rhythm. */
h1 {
  font-size: 6rem;
  letter-spacing: 0;
  max-width: 12ch;
}

h2 {
  font-size: 3rem;
  letter-spacing: 0;
  max-width: 15ch;
}

h3 {
  font-size: 1.35rem;
  letter-spacing: 0;
}

.section {
  padding-top: var(--section-y) !important;
  padding-bottom: var(--section-y) !important;
}

.section__header {
  align-items: center;
  margin-bottom: 42px;
}

.label,
.hero__eyebrow,
.clients__label,
.arch-hero__eyebrow,
.tx-eyebrow,
.meta-item__label,
.form-group label {
  letter-spacing: 0.2em;
}

.hero__cta,
.section__link,
.form-submit,
.arch-filter,
.tx-filter {
  min-height: 44px;
  align-items: center;
}

/* Homepage hero: more premium framing, less bottom-heavy. */
.hero {
  min-height: 720px;
  padding-top: 130px;
  padding-bottom: 86px;
}

.hero__content {
  max-width: 760px;
}

.hero__title {
  font-size: 6.25rem;
  letter-spacing: 0;
}

.hero__subtitle {
  max-width: 30rem;
}

/* Project cards: readable on touch screens and calmer overlays. */
.projects-grid {
  gap: 6px;
}

.project-card {
  min-height: 280px;
  background: #2a2521;
}

.project-card__overlay,
.arch-card__info {
  background: linear-gradient(to top, rgba(18, 14, 12, 0.88), rgba(18, 14, 12, 0.28) 58%, rgba(18, 14, 12, 0));
}

.project-card__title,
.arch-card__title {
  max-width: 21rem;
}

@media (hover: none) {
  .project-card__overlay {
    opacity: 1;
  }
}

/* Clients strip: better scan and wrapping. */
.clients {
  padding-top: 42px;
  padding-bottom: 42px;
}

.clients__inner {
  gap: 24px 48px;
}

.clients__list {
  gap: 14px 34px;
}

.clients__list li {
  opacity: 0.62;
}

/* Archive: sticky filters should sit below fixed nav and work on mobile. */
.arch-hero,
.single-hero {
  min-height: 660px;
}

.arch-hero__title {
  font-size: 7rem;
  letter-spacing: 0;
}

.arch-filters {
  top: 72px;
  z-index: 140;
}

.arch-filters__btns {
  gap: 8px;
}

.arch-filter {
  min-height: 40px;
  padding: 0.5rem 1rem;
  letter-spacing: 0.14em;
}

.arch-grid {
  padding: 6px;
  column-gap: 6px;
}

.arch-card {
  margin-bottom: 6px;
}

.arch-card__info {
  padding: 1.35rem;
}

/* Single project: less huge meta spacing, better image pages. */
.single-hero__content {
  bottom: 64px;
}

.single-meta {
  gap: 28px 56px;
  padding-top: 34px;
  padding-bottom: 34px;
}

.single-description {
  max-width: 780px;
  padding-top: 70px;
  padding-bottom: 70px;
}

.gallery-grid {
  column-gap: 6px;
}

.gallery-item {
  margin-bottom: 6px;
}

/* About page: editorial balance. */
.about-hero {
  min-height: 80vh;
  padding-top: 160px;
  gap: clamp(48px, 7vw, 96px);
}

.about-portrait {
  max-height: 680px;
}

.about-text .lead,
.about-bio {
  opacity: 0.9;
}

.timeline__entry {
  gap: 32px;
}

/* Contact page: stronger form ergonomics. */
.contact-page {
  padding-top: 170px;
}

.contact-intro {
  margin-bottom: 54px;
}

.contact-links {
  margin-bottom: 54px;
}

.contact-link {
  min-height: 72px;
}

.form-group input,
.form-group textarea {
  min-height: 52px;
  border-radius: 0;
}

.form-submit {
  display: inline-flex;
  justify-content: center;
}

/* Textures page: keep the tool dense but not cramped. */
.tx-header {
  min-height: 620px;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

.tx-title {
  font-size: 7rem;
  letter-spacing: 0;
}

.tx-filters {
  top: 72px;
  z-index: 145;
  gap: 10px;
}

.tx-filter {
  padding: 0.55rem 1rem;
}

.tx-gallery {
  gap: 8px;
}

.tx-tile {
  min-height: 280px;
}

.tx-tile .caption {
  max-width: 88%;
}

/* Footer: restore balance after the bigger logo. */
.footer {
  min-height: 190px;
  gap: 26px 42px;
}

.footer__logo-img {
  height: 120px !important;
}

.footer__copy {
  max-width: 24rem;
  line-height: 1.6;
}

/* Large desktop. */
@media (min-width: 1440px) {
  .hero,
  .arch-hero,
  .single-hero {
    min-height: 760px;
  }

  h1 {
    font-size: 6.5rem;
  }

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

/* Tablet. */
@media (max-width: 1024px) {
  :root {
    --pad-x: clamp(1.25rem, 4vw, 3rem);
    --section-y: 72px;
  }

  .nav {
    min-height: 78px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .nav__logo-img,
  .nav.scrolled .nav__logo-img {
    height: 66px !important;
  }

  .nav__links {
    gap: 22px;
  }

  .nav__links a {
    letter-spacing: 0.13em;
  }

  .hero {
    min-height: 680px;
    padding-bottom: 74px;
  }

  .hero__title,
  .arch-hero__title {
    font-size: 4.6rem;
  }

  h1 {
    font-size: 4.6rem;
  }

  h2 {
    font-size: 2.65rem;
  }

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

  .project-card {
    min-height: 250px;
  }

  .about-hero {
    min-height: auto;
    padding-top: 138px;
  }
}

/* Mobile navigation and layout. */
@media (max-width: 820px) {
  :root {
    --section-y: var(--section-y-mobile);
  }

  .nav {
    min-height: 74px;
  }

  .nav__logo-img,
  .nav.scrolled .nav__logo-img {
    height: var(--nav-logo-h-mobile) !important;
  }

  .nav__burger {
    display: inline-flex;
  }

  .nav__links {
    position: fixed;
    top: 88px;
    right: var(--pad-x);
    left: var(--pad-x);
    z-index: 240;
    display: grid;
    gap: 0;
    padding: 10px;
    background: rgba(28, 25, 23, 0.98);
    border: 1px solid rgba(245, 239, 230, 0.12);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
  }

  .nav__links--open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav__links li + li {
    border-top: 1px solid rgba(245, 239, 230, 0.08);
  }

  .nav__links a {
    min-height: 56px;
    justify-content: space-between;
    padding: 0 12px;
    font-size: 12px;
    opacity: 0.9;
  }

  .hero,
  .arch-hero {
    min-height: 620px;
    height: auto;
    padding-top: 150px;
    padding-bottom: 64px;
  }

  .hero__title,
  .arch-hero__title {
    font-size: 3.75rem;
    line-height: 0.96;
  }

  h1 {
    font-size: 3.75rem;
  }

  .hero__subtitle,
  .arch-hero__sub {
    font-size: 1.15rem;
  }

  .hero__scroll,
  .arch-hero__scroll,
  .tx-scroll {
    display: none;
  }

  .section__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .section__link {
    white-space: normal;
  }

  .clients__inner {
    align-items: flex-start;
  }

  .clients__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .arch-filters,
  .tx-filters {
    top: 74px;
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    scrollbar-width: none;
  }

  .arch-filters::-webkit-scrollbar,
  .tx-filters::-webkit-scrollbar {
    display: none;
  }

  .arch-filters__btns {
    flex-wrap: nowrap;
  }

  .arch-filters__meta {
    display: none;
  }

  .arch-filter,
  .tx-filter {
    flex: 0 0 auto;
  }

  .single-hero {
    height: auto;
    min-height: 620px;
  }

  .single-hero__content {
    bottom: 44px;
  }

  .single-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-hero {
    grid-template-columns: 1fr;
    padding-top: 128px;
  }

  .about-text {
    order: -1;
  }

  .contact-page {
    padding-top: 128px;
  }

  .contact-link {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .tx-header {
    min-height: 560px;
  }

  .tx-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .tx-tile,
  .tx-tile.wide,
  .tx-tile.tall,
  .tx-tile.narrow,
  .tx-tile.normal {
    grid-column: auto !important;
    min-height: 240px;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
    min-height: 0;
    padding-top: 54px;
    padding-bottom: 54px;
  }

  .footer__logo-img {
    height: 110px !important;
  }
}

/* Small mobile. */
@media (max-width: 540px) {
  :root {
    --pad-x: 20px;
  }

  body {
    font-size: 15px;
  }

  h1 {
    font-size: 3.05rem;
    max-width: 10ch;
  }

  h2 {
    font-size: 2.15rem;
  }

  .label,
  .hero__eyebrow,
  .clients__label,
  .arch-hero__eyebrow,
  .tx-eyebrow {
    font-size: 10px;
    letter-spacing: 0.16em;
  }

  .nav {
    padding-left: 18px;
    padding-right: 18px;
  }

  .nav__links {
    left: 18px;
    right: 18px;
  }

  .hero,
  .arch-hero {
    min-height: 590px;
    padding-top: 132px;
  }

  .hero__title,
  .arch-hero__title {
    font-size: 3.1rem;
  }

  .hero__cta {
    width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
    text-align: center;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .project-card {
    min-height: 300px;
  }

  .project-card__overlay,
  .arch-card__info {
    padding: 1.25rem;
  }

  .clients__list {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .quote-section {
    padding-top: 62px;
    padding-bottom: 62px;
  }

  .quote-section blockquote {
    font-size: 1.28rem;
  }

  .single-hero {
    min-height: 560px;
  }

  .single-meta {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .single-description {
    padding-top: 54px;
    padding-bottom: 54px;
    font-size: 1rem;
  }

  .gallery-grid,
  .arch-grid {
    columns: 1;
  }

  .about-portrait {
    max-height: none;
  }

  .timeline__entry {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 22px 0;
  }

  .contact-intro h1 {
    max-width: 8ch;
  }

  .contact-link__value {
    font-size: 1.1rem;
    overflow-wrap: anywhere;
  }

  .form-submit {
    width: 100%;
  }

  .tx-gallery {
    grid-template-columns: 1fr !important;
  }

  .tx-tile,
  .tx-tile.wide,
  .tx-tile.tall,
  .tx-tile.narrow,
  .tx-tile.normal {
    min-height: 300px;
  }

  .footer__logo-img {
    height: 96px !important;
  }
}

/* Very narrow devices. */
@media (max-width: 380px) {
  .hero__title,
  .arch-hero__title,
  h1 {
    font-size: 2.65rem;
  }

  .nav__logo-img,
  .nav.scrolled .nav__logo-img {
    height: 50px !important;
  }

  .nav__burger {
    width: 42px;
    height: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
