/* =========================================================
   thanh vu nguyen — fashion photography one-pager
   ========================================================= */

/* Lokal gehostete Schriften (kein Google-Fonts-CDN — schont die Privatsphäre
   der Besucher:innen, siehe Datenschutzerklärung) */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../assets/fonts/poppins-latin-300-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/poppins-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/poppins-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/fraunces-latin-400-normal.woff2') format('woff2');
}

:root {
  --bg: #ffffff;
  --fg: #111111;
  --fg-muted: #6b6b6b;
  --border: #e4e2dd;
  --accent: #111111;
  --header-bg: rgba(255, 255, 255, 0.85);
  --overlay-bg: rgba(255, 255, 255, 0.9);
  --input-bg: #ffffff;
  --transition: 0.35s ease;
  --font-serif: 'Fraunces', Georgia, serif;
  --font-body: 'Poppins', Helvetica, Arial, sans-serif;
}

html[data-theme="dark"] {
  --bg: #0d0d0d;
  --fg: #f3f3f0;
  --fg-muted: #a3a3a3;
  --border: #2a2a2a;
  --accent: #f3f3f0;
  --header-bg: rgba(13, 13, 13, 0.85);
  --overlay-bg: rgba(13, 13, 13, 0.9);
  --input-bg: #161616;
}

* { box-sizing: border-box; }

html { font-size: 100%; }

/* Schriftgröße der ganzen Seite — steuerbar im Admin-Bereich unter "texte".
   Skaliert die html-Basisgröße, alle rem-Werte auf der Seite passen sich mit an. */
html[data-font-size="small"] { font-size: 90%; }
html[data-font-size="large"] { font-size: 113%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-weight: 300;
  transition: background var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

#page-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: filter var(--transition);
}

#page-wrap.blurred {
  filter: blur(14px) brightness(0.9);
  pointer-events: none;
  user-select: none;
}

/* ---------- Header / Nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 5vw;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  font-weight: 400;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 34px;
}

.main-nav a {
  font-size: 0.95rem;
  text-transform: lowercase;
  letter-spacing: 0.03em;
  color: var(--fg-muted);
  position: relative;
  padding-bottom: 4px;
  transition: color var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--fg);
}

.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--fg);
}

.nav-instagram,
.nav-mail {
  display: flex;
  align-items: center;
  align-self: center;
  color: var(--fg-muted);
  line-height: 0;
  transition: color var(--transition);
}
.nav-instagram:hover,
.nav-mail:hover { color: var(--fg); }

.footer-instagram,
.footer-mail {
  display: flex;
  align-items: center;
  line-height: 0;
  color: var(--fg-muted);
  transition: color var(--transition);
}
.footer-instagram:hover,
.footer-mail:hover { color: var(--fg); }

.nav-instagram svg,
.nav-mail svg,
.footer-instagram svg,
.footer-mail svg {
  display: block;
}

/* Schalter mit Sonne/Mond-Icon im Knopf für den Dark-Mode-Toggle */
.theme-toggle {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.toggle-track {
  display: block;
  width: 54px;
  height: 30px;
  border-radius: 999px;
  background: #2e2e30;
  position: relative;
  transition: background 0.25s ease;
}

.toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, background 0.25s ease;
}

.toggle-knob svg {
  position: absolute;
  width: 14px;
  height: 14px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toggle-knob .icon-sun { color: #111111; opacity: 1; transform: scale(1); }
.toggle-knob .icon-moon { color: #ffffff; opacity: 0; transform: scale(0.5); }

html[data-theme="dark"] .toggle-track {
  background: #ffffff;
  border: 1px solid var(--border);
}

html[data-theme="dark"] .toggle-knob {
  transform: translateX(24px);
  background: #111111;
}

html[data-theme="dark"] .toggle-knob .icon-sun { opacity: 0; transform: scale(0.5); }
html[data-theme="dark"] .toggle-knob .icon-moon { opacity: 1; transform: scale(1); }

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  height: 1px;
  background: var(--fg);
  width: 100%;
}

/* ---------- Gallery (home) ---------- */

.gallery {
  padding: 4vw 5vw 2vw;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gallery-row {
  display: grid;
  gap: 10px;
}

.photo-cell {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--bg);
  overflow: hidden;
  cursor: pointer;
}

.photo-cell img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--bg);
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), opacity var(--transition);
}

.photo-cell:hover img {
  transform: scale(1.035);
}

.view-label {
  display: none;
}

.photo-cell-wrap { display: flex; flex-direction: column; }

.photo-caption {
  margin: 10px 2px 0;
  font-family: 'SFMono-Regular', ui-monospace, Consolas, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.gallery-row-featured {
  margin: 0 -5vw 10px;
}

.gallery-row-featured .photo-caption {
  margin-left: 5vw;
  margin-right: 5vw;
}

.gallery-row-featured .photo-cell {
  aspect-ratio: 3 / 4;
}

@media (max-width: 620px) {
  .gallery-row-featured { margin: 0 -6vw 10px; }
}

.hero-intro {
  padding: 8vw 5vw 3.5vw;
  max-width: 760px;
}

.hero-kicker {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--fg-muted);
  text-transform: lowercase;
  margin: 0 0 0.9rem;
}

.hero-intro h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: 0;
  line-height: 1.25;
  margin: 0;
  text-transform: lowercase;
}

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Back to top ---------- */

.back-to-top-wrap {
  display: flex;
  justify-content: center;
  padding: 4vw 0 0;
}

.back-to-top {
  display: inline-block;
  border: 1px solid var(--border);
  background: none;
  color: var(--fg);
  padding: 12px 28px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: lowercase;
  transition: background var(--transition), color var(--transition);
}

.back-to-top:hover {
  background: var(--fg);
  color: var(--bg);
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--overlay-bg);
  padding: 4vw;
}

.lightbox.open { display: flex; }

.lightbox-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 70vw;
  max-height: 88vh;
}

.lightbox img {
  max-width: 70vw;
  max-height: 78vh;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  display: block;
}

.lightbox-caption {
  margin: 16px 0 0;
  font-family: 'SFMono-Regular', ui-monospace, Consolas, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 28px;
  right: 4vw;
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  box-shadow: 0 6px 24px rgba(0,0,0,0.18);
  font-size: 2.1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.9;
  transition: opacity var(--transition), background var(--transition), color var(--transition), transform 0.25s ease;
}

.lightbox-close:hover {
  opacity: 1;
  background: var(--fg);
  color: var(--bg);
  transform: scale(1.06);
}

/* Pfeile: reine Icons ohne Kreis/Hintergrund, mit deutlichem Abstand zum Foto */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 64px;
  height: 64px;
  border: none;
  background: none;
  color: var(--fg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity var(--transition), transform 0.25s ease;
}

.lightbox-nav:hover {
  opacity: 1;
  transform: translateY(-50%) scale(1.12);
}

.lightbox-nav svg { width: 38px; height: 38px; }

.lightbox-prev { left: 8vw; }
.lightbox-next { right: 8vw; }

.lightbox-nav.hidden { display: none; }

@media (max-width: 700px) {
  .lightbox-stage { max-width: 84vw; }
  .lightbox img { max-width: 84vw; max-height: 68vh; }
  .lightbox-close { width: 44px; height: 44px; font-size: 1.6rem; top: 18px; right: 4vw; }
  .lightbox-nav { width: 46px; height: 46px; }
  .lightbox-nav svg { width: 26px; height: 26px; }
  .lightbox-prev { left: 1.5vw; }
  .lightbox-next { right: 1.5vw; }
}

/* ---------- About ---------- */

.about-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10vw 6vw 4vw;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  gap: 48px;
  /* stretch statt center: Foto und Text bekommen dadurch exakt dieselbe Höhe —
     der Text kann so nie über oder unter das Foto hinausragen. */
  align-items: stretch;
}

/* Einstellbar im Admin unter "texte" — steuert wie breit das Foto im Verhältnis
   zum Text ist. Schmaleres Foto = mehr Platz für Text = kürzerer Textblock. */
.about-grid[data-photo-width="narrow"] { grid-template-columns: minmax(140px, 180px) 1fr; }
.about-grid[data-photo-width="medium"] { grid-template-columns: minmax(180px, 240px) 1fr; }
.about-grid[data-photo-width="wide"] { grid-template-columns: minmax(240px, 340px) 1fr; }

.about-photo {
  height: 100%;
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(100%);
}

.about-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-body {
  color: var(--fg);
}

/* Erzwingt die Website-Schriftfarbe/-art, auch wenn älterer Rich-Text-Inhalt
   noch inline Farb-/Schrift-Styles enthält (z.B. von früherem Copy-Paste). */
.about-body * {
  color: inherit !important;
  font-family: inherit !important;
}

.about-body p {
  font-size: 1.05rem;
  line-height: 1.85;
  margin: 0 0 1.2em;
}

.about-body p:last-child { margin-bottom: 0; }

.about-lead {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2rem);
  text-transform: none;
  margin: 0 0 0.5rem;
}

@media (max-width: 700px) {
  .about-grid,
  .about-grid[data-photo-width] { grid-template-columns: 1fr; gap: 28px; align-items: start; }
  .about-photo { max-width: 220px; margin: 0 auto; height: auto; }
  .about-photo img { height: auto; aspect-ratio: 3 / 4; }
}

/* ---------- Contact ---------- */

.contact-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 4vw 6vw 3vw;
}

.contact-wrap h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  text-transform: lowercase;
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  margin-bottom: 2.5rem;
}

.contact-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 34px;
  background: var(--input-bg);
}

.field { margin-bottom: 20px; }

.field label {
  display: block;
  font-size: 0.82rem;
  text-transform: lowercase;
  letter-spacing: 0.03em;
  color: var(--fg-muted);
  margin-bottom: 8px;
}

.field input[type="text"],
.field input[type="email"],
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--fg);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--fg);
}

.field-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--fg-muted);
  line-height: 1.5;
}

.field-checkbox input { margin-top: 3px; }
.field-checkbox a { text-decoration: underline; color: var(--fg); }

.required { color: var(--fg-muted); }

.submit-btn {
  width: 100%;
  padding: 13px;
  border: 1px solid var(--fg);
  background: var(--fg);
  color: var(--bg);
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  cursor: pointer;
  transition: opacity var(--transition);
  margin-top: 8px;
}

.submit-btn:hover { opacity: 0.85; }

.form-note {
  margin-top: 16px;
  font-size: 0.85rem;
  text-align: center;
}
.form-note.success { color: #3a7d44; }
.form-note.error { color: #b3453c; }

/* ---------- Legal pages ---------- */

.legal-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 8vw 6vw 12vw;
}

.legal-wrap h1 {
  font-weight: 400;
  text-transform: lowercase;
  margin-bottom: 1.5rem;
}

.legal-wrap h2 {
  font-weight: 500;
  font-size: 1rem;
  margin-top: 2.2rem;
}

.legal-wrap p { line-height: 1.8; color: var(--fg); }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 26px 5vw;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--fg-muted);
  text-transform: lowercase;
}

.footer-nav { display: flex; gap: 20px; }
.footer-nav a:hover { color: var(--fg); }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .gallery-row { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 620px) {
  .main-nav {
    position: fixed;
    top: 73px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 6vw 26px;
    gap: 18px;
    transform: translateY(-120%);
    transition: transform var(--transition);
  }
  .main-nav.open { transform: translateY(0); }
  .menu-toggle { display: flex; }
  .gallery-row { grid-template-columns: 1fr !important; }
  .contact-card { padding: 24px; }
}
