/* ═══════════════════════════════════════════════════════════════
   HANNES NOIR — style.css  (v3 — mobile-optimised + dropdowns)
   Palette: #000 · #fff · #111 · rgba accents
   Typography: SF Pro Display → system-ui fallback
═══════════════════════════════════════════════════════════════ */

/* ── RESET ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black:   #000000;
  --white:   #ffffff;
  --gray-1:  #111111;
  --gray-2:  #1a1a1a;
  --gray-3:  #888888;
  --gray-4:  #cccccc;

  --font: -apple-system, "SF Pro Display", BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pad-x: clamp(16px, 5vw, 64px);
  --container: 1100px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  /* prevent horizontal scroll on mobile */
  overflow-x: hidden;
}

body {
  background: var(--white);
  color: var(--black);
  font-family: var(--font);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  /* prevent tap highlight on mobile */
  -webkit-tap-highlight-color: transparent;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}
a   { text-decoration: none; color: inherit; }
ul  { list-style: none; }

/* ── CONTAINER ────────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  width: 100%;
}

/* ── REVEAL ───────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 3px;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.2s;
  cursor: pointer;
  white-space: nowrap;
  /* ensure tappable on mobile */
  min-height: 44px;
}
.btn:hover  { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--white {
  background: var(--white);
  color: var(--black);
  border: 1px solid var(--white);
}
.btn--white:hover { background: var(--gray-4); border-color: var(--gray-4); }

.btn--outline {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.5);
}
.btn--outline:hover { border-color: var(--white); }

.btn--black {
  background: var(--black);
  color: var(--white);
  border: 1px solid var(--black);
}
.btn--black:hover { background: var(--gray-1); border-color: var(--gray-1); }

/* ═══════════════════════════════════════════════════════════
   NAV
═══════════════════════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--pad-x);
  transition: background 0.4s var(--ease), padding 0.3s;
}
.nav.scrolled {
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.07);
  padding-top: 12px;
  padding-bottom: 12px;
}

.nav__logo {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--white);
  transition: color 0.3s;
}
.nav.scrolled .nav__logo { color: var(--black); }

.nav__socials {
  display: flex;
  align-items: center;
  gap: 16px;
}
.nav__socials a {
  color: var(--white);
  transition: color 0.25s, opacity 0.25s;
  opacity: 0.85;
  display: flex;
  align-items: center;
  /* larger tap target on mobile */
  padding: 4px;
}
.nav__socials a:hover { opacity: 1; }
.nav.scrolled .nav__socials a { color: var(--black); }

/* ═══════════════════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  /* 100svh respects mobile browser chrome */
  height: 100svh;
  min-height: 500px;
  display: flex;
  align-items: flex-end;
  padding-bottom: clamp(40px, 7vw, 80px);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  /* explicit dimensions so the image fills correctly on iOS */
  width: 100%;
  height: 100%;
}

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  /* will-change helps GPU compositing on mobile */
  will-change: transform;
  animation: heroZoom 10s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}
/* Mobile: position face in the upper golden-ratio third of the frame.
   The image subject is right-of-centre, so we shift X to ~65% and
   pull the crop up to ~5% so the face sits at roughly 38% from top
   (golden ratio ≈ 1 − 0.618 = 0.382). */
@media (max-width: 480px) {
  .hero__img { object-position: 65% 5%; }
}
@media (min-width: 481px) and (max-width: 768px) {
  .hero__img { object-position: 63% 8%; }
}
@keyframes heroZoom {
  from { transform: scale(1.05); }
  to   { transform: scale(1.0); }
}

/* Reduce animation on low-power devices */
@media (prefers-reduced-motion: reduce) {
  .hero__img { animation: none; }
  .reveal { transition: none; }
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.78) 0%,
    rgba(0,0,0,0.32) 50%,
    rgba(0,0,0,0.15) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 1;
  padding: 0 var(--pad-x);
  width: 100%;
}

.hero__headline {
  font-size: clamp(2.4rem, 8vw, 6.5rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: 1.8rem;
}
.hero__headline span {
  opacity: 0.6;
  font-weight: 300;
}

.hero__ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════
   ABOUT
═══════════════════════════════════════════════════════════ */
.about {
  background: var(--white);
  padding: clamp(56px, 9vw, 120px) 0;
}

.about__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}

.about__image {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  width: 100%;
}
.about__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  transition: transform 0.8s var(--ease);
  display: block;
}
.about__image:hover img { transform: scale(1.03); }

.about__text h2 {
  font-size: clamp(1.7rem, 3.5vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--black);
  margin-bottom: 1.2rem;
}

.about__text p {
  font-size: clamp(0.9rem, 1.4vw, 1.05rem);
  font-weight: 400;
  line-height: 1.75;
  color: var(--gray-3);
  margin-bottom: 2rem;
}

.about__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--black);
  letter-spacing: 0.02em;
  transition: opacity 0.2s;
  min-height: 44px;
}
.social-link:hover { opacity: 0.5; }

/* ═══════════════════════════════════════════════════════════
   GALLERY CAROUSEL
═══════════════════════════════════════════════════════════ */
.gallery-section {
  background: var(--black);
  /* no padding — images flush edge-to-edge */
  overflow: hidden;
  position: relative;
}

/* The scrollable track — 8 slides total (6 real + 1 clone each side)
   Each item = 1/3 viewport → track width = 8/3 × 100vw
   We express this as a percentage of the section width (100vw)
   by making each item flex: 0 0 calc(100% / 3) and letting the
   track be as wide as its content (no fixed width needed). */
.gallery-track {
  display: flex;
  width: max-content;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
  touch-action: pan-y pinch-zoom;
  cursor: grab;
}
.gallery-track.dragging { cursor: grabbing; transition: none; }

/* Each image cell = exactly 1/3 of the viewport width */
.gallery__item {
  flex: 0 0 calc(100vw / 3);
  width: calc(100vw / 3);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  position: relative;
  outline: 1px solid var(--black);
}
.gallery__item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(15%);
  transition: transform 0.55s var(--ease), filter 0.4s;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
}
.gallery__item:hover img {
  transform: scale(1.04);
  filter: grayscale(0%);
}

/* Arrow buttons — ultra minimal: no background, just a thin white chevron */
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.2s, opacity 0.2s;
  pointer-events: all;
  touch-action: manipulation;
  padding: 0;
}
.gallery-arrow:hover { color: var(--white); }
.gallery-arrow:active { opacity: 0.5; }
.gallery-arrow--prev { left: 16px; }
.gallery-arrow--next { right: 16px; }

/* Progress bar indicator */
.gallery-progress {
  background: var(--black);
  padding: 14px 32px 16px;
}
.gallery-progress__track {
  width: 100%;
  height: 1px;
  background: rgba(255,255,255,0.15);
  position: relative;
  overflow: hidden;
}
.gallery-progress__fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 25%;          /* starts at step 1 of 4 (0/3 offset = 25%) */
  background: var(--white);
  transition: width 0.42s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ═══════════════════════════════════════════════════════════
   PHILOSOPHY  (with accordion dropdowns)
═══════════════════════════════════════════════════════════ */
.philosophy {
  background: var(--black);
  padding: clamp(56px, 9vw, 120px) 0;
  border-top: 1px solid var(--gray-2);
}

.philosophy__list {
  display: flex;
  flex-direction: column;
}

/* Each accordion item */
.philosophy__item {
  border-bottom: 1px solid var(--gray-2);
  cursor: pointer;
  /* prevent text selection on tap */
  user-select: none;
  -webkit-user-select: none;
}
.philosophy__item:first-child { border-top: 1px solid var(--gray-2); }

/* Trigger row */
.philosophy__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(18px, 2.5vw, 32px) 0;
  transition: padding-left 0.35s var(--ease);
}
.philosophy__item.open .philosophy__trigger,
.philosophy__trigger:hover {
  padding-left: 10px;
}

.philosophy__trigger-text {
  font-size: clamp(1.4rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
  line-height: 1.1;
  transition: color 0.25s;
}
.philosophy__item.open .philosophy__trigger-text,
.philosophy__trigger:hover .philosophy__trigger-text {
  color: var(--gray-4);
}

/* Plus / minus icon */
.philosophy__icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: 1px solid var(--gray-2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 16px;
  transition: border-color 0.25s, transform 0.35s var(--ease);
}
.philosophy__icon svg {
  width: 12px;
  height: 12px;
  stroke: var(--gray-3);
  transition: stroke 0.25s;
}
.philosophy__item.open .philosophy__icon {
  border-color: var(--gray-3);
  transform: rotate(45deg);
}
.philosophy__item.open .philosophy__icon svg { stroke: var(--white); }

/* Dropdown body */
.philosophy__body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s var(--ease);
}
.philosophy__item.open .philosophy__body {
  grid-template-rows: 1fr;
}
.philosophy__body-inner {
  overflow: hidden;
}
.philosophy__body-text {
  padding: 0 0 clamp(16px, 2vw, 28px) 0;
  font-size: clamp(0.88rem, 1.3vw, 1rem);
  font-weight: 400;
  color: var(--gray-3);
  line-height: 1.8;
  max-width: 640px;
}

/* ═══════════════════════════════════════════════════════════
   CTA
═══════════════════════════════════════════════════════════ */
.cta {
  background: var(--white);
  padding: clamp(56px, 9vw, 120px) 0;
}

.cta__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2rem;
}

.cta h2 {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--black);
}

.cta__buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ═══════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════ */
.footer {
  background: var(--black);
  padding: 28px 0;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.footer__name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.06em;
}

.footer__socials {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--gray-3);
}
.footer__socials a {
  color: var(--gray-3);
  transition: color 0.2s;
}
.footer__socials a:hover { color: var(--white); }
.footer__dot { opacity: 0.4; }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — TABLET  (≤ 768px)
═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* About: stack vertically */
  .about__inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .about__image {
    aspect-ratio: 1 / 1;
    max-width: 420px;
    margin: 0 auto;
  }

  /* Gallery carousel: always full-width, no changes needed */
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE  (≤ 480px)
═══════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  :root { --pad-x: 20px; }

  /* Hero: slightly smaller headline, full-width CTAs */
  .hero__headline { font-size: clamp(2rem, 10vw, 2.8rem); }
  .hero__ctas { flex-direction: column; gap: 10px; }
  .hero__ctas .btn { width: 100%; justify-content: center; }

  /* About: full-width image */
  .about__image { max-width: 100%; }
  .about__text p { font-size: 0.92rem; }

  /* Philosophy: slightly smaller text */
  .philosophy__trigger-text { font-size: clamp(1.2rem, 7vw, 1.8rem); }

  /* CTA buttons: stack */
  .cta__buttons { flex-direction: column; gap: 10px; }
  .cta__buttons .btn { width: 100%; justify-content: center; }

  /* Footer: stack */
  .footer__inner { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ── SCROLLBAR ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: var(--gray-2); border-radius: 99px; }

/* ── SELECTION ────────────────────────────────────────────── */
::selection { background: var(--black); color: var(--white); }
