/* =============================================
   ISM.RAW — STYLESHEET
   ============================================= */

/* === CUSTOM PROPERTIES === */
:root {
  --bg:           #f0efed;
  --bg-alt:       #e4e3e1;
  --text:         #1a1a1a;
  --text-2:       #4a4a4a;
  --text-muted:   #999;
  --border:       rgba(0,0,0,0.1);
  --btn-bg:       #1a1a1a;
  --btn-text:     #ffffff;
  --nav-bg:       rgba(240,239,237,0.9);
  --footer-bg:    #e4e3e1;
  --nav-h:        64px;
  --serif:        'Cormorant Garamond', Georgia, serif;
  --sans:         'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --ease:         0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg:           #111;
  --bg-alt:       #1a1a1a;
  --text:         #e8e6e1;
  --text-2:       #a8a5a0;
  --text-muted:   #555;
  --border:       rgba(255,255,255,0.09);
  --btn-bg:       #e8e6e1;
  --btn-text:     #111;
  --nav-bg:       rgba(17,17,17,0.9);
  --footer-bg:    #1a1a1a;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  line-height: 1.65;
  transition: background var(--ease), color var(--ease);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* === SHIMMER LOADING PLACEHOLDER === */
@keyframes shimmer {
  from { background-position: -200% 0; }
  to   { background-position:  200% 0; }
}
.img-shell {
  position: relative;
  overflow: hidden;
  background: var(--bg-alt);
  background-image: linear-gradient(
    90deg,
    var(--bg-alt) 0%,
    var(--border) 50%,
    var(--bg-alt) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.6s ease infinite;
}
.img-shell img {
  position: relative;
  z-index: 1;
  transition: opacity 0.4s ease;
}
.img-shell img.loaded { opacity: 1; }

/* === BUTTON === */
.btn {
  display: inline-block;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 18px 52px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: opacity var(--ease), transform var(--ease), box-shadow var(--ease);
}
.btn:hover {
  opacity: 0.82;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.btn:active { transform: translateY(0); box-shadow: none; }

/* === NAV === */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 300;
  transition: background var(--ease);
}
.nav-logo {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.nav-right { display: flex; align-items: center; gap: 28px; }
.nav-links { display: flex; gap: 24px; }
.nav-links a {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  transition: opacity var(--ease);
  cursor: pointer;
}
.nav-links a:hover { opacity: 0.5; }
.nav-links a.active {
  border-bottom: 1px solid var(--text);
  padding-bottom: 2px;
}
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 16px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  transition: all var(--ease);
}
.theme-toggle:hover { background: var(--text); color: var(--bg); border-color: var(--text); }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 301;
}
.nav-hamburger span {
  display: block; width: 22px; height: 1px;
  background: var(--text);
  transition: all var(--ease);
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 290;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
}
.mobile-menu.open { opacity: 1; pointer-events: all; }
.mobile-menu ul { display: flex; flex-direction: column; align-items: center; gap: 36px; }
.mobile-menu a {
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 300;
  letter-spacing: -0.02em;
  cursor: pointer;
}

/* === GALLERY PICKER OVERLAY === */
.gallery-picker {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}
.gallery-picker.open {
  opacity: 1;
  pointer-events: all;
}

.gallery-picker-close {
  position: fixed;
  top: 24px; right: 32px;
  width: 40px; height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 401;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.gallery-picker-close span {
  display: block;
  width: 24px; height: 1px;
  background: var(--text);
  transition: transform var(--ease);
}
.gallery-picker-close span:nth-child(1) { transform: translateY(0.5px) rotate(45deg); }
.gallery-picker-close span:nth-child(2) { transform: translateY(-0.5px) rotate(-45deg); }
.gallery-picker-close:hover span:nth-child(1) { transform: translateY(0.5px) rotate(135deg); }
.gallery-picker-close:hover span:nth-child(2) { transform: translateY(-0.5px) rotate(45deg); }

.gallery-picker-inner {
  width: 100%;
  max-width: 1300px;
  padding: 80px 40px;
}

.gallery-picker-label {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 48px;
  text-align: center;
}

.gallery-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* Gallery card */
.gallery-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 4px;
  cursor: pointer;
  aspect-ratio: 3/4;
}

.gallery-card-img {
  position: absolute;
  inset: 0;
  background: var(--bg-alt);
  overflow: hidden;
}
.gallery-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.gallery-card:hover .gallery-card-img img {
  transform: scale(1.06);
}

/* Gradient overlay on card */
.gallery-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.72) 0%,
    rgba(0,0,0,0.2) 40%,
    transparent 70%
  );
  transition: opacity var(--ease);
}
.gallery-card:hover::after {
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.82) 0%,
    rgba(0,0,0,0.3) 50%,
    transparent 75%
  );
}

.gallery-card-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 28px 24px;
  z-index: 2;
  transform: translateY(4px);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.gallery-card:hover .gallery-card-info { transform: translateY(0); }

.gallery-card-title {
  font-family: var(--serif);
  font-size: clamp(22px, 2vw, 32px);
  font-weight: 400;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.gallery-card-sub {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-top: 6px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s ease 0.05s, transform 0.3s ease 0.05s;
}
.gallery-card:hover .gallery-card-sub { opacity: 1; transform: translateY(0); }

/* Picker entry animation */
.gallery-picker.open .gallery-card {
  animation: cardIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.gallery-picker.open .gallery-card:nth-child(1) { animation-delay: 0.05s; }
.gallery-picker.open .gallery-card:nth-child(2) { animation-delay: 0.12s; }
.gallery-picker.open .gallery-card:nth-child(3) { animation-delay: 0.19s; }
.gallery-picker.open .gallery-card:nth-child(4) { animation-delay: 0.26s; }

@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* === MAIN === */
main { padding-top: var(--nav-h); }

/* === HERO === */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - var(--nav-h));
  align-items: center;
}
.hero-image {
  overflow: hidden;
  height: calc(100vh - var(--nav-h));
  background: var(--bg-alt);
  aspect-ratio: auto;
}
.hero-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-content {
  padding: 60px 80px;
  display: flex;
  flex-direction: column;
}
.hero-title {
  font-size: clamp(34px, 3.4vw, 52px);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.025em;
  margin-bottom: 28px;
}
.hero-body {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 300;
  color: var(--text-2);
  line-height: 1.8;
  max-width: 380px;
  margin-bottom: 52px;
}

/* === JOURNEY === */
.journey { padding: 100px 40px; text-align: center; }
.section-title {
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 52px;
}
.journey-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 52px;
}
.journey-item { overflow: hidden; }
.journey-img-wrap {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-alt);
}
.journey-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.journey-item:hover .journey-img-wrap img { transform: scale(1.04); }

/* === INDIVIDUAL GALLERY PAGE === */
.gallery-page { padding: 56px 40px 100px; }
.gallery-page-header { margin-bottom: 52px; }
.gallery-back {
  display: inline-block;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
  transition: color var(--ease);
  cursor: pointer;
}
.gallery-back:hover { color: var(--text); }
.gallery-title {
  font-size: clamp(32px, 4.5vw, 64px);
  font-weight: 400;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
.gallery-subtitle {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.gallery-desc {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text-2);
  max-width: 480px;
  line-height: 1.75;
}
.gallery-grid {
  columns: 3;
  column-gap: 16px;
}
.gallery-item {
  break-inside: avoid;
  margin-bottom: 16px;
  cursor: pointer;
}
.gallery-img-wrap {
  overflow: hidden;
  background: var(--bg-alt);
  aspect-ratio: auto;
}
.gallery-img-wrap img {
  width: 100%;
  display: block;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.gallery-item:hover .gallery-img-wrap img { transform: scale(1.04); }
.gallery-caption {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-top: 8px;
  padding-bottom: 4px;
}

/* === LIGHTBOX === */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.96);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.lightbox.open { opacity: 1; pointer-events: all; }
.lightbox-img-wrap { max-width: 90vw; max-height: 85vh; }
.lightbox-img-wrap img { max-width: 90vw; max-height: 82vh; object-fit: contain; }
.lightbox-caption {
  color: rgba(255,255,255,0.5);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 16px;
}
.lightbox-close {
  position: absolute; top: 24px; right: 28px;
  background: none; border: none; color: #fff;
  font-size: 28px; cursor: pointer; opacity: 0.6;
  transition: opacity 0.2s; line-height: 1;
}
.lightbox-close:hover { opacity: 1; }
.lightbox-prev, .lightbox-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: none; border: 1px solid rgba(255,255,255,0.15);
  color: #fff; font-size: 16px;
  padding: 14px 18px; cursor: pointer; border-radius: 4px;
  opacity: 0.5; transition: opacity 0.2s, border-color 0.2s;
}
.lightbox-prev:hover, .lightbox-next:hover { opacity: 1; border-color: rgba(255,255,255,0.4); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* === ABOUT === */
.about-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(80vh - var(--nav-h));
  align-items: center;
}
.about-content { padding: 60px 40px; }
.about-name {
  font-size: clamp(32px, 4vw, 60px);
  font-weight: 400;
  letter-spacing: -0.025em;
  margin-bottom: 8px;
}
.about-subtitle {
  font-family: var(--sans); font-size: 12px;
  color: var(--text-muted); letter-spacing: 0.06em;
  text-transform: uppercase; margin-bottom: 28px;
}
.about-bio {
  font-family: var(--sans); font-size: 15px;
  color: var(--text-2); line-height: 1.8; max-width: 420px;
}
.about-image {
  height: calc(80vh - var(--nav-h));
  overflow: hidden; background: var(--bg-alt);
}
.about-image img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }

.about-section {
  display: grid; grid-template-columns: 1fr 1fr;
  align-items: center;
  border-top: 1px solid var(--border);
}
.split-image { height: 60vh; overflow: hidden; background: var(--bg-alt); }
.split-image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.about-section:hover .split-image img { transform: scale(1.03); }
.split-content {
  padding: 60px 40px;
  display: flex; flex-direction: column; gap: 14px;
}
.split-title {
  font-size: clamp(28px, 3vw, 52px);
  font-weight: 400; letter-spacing: -0.025em;
}
.split-sub {
  font-family: var(--sans); font-size: 12px;
  color: var(--text-muted); letter-spacing: 0.06em;
  text-transform: uppercase; margin-bottom: 18px;
}

/* === CONTACT === */
.contact-session {
  display: grid; grid-template-columns: 1fr 1fr;
  align-items: center; min-height: 60vh;
}
.contact-session-text { padding: 60px 40px; }
.contact-title {
  font-size: clamp(32px, 4vw, 60px);
  font-weight: 400; letter-spacing: -0.025em; margin-bottom: 20px;
}
.contact-sub {
  font-family: var(--sans); font-size: 14px;
  color: var(--text-2); line-height: 1.8; max-width: 420px;
}
.contact-session-image { height: 60vh; overflow: hidden; background: var(--bg-alt); }
.contact-session-image img { width: 100%; height: 100%; object-fit: cover; }

.contact-form-section {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 80px; padding: 80px 40px 120px;
  border-top: 1px solid var(--border);
}
.contact-form-title {
  font-size: clamp(26px, 3vw, 46px);
  font-weight: 400; letter-spacing: -0.025em; margin-bottom: 14px;
}
.contact-form-sub {
  font-family: var(--sans); font-size: 14px;
  color: var(--text-2); line-height: 1.8;
}
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label {
  font-family: var(--sans); font-size: 12px;
  letter-spacing: 0.04em; color: var(--text-2);
}
.required { color: var(--text-muted); font-size: 10px; margin-left: 4px; }
.form-group input, .form-group textarea {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 14px 22px;
  font-family: var(--sans); font-size: 14px;
  color: var(--text); outline: none;
  transition: border-color var(--ease);
  width: 100%;
}
.form-group textarea {
  border-radius: 20px; resize: vertical; min-height: 130px;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--text); }
.btn-submit { align-self: flex-start; }

/* === FOOTER === */
footer {
  background: var(--footer-bg);
  padding: 64px 40px;
  transition: background var(--ease);
}
.footer-inner {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  align-items: start; gap: 40px;
}
.footer-brand {
  font-family: var(--serif); font-size: 40px;
  font-weight: 400; letter-spacing: -0.02em;
}
.footer-col h3 {
  font-family: var(--sans); font-size: 11px;
  font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; margin-bottom: 14px;
}
.footer-col p {
  font-family: var(--sans); font-size: 13px;
  color: var(--text-2); line-height: 1.8;
}
.footer-col a { transition: opacity var(--ease); }
.footer-col a:hover { opacity: 0.55; }

/* === SCROLL ANIMATIONS === */
.fade-in {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.9s cubic-bezier(0.4,0,0.2,1), transform 0.9s cubic-bezier(0.4,0,0.2,1);
}
.fade-in.visible { opacity: 1; transform: none; }
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 1s cubic-bezier(0.4,0,0.2,1), transform 1s cubic-bezier(0.4,0,0.2,1);
}
.reveal.visible { opacity: 1; transform: none; }
.delay-1 { transition-delay: 0.15s !important; }
.delay-2 { transition-delay: 0.3s !important; }

/* === TABLET (< 1024px) === */
@media (max-width: 1024px) {
  nav { padding: 0 28px; }
  .gallery-picker-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { columns: 2; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* === MOBILE (< 768px) === */
@media (max-width: 768px) {
  :root { --nav-h: 56px; }

  nav { padding: 0 20px; }
  .nav-links, .theme-toggle { display: none; }
  .nav-hamburger { display: flex; }

  /* Hero stacked */
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-image { height: 58vw; min-height: 280px; }
  .hero-content { padding: 40px 20px; }
  .hero-body { max-width: 100%; }

  /* Journey */
  .journey { padding: 64px 20px; }
  .journey-grid { grid-template-columns: 1fr; }

  /* Gallery picker */
  .gallery-picker-inner { padding: 80px 20px 40px; }
  .gallery-picker-grid { grid-template-columns: 1fr; gap: 12px; }
  .gallery-card { aspect-ratio: 16/9; }

  /* Gallery page */
  .gallery-page { padding: 40px 20px 80px; }
  .gallery-grid { columns: 1; }

  /* About */
  .about-hero { grid-template-columns: 1fr; min-height: auto; }
  .about-image { height: 60vw; min-height: 240px; order: -1; }
  .about-content { padding: 36px 20px; }
  .about-section { grid-template-columns: 1fr; }
  .split-image { height: 50vw; min-height: 220px; }
  .split-content { padding: 32px 20px; }

  /* Contact */
  .contact-session { grid-template-columns: 1fr; min-height: auto; }
  .contact-session-image { height: 50vw; min-height: 200px; order: -1; }
  .contact-session-text { padding: 36px 20px 20px; }
  .contact-form-section { grid-template-columns: 1fr; gap: 40px; padding: 40px 20px 80px; }
  .form-row { grid-template-columns: 1fr; }

  /* Footer */
  footer { padding: 48px 20px; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-brand { font-size: 32px; }

  /* Lightbox */
  .lightbox-prev { left: 10px; padding: 10px 12px; }
  .lightbox-next { right: 10px; padding: 10px 12px; }
}
