/* =========================================================
   Tina — Photography Studio
   Light, minimal · Fiber-style 3D cascade cover
   ========================================================= */

:root {
  --bg: #f4f3f1;
  --panel: #ffffff;
  --fg: #14120f;
  --muted: #8f8a82;
  --line: rgba(20, 18, 15, 0.14);
  --ink: #1c1a17;
  --radius: 10px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --pad: clamp(1.1rem, 3.5vw, 2.6rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', 'Noto Sans Armenian', system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
body.is-locked { overflow: hidden; height: 100vh; }
button { -webkit-tap-highlight-color: transparent; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--ink); color: var(--bg); }
em { font-family: 'Instrument Serif', serif; font-style: italic; }

/* ---------- Cursor ---------- */
.cursor {
  position: fixed; top: 0; left: 0;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ink); pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width .3s var(--ease), height .3s var(--ease), opacity .3s;
  mix-blend-mode: difference;
}
.cursor.is-hover { width: 40px; height: 40px; }
@media (hover: none) { .cursor { display: none; } }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 9000;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  transition: opacity .7s var(--ease), visibility .7s;
}
.preloader.is-done { opacity: 0; visibility: hidden; }
.preloader__mark { display: inline-flex; }
.preloader__mark svg { width: 26px; height: 26px; animation: spin 3.5s linear infinite; }
.preloader__count {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(3.5rem, 12vw, 8rem); line-height: 1;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Top chrome ---------- */
.top {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 800;
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 1.25rem var(--pad);
  padding-top: max(1.25rem, env(safe-area-inset-top));
  padding-left: max(var(--pad), env(safe-area-inset-left));
  padding-right: max(var(--pad), env(safe-area-inset-right));
  font-size: .74rem; letter-spacing: .06em; text-transform: uppercase;
  transition: transform .5s var(--ease);
}
.top.is-hidden { transform: translateY(-120%); }
.top__cluster { display: flex; gap: 1.4rem; align-items: center; }
.top__left { flex-wrap: wrap; }
.top__time { color: var(--muted); }
.top__brand { font-weight: 600; letter-spacing: .12em; }
.top__tag { color: var(--muted); }
.top__mark {
  position: absolute; left: 50%; transform: translateX(-50%);
  display: inline-flex; color: var(--fg);
}
.top__mark svg { width: 20px; height: 20px; animation: spin 6s linear infinite; }
.top__right a { color: var(--muted); transition: color .3s; }
.top__right a:hover { color: var(--fg); }
.top__expand {
  display: inline-grid; place-items: center;
  width: 42px; height: 42px; margin-top: -9px; margin-left: .4rem;
  background: var(--ink); color: var(--bg);
  border: 0; border-radius: 10px; cursor: pointer;
  transition: transform .35s var(--ease);
}
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: .15rem;
  padding: .18rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.55);
  backdrop-filter: blur(12px);
}
.lang-switch button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: .7rem;
  letter-spacing: .06em;
  line-height: 1;
  padding: .42rem .55rem;
  text-transform: uppercase;
  transition: background .3s, color .3s;
}
.lang-switch button.is-active { background: var(--ink); color: var(--bg); }
.lang-switch button:hover { color: var(--fg); }
.top__expand svg { width: 18px; height: 18px; }
.top__expand:hover { transform: scale(1.06); }
.top__burger {
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  width: 42px; height: 42px; margin-top: -9px; margin-left: .4rem; padding: 0;
  background: var(--ink); border: 0; border-radius: 10px; cursor: pointer;
}
.top__burger span { display: block; width: 18px; height: 1.5px; background: var(--bg); transition: transform .35s var(--ease), opacity .3s; }
body.nav-open .top__burger span:nth-child(1) { transform: translateY(3.25px) rotate(45deg); }
body.nav-open .top__burger span:nth-child(2) { transform: translateY(-3.25px) rotate(-45deg); }

/* ---------- Mobile chrome ---------- */
@media (max-width: 720px) {
  :root { --pad: 1rem; }
  .top { padding: 1rem var(--pad); }
  .top__left { flex-wrap: nowrap; gap: 1rem; }
  .top__tag, .top__social, .top__expand { display: none; }
  .lang-switch { margin-left: auto; }
  .top__burger { display: flex; }
  nav.pill { display: none; }
}
@media (max-width: 460px) {
  .top__time { display: none; }
}
@media (max-width: 380px) {
  .top__mark { display: none; }
  .top__right { gap: .6rem; }
  .lang-switch button { padding-inline: .5rem; }
}

/* ---------- Mobile menu ---------- */
.menu {
  position: fixed; inset: 0; background: var(--bg); z-index: 700;
  display: flex; flex-direction: column; justify-content: center;
  padding: max(var(--pad), env(safe-area-inset-top)) max(var(--pad), env(safe-area-inset-right)) max(var(--pad), env(safe-area-inset-bottom)) max(var(--pad), env(safe-area-inset-left));
  clip-path: circle(0% at 100% 0); transition: clip-path .7s var(--ease);
  pointer-events: none;
}
.menu.is-open { clip-path: circle(150% at 100% 0); pointer-events: auto; }
.menu__links { display: flex; flex-direction: column; gap: .3rem; }
.menu__links a { font-family: 'Instrument Serif', serif; font-size: clamp(2.4rem, 12vw, 3.6rem); }
.menu__foot { margin-top: 2.5rem; display: flex; justify-content: space-between; color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }

/* ============ COVER / HERO ============ */
/* Lock scroll on the cover: it's one fixed screen, and this stops Safari from
   scrolling into the 3D cascade's phantom overflow (a WebKit clipping quirk). */
html.cover-view, html.cover-view body { overflow: hidden; height: 100%; overscroll-behavior: none; }

.cover {
  position: relative;
  height: 100svh; min-height: 600px;
  overflow: hidden;
}
/* Extra safety: clip the 3D stage to the viewport so cards can't extend the page box. */
.stage { overflow: hidden; }
.cover__intro {
  position: absolute; z-index: 5;
  top: max(clamp(4.5rem, 12vh, 7rem), calc(env(safe-area-inset-top) + 3.4rem));
  left: max(var(--pad), env(safe-area-inset-left));
  max-width: 30ch;
  font-size: clamp(.95rem, 1.4vw, 1.15rem); line-height: 1.45;
  z-index: 5;
}

/* --- 3D cascade --- */
.stage {
  position: absolute; inset: 0;
  perspective: 1500px;
  perspective-origin: 64% 35%;
  z-index: 1;
}
.cascade {
  position: absolute; top: 45%; left: 49%;
  transform-style: preserve-3d;
  opacity: 0;
  transition: opacity .9s var(--ease);
}
.cascade.is-in { opacity: 1; }
.card {
  position: absolute;
  width: 420px; height: 534px;
  margin-left: -210px; margin-top: -267px;
  border-radius: 8px; overflow: hidden;
  background: #ddd;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.45);
  transform-style: preserve-3d;
  will-change: transform, opacity;
  backface-visibility: hidden;
  cursor: pointer;
}
.card::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(255,255,255,.28), rgba(255,255,255,0) 45%);
  mix-blend-mode: screen;
}

.cover__foot {
  position: absolute; left: 0; width: 100%; z-index: 6;
  bottom: max(clamp(1.2rem, 3vh, 2rem), env(safe-area-inset-bottom));
  padding-left: max(var(--pad), env(safe-area-inset-left));
  padding-right: max(var(--pad), env(safe-area-inset-right));
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.cover__copy, .cover__mail { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.cover__mail:hover { color: var(--fg); }

.pill {
  position: fixed; left: 50%; bottom: max(clamp(1.1rem, 3vh, 2rem), calc(env(safe-area-inset-bottom) + .3rem));
  transform: translateX(-50%); z-index: 850;
  display: flex; gap: .2rem;
  background: rgba(255,255,255,.65);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 100px; padding: .35rem;
  box-shadow: 0 10px 30px -12px rgba(0,0,0,.25);
  max-width: calc(100vw - 2 * var(--pad));
}
.pill a {
  font-size: .82rem; padding: .5rem 1.1rem; border-radius: 100px;
  color: var(--muted); transition: color .3s, background .3s;
  white-space: nowrap;
}
.pill a:hover { color: var(--fg); }
.pill a.is-active { background: var(--ink); color: var(--bg); }

@media (max-width: 640px) {
  .cover__intro { font-size: 1rem; max-width: 26ch; }
  .cover__foot { bottom: clamp(1.1rem, 3vh, 1.6rem); }
  .stage { perspective-origin: 58% 45%; }
  .cascade { top: 48%; left: 48%; }
}

/* ============ Pages (router) ============ */
.route { display: none; }
section.route { min-height: 100svh; padding-top: clamp(6rem, 11vh, 8.5rem); padding-bottom: clamp(6.5rem, 11vh, 9rem); }
.route.is-active { display: block; animation: pageIn .6s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .route.is-active { animation: none; } }

/* ============ Section head ============ */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: 0 var(--pad) 1.4rem; margin-bottom: 2.8rem;
  border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.section-head__title { font-family: 'Instrument Serif', serif; font-weight: 400; font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1; }
.section-head__index { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
html[lang="hy"] .section-head__title,
html[lang="hy"] .service__name,
html[lang="hy"] .about__title,
html[lang="hy"] .contact__title,
html[lang="hy"] .contact__email,
html[lang="hy"] .menu__links a {
  font-family: 'Noto Sans Armenian', 'Inter', system-ui, sans-serif;
  font-weight: 400;
}
html[lang="hy"] .section-head__index,
html[lang="hy"] .top,
html[lang="hy"] .pill a,
html[lang="hy"] .footer__row {
  letter-spacing: .02em;
}

/* ============ Works ============ */
.work { padding: clamp(4rem, 9vh, 7rem) 0; }
.work__grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr; gap: clamp(1rem, 2.5vw, 2rem); padding: 0 var(--pad);
}
.project { position: relative; }
.project--tall { grid-row: span 2; }
.project--wide { grid-column: span 2; }
.project__media { display: block; overflow: hidden; border-radius: var(--radius); aspect-ratio: 4/5; background: #e7e5e2; }
.project--wide .project__media { aspect-ratio: 16/9; }
.project--tall .project__media { aspect-ratio: 3/5; height: 100%; }
.project__media img { transform: scale(1.02); transition: transform 1.1s var(--ease), filter .6s; filter: grayscale(.12); }
.project:hover .project__media img { transform: scale(1.08); filter: grayscale(0); }
.project__meta { display: flex; align-items: baseline; justify-content: space-between; padding: .9rem .1rem 0; }
.project__meta h3 { font-size: 1.1rem; font-weight: 500; }
.project__meta span { font-size: .8rem; color: var(--muted); }
@media (max-width: 720px) {
  .work__grid { grid-template-columns: 1fr; }
  .project--tall, .project--wide { grid-row: auto; grid-column: auto; }
  .project__media, .project--wide .project__media, .project--tall .project__media {
    aspect-ratio: 4/5;
    height: auto;
  }
  .project__meta { gap: .8rem; }
}

/* ============ Shots ============ */
.shots { padding: clamp(3rem, 7vh, 6rem) 0; }
.shots__grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: clamp(.6rem, 1.5vw, 1.1rem); padding: 0 var(--pad);
}
.shot { aspect-ratio: 1; overflow: hidden; border-radius: 8px; background: #e7e5e2; }
.shot img { filter: grayscale(.2); transition: transform 1s var(--ease), filter .5s; }
.shot:hover img { transform: scale(1.07); filter: grayscale(0); }
@media (max-width: 720px) { .shots__grid { grid-template-columns: repeat(2, 1fr); } }

/* ============ Services ============ */
.services { padding: clamp(4rem, 9vh, 7rem) 0; }
.services__list { padding: 0 var(--pad); }
.service { border-bottom: 1px solid var(--line); cursor: pointer; }
.service:first-child { border-top: 1px solid var(--line); }
.service__row { display: grid; grid-template-columns: 60px 1fr auto 40px; align-items: center; gap: 1rem; padding: 1.7rem 0; transition: padding .4s var(--ease); }
.service__no { font-size: .82rem; color: var(--muted); }
.service__name { font-family: 'Instrument Serif', serif; font-weight: 400; font-size: clamp(1.5rem, 3.4vw, 2.6rem); line-height: 1; transition: color .4s; }
.service__price { font-size: .92rem; color: var(--muted); }
.service__toggle { font-size: 1.6rem; text-align: center; transition: transform .5s var(--ease); }
.service:hover .service__name { opacity: .55; }
.service:hover .service__row { padding-inline: .5rem; }
.service.is-open .service__toggle { transform: rotate(135deg); }
.service__detail { overflow: hidden; max-height: 0; transition: max-height .55s var(--ease); }
.service.is-open .service__detail { max-height: 320px; }
.service__detail p { max-width: 60ch; color: var(--muted); padding-left: 76px; padding-bottom: 1.7rem; font-size: 1rem; }
.price-list {
  margin: clamp(2.4rem, 6vw, 4.5rem) var(--pad) 0;
  border-top: 1px solid var(--line);
}
.price-list__head {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(260px, 1fr);
  gap: clamp(1rem, 4vw, 4rem);
  align-items: start;
  padding: 1.4rem 0 1.8rem;
}
.price-list__head h3 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1;
}
.price-list__head p {
  color: var(--muted);
  max-width: 58ch;
}
.price-list__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.price-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.2rem;
  min-height: 72px;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.price-item:nth-child(odd) { padding-right: clamp(1rem, 3vw, 2.5rem); }
.price-item:nth-child(even) {
  padding-left: clamp(1rem, 3vw, 2.5rem);
  border-left: 1px solid var(--line);
}
.price-item span { color: #4a453f; }
.price-item strong {
  flex: 0 0 auto;
  font-size: .98rem;
  font-weight: 500;
  white-space: nowrap;
}
html[lang="hy"] .price-list__head h3 {
  font-family: 'Noto Sans Armenian', 'Inter', system-ui, sans-serif;
}
@media (max-width: 640px) {
  .service__row {
    grid-template-columns: 34px minmax(0, 1fr) 30px;
    gap: .45rem .75rem;
    padding: 1.15rem 0;
  }
  .service:hover .service__row { padding-inline: 0; }
  .service__name {
    font-size: clamp(1.35rem, 6.3vw, 1.65rem);
    line-height: 1.12;
  }
  .service__price { grid-column: 2; grid-row: 2; }
  .service__toggle { align-self: start; line-height: 1; padding-top: .12rem; }
  .service__detail p { padding-left: 34px; padding-bottom: 1.2rem; }
  .price-list__head,
  .price-list__grid { grid-template-columns: 1fr; }
  .price-item:nth-child(odd),
  .price-item:nth-child(even) {
    padding-left: 0;
    padding-right: 0;
    border-left: 0;
  }
}

/* ============ About ============ */
.about {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 6vw, 6rem); align-items: center;
  padding: clamp(5rem, 12vh, 10rem) var(--pad); max-width: 1500px; margin: 0 auto;
}
.about__media { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/5; }
.about__media img { filter: grayscale(.1); }
.about__title { font-family: 'Instrument Serif', serif; font-weight: 400; font-size: clamp(2rem, 4.5vw, 3.6rem); line-height: 1.08; margin: 1rem 0 1.8rem; }
.about__title span { display: block; overflow: hidden; }
.about__text { color: #4a453f; max-width: 52ch; margin-bottom: 1.1rem; font-size: 1.02rem; }
.about__stats { list-style: none; display: flex; gap: clamp(1.5rem, 4vw, 3.5rem); margin-top: 2.4rem; flex-wrap: wrap; }
.about__stats strong { display: block; font-family: 'Instrument Serif', serif; font-weight: 400; font-size: clamp(2.4rem, 5vw, 3.4rem); line-height: 1; }
.about__stats span { font-size: .8rem; color: var(--muted); }
@media (max-width: 820px) { .about { grid-template-columns: 1fr; } }

/* ============ Contact ============ */
.contact { padding: clamp(6rem, 14vh, 11rem) var(--pad); }
.contact__inner { max-width: 1200px; margin: 0 auto; text-align: center; }
.contact__title { font-family: 'Instrument Serif', serif; font-weight: 400; font-size: clamp(2.6rem, 8vw, 6.5rem); line-height: 1.02; margin: 1.2rem 0 2.2rem; }
.contact__title span { display: block; overflow: hidden; }
.contact__email { display: inline-block; font-family: 'Instrument Serif', serif; font-size: clamp(1.5rem, 4vw, 2.8rem); border-bottom: 1px solid var(--line); padding-bottom: .25rem; transition: opacity .4s, border-color .4s; }
.contact__email:hover { opacity: .55; }
.contact__note { color: var(--muted); max-width: 44ch; margin: 1.8rem auto 0; }
.contact__socials { display: flex; gap: 2rem; justify-content: center; margin-top: 2.2rem; font-size: .9rem; }
.contact__socials a { color: var(--muted); transition: color .3s; }
.contact__socials a:hover { color: var(--fg); }

/* ============ Footer ============ */
.footer { border-top: 1px solid var(--line); padding: 1.8rem var(--pad); }
.footer__row { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .82rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.footer__row a:hover { color: var(--fg); }

/* ============ Reveal ============ */
.reveal, .reveal-y { opacity: 0; }
.reveal { transform: translateY(22px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal-y { display: inline-block; transform: translateY(105%); transition: transform 1s var(--ease), opacity 1s var(--ease); }
.reveal-y.in { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, .top__mark, .preloader__mark { animation: none !important; transition-duration: .01ms !important; }
  .reveal, .reveal-y { opacity: 1 !important; transform: none !important; }
  .preloader { display: none; }
  .card { opacity: 1 !important; }
}

/* Keep sections that use their own display intact when shown as a page
   (overrides the generic .route.is-active { display:block }) */
.route.about.is-active { display: grid; }
@media (max-width: 820px) { .route.about.is-active { display: block; } }
