/* ============================================================
   PICAR STUDIO — Homepage layout
   ============================================================ */

/* ---------------- NAV ---------------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background .5s var(--ease), border-color .5s var(--ease), backdrop-filter .5s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(245,243,238,0.82);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border-bottom-color: var(--line-soft);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.nav__logo img { height: 22px; width: auto; }
.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}
.nav__links a {
  font-size: 14px;
  letter-spacing: 0.01em;
  color: var(--ink);
  position: relative;
  padding-block: 4px;
  transition: color .3s var(--ease);
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--accent-green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav__links a:hover { color: var(--accent-green); }
.nav__links a:hover::after { transform: scaleX(1); }
.nav__inquiry { color: var(--mid) !important; }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
  background: none; border: 0; cursor: pointer;
  width: 44px; height: 44px;
  padding: 0;
  margin-right: -8px;
}
.nav__toggle span { display: block; width: 24px; height: 1px; background: var(--ink); }

/* ---------------- MOBILE NAV ---------------- */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--base);
  padding: var(--gutter);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-md);
  transform: translateY(-100%);
  transition: transform .45s var(--ease);
  visibility: hidden;
}
.mobile-nav.is-open { transform: translateY(0); visibility: visible; }
.mobile-nav__close {
  position: absolute;
  top: 14px; right: calc(var(--gutter) - 8px);
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 0; cursor: pointer;
  font-size: 34px; line-height: 1; color: var(--ink);
}
.mobile-nav__links { display: flex; flex-direction: column; gap: var(--space-sm); }
.mobile-nav__links a { font-size: clamp(34px, 11vw, 52px); font-weight: 300; letter-spacing: 0.01em; }
.mobile-nav__meta { display: flex; flex-direction: column; gap: 8px; margin-top: var(--space-sm); }

/* ---------------- shared section head ---------------- */
.section-head {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

/* ===================== 01 · HERO ===================== */
.hero {
  min-height: 100svh;
  padding-top: calc(var(--nav-h) + var(--space-sm));
  padding-bottom: var(--space-md);
  display: flex;
  align-items: stretch;
}
.hero__grid {
  display: grid;
  grid-template-rows: 1fr auto;
  grid-template-areas:
    "head"
    "foot";
  row-gap: var(--space-md);
  width: 100%;
}
.hero__head { grid-area: head; align-self: center; }
.hero__meta { display: flex; flex-direction: column; gap: 10px; margin-bottom: var(--space-md); }
.hero__coord { color: var(--mid); }
.hero__statement { max-width: 15ch; }

.hero__foot {
  grid-area: foot;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  border-top: 1px solid var(--line-soft);
  padding-top: var(--space-sm);
}

/* ===================== 02 · POSITIONING ===================== */
.positioning__grid {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: var(--gutter);
}
.positioning__statement { margin-bottom: var(--space-md); max-width: 24ch; }
.positioning__sectors { padding-top: 6px; }
.positioning__sectors-title { display: block; margin-bottom: var(--space-md); }
.sector-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-sm); }
.sector-list li {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.sector-list__name {
  font-size: clamp(20px, 1.7vw, 24px);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: 0.002em;
  color: var(--ink);
  transition: color .3s var(--ease);
}
.sector-list li:hover .sector-list__name { color: var(--accent-green); }
.sector-list__desc { font-size: var(--caption); color: var(--mid); }

/* ===================== 03 · FEATURED ===================== */
.featured {
  background: var(--ink);
  color: var(--on-dark);
  padding-block: var(--space-lg);
}
.featured .label, .featured .index { color: var(--on-dark-mid); }
.featured__head { margin-bottom: var(--space-md); }
.featured__image {
  width: 100%;
  aspect-ratio: 16 / 8;
  margin-bottom: var(--space-md);
  border-radius: 2px;
}
.slot__fill--dark { position: absolute; inset: 0; }

/* Interface crops — real UI screenshots in place of photo slots */
.featured__ui, .case__ui { position: relative; }
.featured__ui > .scaler,
.case__ui > .scaler {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
/* Selected-systems crops sit flush left so the interface reads from its
   leading edge rather than being centred (and visually stretched) in the box */
.case__ui > .scaler { object-position: left top; }
.featured__ui { border: 1px solid rgba(239,236,229,0.14); }
.case__ui { border: 1px solid var(--line-soft); margin-bottom: var(--space-sm); }
.featured__body {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: var(--gutter);
  align-items: start;
}
.featured__title-col .headline { color: var(--on-dark); margin-bottom: var(--space-sm); }
.featured__tags { display: flex; flex-direction: column; gap: 10px; }
.featured__tags .caption { color: var(--on-dark-mid); }
.featured__sector { color: var(--on-dark); }
.featured__year { letter-spacing: 0.04em; }
.featured__text-col .body { color: var(--on-dark-mid); margin-bottom: var(--space-sm); }
.featured__text-col .body:last-of-type { margin-bottom: var(--space-md); }

/* ===================== 04 · PHILOSOPHY ===================== */
.philosophy__list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg) var(--gutter);
}
.principle { max-width: 46ch; }
.principle__n { display: block; color: var(--accent-green); margin-bottom: var(--space-xs); }
.principle .subhead { margin-bottom: var(--space-xs); }

/* ===================== 05 · SELECTED SYSTEMS ===================== */
.selected__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-lg) var(--gutter);
}
.case { display: block; color: inherit; }
.case__image { width: 100%; border-radius: 2px; margin-bottom: var(--space-sm); }
.case__meta { display: flex; flex-direction: column; gap: 8px; }
.case__meta .tag { margin-block: 2px; }
.case__meta .caption { color: var(--mid); }
.case__desc { margin-top: var(--space-xs); }
.case .subhead { transition: color .3s var(--ease); }
.case:hover .subhead { color: var(--accent-green); }

/* varied (non-uniform) placement */
.case--lead { grid-column: 1 / 8; }
.case--lead .case__image { aspect-ratio: 16 / 10; }
.case--b { grid-column: 9 / 13; align-self: end; }
.case--b .case__image { aspect-ratio: 4 / 5; }
.case--c { grid-column: 1 / 6; }
.case--c .case__image { aspect-ratio: 5 / 4; }

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

/* ===================== 06 · PAUSE ===================== */
.pause {
  position: relative;
  background: var(--ink);
  color: var(--on-dark);
  min-height: 64vh;
  display: flex;
  align-items: flex-end;
  padding: var(--gutter);
}
.pause__line {
  max-width: 18ch;
  color: var(--on-dark);
}

/* ===================== 07 · APPROACH ===================== */
.approach__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gutter);
}
.approach__statement { max-width: 18ch; }
.method-list { list-style: none; margin: 0 0 var(--space-md); padding: 0; }
.method {
  display: grid;
  grid-template-columns: 3ch 1fr;
  gap: var(--space-sm);
  padding-block: var(--space-sm);
  border-top: 1px solid var(--line-soft);
}
.method:last-of-type { border-bottom: 1px solid var(--line-soft); }
.method__n { color: var(--accent-green); padding-top: 6px; }
.method .subhead { margin-bottom: 8px; }

/* ===================== 08 · INQUIRY ===================== */
.inquiry { padding-block: var(--space-xl); }
.inquiry__inner { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-md); }
.inquiry__statement { max-width: 20ch; }
.inquiry__cta {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-size: var(--subhead);
  font-weight: 400;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ink);
  transition: gap .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.inquiry__cta:hover { gap: 26px; color: var(--accent-green); border-color: var(--accent-green); }

/* ===================== FOOTER ===================== */
.footer {
  background: #1E1D1A;
  color: var(--on-dark);
  padding-top: var(--space-lg);
  padding-bottom: var(--space-md);
}
.footer .label { color: var(--on-dark-mid); }
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.2fr;
  gap: var(--gutter);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(239,236,229,0.12);
}
.footer__mark { width: 64px; height: 64px; margin-bottom: var(--space-sm); }
.footer__tagline { color: var(--on-dark-mid); }
.footer__col { display: flex; flex-direction: column; gap: 14px; }
.footer__col .label { margin-bottom: 6px; }
.footer__col a { color: var(--on-dark); transition: color .3s var(--ease); width: fit-content; }
.footer__col a:hover { color: #fff; opacity: .8; }
.footer__static { color: var(--on-dark-mid); }
.footer__social { display: flex; align-items: center; gap: 16px; margin-block: 4px 2px; min-height: 22px; }
.footer__icon {
  display: inline-flex;
  color: var(--on-dark-mid);
  transition: color .3s var(--ease), transform .3s var(--ease);
}
.footer__icon:hover { color: #fff; transform: translateY(-1px); }
.footer__icon svg { display: block; }
.footer__muted { color: var(--on-dark-mid) !important; display: inline-flex; gap: 8px; align-items: baseline; }
.footer__muted .mono { font-size: 10px; opacity: .7; }
.footer__lang--active { color: #fff; }
.footer__lang--active::before { content: "→ "; color: var(--on-dark-mid); }
.footer__base {
  display: flex;
  justify-content: space-between;
  gap: var(--space-sm);
  padding-top: var(--space-md);
}
.footer__base .caption { color: var(--on-dark-mid); white-space: nowrap; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 920px) {
  :root { --nav-h: 64px; }
  .nav__links { display: none; }
  .nav__toggle { display: flex; }

  .hero__grid {
    grid-template-columns: 1fr;
    grid-template-areas: "head" "foot";
    row-gap: var(--space-md);
  }
  .hero__head { max-width: none; }
  .hero__statement { max-width: 18ch; }

  .positioning__grid { grid-template-columns: 1fr; gap: var(--space-md); }
  .positioning__statement { max-width: none; }

  .featured__image { aspect-ratio: 16 / 10; }
  .featured__body { grid-template-columns: 1fr; gap: var(--space-md); }

  .philosophy__list { grid-template-columns: 1fr; gap: var(--space-md); }
  .principle { max-width: none; }

  /* SystemsGrid: explicit mobile order, largest stays first */
  .selected__grid { display: flex; flex-direction: column; gap: var(--space-md); }
  .case--lead .case__image { aspect-ratio: 16 / 10; }
  .case--b .case__image { aspect-ratio: 16 / 10; }
  .case--c .case__image { aspect-ratio: 16 / 10; }

  /* Wide (~2:1) UI screenshots: centre the crop on mobile so they read as
     intentional landscape frames rather than hugging the left edge. */
  .featured__ui > .scaler,
  .case__ui > .scaler { object-position: center top; }

  .approach__grid { grid-template-columns: 1fr; gap: var(--space-md); }
  .approach__statement { max-width: none; }

  .pause { min-height: 52vh; }
  .pause__line { max-width: 22ch; }

  .footer__grid { grid-template-columns: 1fr 1fr; gap: var(--space-md); }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .section { padding-block: 80px; }
  .featured { padding-block: 80px; }
  .inquiry { padding-block: 120px; }
  .hero__foot { flex-direction: column; align-items: flex-start; gap: var(--space-xs); }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__base { flex-direction: column; gap: 8px; }
  .featured__tags { gap: 8px; }
}
