/* ============================================================
   David Brauner — Photographer portfolio
   ============================================================ */

:root {
  --bg: #faf7fd;
  --bg-soft: #f2ebf9;
  --ink: #241a38;
  --ink-soft: #635a78;
  --line: #e6dcf2;
  --accent: #e05fa8;
  --accent-dark: #c9438f;
  --accent-text: #b3367c;   /* darker pink for small text, readable on light backgrounds */
  --purple: #6d4aad;
  --purple-deep: #43307a;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 20px 60px rgba(61, 38, 92, 0.12);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  overflow-x: clip;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

.container {
  width: min(1160px, 92%);
  margin-inline: auto;
}

h1, h2 { font-family: var(--font-display); font-weight: 500; line-height: 1.12; }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); }

.logo-dot { color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  z-index: 0;
  display: inline-block;
  padding: 0.85rem 1.9rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease,
    background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(-1px) scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--purple-deep), var(--purple));
  color: var(--white);
}
/* pink gradient layer that fades in on hover */
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--purple), var(--accent-text));
  opacity: 0;
  transition: opacity 0.35s ease;
}
.btn-primary:hover::before { opacity: 1; }
.btn-primary:hover {
  box-shadow: 0 14px 30px color-mix(in srgb, var(--accent) 38%, transparent);
}

.btn-ghost {
  border-color: var(--line);
  color: var(--purple-deep);
  background: transparent;
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  box-shadow: 0 12px 26px color-mix(in srgb, var(--purple) 20%, transparent);
}

.btn-block { width: 100%; border: none; font-family: var(--font-body); }

.btn:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.05rem;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.logo img { height: 30px; width: auto; display: block; }
@media (max-width: 640px) { .logo img { height: 24px; } }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.lang-switch { color: var(--purple); font-weight: 600; }
.nav-links a.lang-switch:hover { color: var(--accent-dark); }

.nav-cta {
  padding: 0.55rem 1.25rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--purple-deep), var(--accent-text));
  color: var(--white) !important;
  transition: filter 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.nav-cta:hover {
  filter: brightness(1.12);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 35%, transparent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 26px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.is-open span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle.is-open span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Banner ---------- */
.banner { padding-top: 1.6rem; }
.banner img {
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius) * 1.5);
  box-shadow: var(--shadow);
}

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(3rem, 7vh, 5rem) clamp(3rem, 8vh, 5.5rem);
  text-align: center;
}

.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-text);
  margin-bottom: 1.4rem;
}

.hero-title {
  font-size: clamp(2.6rem, 6.4vw, 4.8rem);
  letter-spacing: -0.015em;
  margin-bottom: 1.4rem;
}

.hero-sub {
  max-width: 34rem;
  margin-inline: auto;
  color: var(--ink-soft);
  font-size: 1.06rem;
  margin-bottom: 2.4rem;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.hero-scroll {
  margin-top: clamp(3rem, 8vh, 5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink-soft);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.hero-scroll-line {
  width: 1px;
  height: 52px;
  background: linear-gradient(var(--ink-soft), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { transform: scaleY(1); opacity: 0.9; }
  50% { transform: scaleY(0.55); opacity: 0.4; }
}

/* ---------- Work / Gallery ---------- */
.work { position: relative; padding-block: 4.5rem 5rem; }

/* deep plum band behind the gallery; fades in as you scroll to it */
.work::before {
  content: "";
  position: absolute;
  inset: 0 calc(50% - 50vw);
  z-index: -1;
  background: linear-gradient(160deg, #4b3478 0%, #5a3f8f 55%, #6d4aad 100%);
  /* darker version: linear-gradient(160deg, #241a38 0%, #2f2150 55%, #43307a 100%) */
  opacity: 0;
  transition: opacity 0.9s ease;
}
.work.is-lit::before { opacity: 1; }
.work .section-head h2,
.work .filter-btn { transition: color 0.6s ease, background 0.6s ease, border-color 0.6s ease; }
.work.is-lit .section-head h2 { color: var(--white); }
.work.is-lit .filter-btn { color: #e9def8; border-color: rgba(255, 255, 255, 0.28); }
.work.is-lit .filter-btn:hover { color: var(--white); border-color: var(--accent); }
.work.is-lit .filter-btn.is-active { background: var(--white); border-color: var(--white); color: var(--purple-deep); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.2rem;
}

.filters { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.filter-btn {
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
.filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 22%, transparent);
}
.filter-btn.is-active {
  background: var(--purple-deep);
  border-color: var(--purple-deep);
  color: var(--white);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 240px;
  grid-auto-flow: dense;
  gap: 1.1rem;
}

.photo {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.photo-tall { grid-row: span 2; }

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.photo:hover img { transform: scale(1.05); }

/* Per-photo framing so faces aren't cropped in the grid */
.photo img.focus-top { object-position: 50% 15%; }
.photo img.focus-top-edge { object-position: 50% 0%; }
/* Show the whole photo inside the tile, on a matching dark background */
.photo img.fit-whole { object-fit: contain; background: #141428; }

.photo figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2.4rem 1.2rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  background: linear-gradient(transparent, rgba(36, 22, 58, 0.78));
  color: var(--white);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.photo:hover figcaption { opacity: 1; transform: translateY(0); }

.photo-tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  opacity: 0.75;
}
.photo-name { font-weight: 600; font-size: 1rem; }

.photo.is-hidden { display: none; }

/* visible focus ring for keyboard users */
.photo:focus-visible,
.filter-btn:focus-visible,
.lightbox button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- About ---------- */
.about {
  background: var(--bg-soft);
  padding-block: 5rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.about-photo {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 5;
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% center; }

.about-text h2 { margin-bottom: 1.2rem; }
.about-text p { color: var(--ink-soft); margin-bottom: 1rem; max-width: 48ch; }
.about-text em { font-style: italic; color: var(--ink); }

.about-stats {
  display: flex;
  gap: clamp(1.5rem, 4vw, 3rem);
  list-style: none;
  margin-top: 2rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--line);
}

.about-stats li { display: flex; flex-direction: column; }
.about-stats strong {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--accent-dark);
}
.about-stats span { font-size: 0.85rem; color: var(--ink-soft); }

/* ---------- Plans ---------- */
.plans { padding-block: 5rem 1rem; }

.plans-head { text-align: center; margin-bottom: 2.6rem; }
.plans-head h2 { margin-bottom: 0.6rem; }
.plans-head p { color: var(--ink-soft); }

.plans-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 380px));
  justify-content: center;
  gap: 1.6rem;
  align-items: stretch;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) * 1.5);
  padding: 2.2rem 2rem;
  box-shadow: var(--shadow);
}

.plan-featured {
  border: 2px solid transparent;
  background:
    linear-gradient(var(--white), var(--white)) padding-box,
    linear-gradient(135deg, var(--purple), var(--accent)) border-box;
}

.plan-badge {
  position: absolute;
  top: -0.85rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.3rem 0.95rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--purple-deep), var(--accent-text));
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.plan-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.5rem;
}

.plan-price {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 600;
  color: var(--purple-deep);
  line-height: 1.1;
  margin: 0.4rem 0 1.4rem;
}
.plan-currency { font-size: 1.6rem; margin-right: 0.15rem; vertical-align: 0.6em; }

.plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: 2rem;
  flex-grow: 1;
  color: var(--ink-soft);
}
.plan-features li { padding-inline-start: 1.6rem; position: relative; }
.plan-features li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.45em;
  width: 0.75rem;
  height: 0.45rem;
  border-left: 2px solid var(--accent-text);
  border-bottom: 2px solid var(--accent-text);
  transform: rotate(-45deg);
}

.plan .btn-block { text-align: center; }
.plan .btn-ghost.btn-block { border: 1.5px solid var(--line); }

.plans-note {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin-top: 2rem;
}

/* ---------- Contact ---------- */
.contact { padding-block: 5rem; }

.contact-card {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 5vw, 4rem);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) * 1.5);
  padding: clamp(1.8rem, 4vw, 3.5rem);
  box-shadow: var(--shadow);
}

.contact-intro h2 { margin-bottom: 1rem; }
.contact-intro p { color: var(--ink-soft); margin-bottom: 1.8rem; }

.contact-meta {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.contact-meta a { color: var(--ink); text-decoration: none; font-weight: 500; }
.contact-meta a:hover { color: var(--accent-dark); }

.contact-form { display: flex; flex-direction: column; gap: 1.1rem; }

/* Honeypot anti-spam field — kept out of sight and out of tab order */
.honeypot {
  position: absolute !important;
  left: 0 !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  opacity: 0;
  pointer-events: none;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

.field { display: flex; flex-direction: column; gap: 0.35rem; }

.field label {
  font-size: 0.85rem;
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

/* Required-field star and "(optional)" note */
.field .req { color: var(--accent-text); margin-inline-start: 0.1rem; }
.field .optional { font-weight: 400; color: var(--ink-soft); font-size: 0.8rem; }

/* Missing or wrong: red. Filled in correctly: green. */
.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: #d6336c; background-color: #fdecf1; }
.field.is-valid input,
.field.is-valid select,
.field.is-valid textarea { border-color: #2f9e5b; background-color: #eaf7ef; }

/* brief highlight when a plan is chosen from the Plans section */
.field.is-picked select { animation: planPicked 1.6s ease; }
@keyframes planPicked {
  0%, 40% { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); }
  100% { border-color: var(--line); box-shadow: none; }
}

.field-error {
  color: #d6336c;
  font-size: 0.78rem;
  min-height: 1em;
}

.form-status {
  text-align: center;
  font-size: 0.92rem;
  font-weight: 500;
  min-height: 1.4em;
}
.form-status.is-success { color: #1e7d43; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 1.6rem;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.socials { display: flex; gap: 1.4rem; list-style: none; }
.socials a { color: var(--ink-soft); text-decoration: none; transition: color 0.2s ease; }
.socials a:hover { color: var(--accent-dark); }

/* ---------- Floating WhatsApp button ---------- */
.wa-float {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  z-index: 60;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #25d366;
  color: #fff;
  box-shadow: 0 10px 28px rgba(20, 90, 50, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.wa-float:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 14px 32px rgba(20, 90, 50, 0.45); }
.wa-float:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@media (max-width: 640px) { .wa-float { right: 1rem; bottom: 1rem; width: 54px; height: 54px; } }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
  background: rgba(26, 16, 44, 0.93);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
/* become visible immediately on open so keyboard focus can move inside */
.lightbox.is-open { opacity: 1; visibility: visible; transition: opacity 0.3s ease, visibility 0s; }

.lightbox-figure {
  max-width: min(1000px, 86vw);
  text-align: center;
}
.lightbox-figure img {
  max-height: 78vh;
  width: auto;
  max-width: 100%;
  margin-inline: auto;
  border-radius: var(--radius);
}
.lightbox-figure figcaption {
  color: rgba(255, 255, 255, 0.8);
  margin-top: 0.9rem;
  font-size: 0.95rem;
}

.lightbox-close,
.lightbox-nav {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--white);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease;
  flex-shrink: 0;
}
.lightbox-close:hover,
.lightbox-nav:hover { background: rgba(255, 255, 255, 0.22); }

.lightbox-close {
  position: absolute;
  top: 1.4rem;
  right: 1.6rem;
  width: 44px;
  height: 44px;
  font-size: 1.5rem;
  line-height: 1;
}

.lightbox-nav {
  width: 48px;
  height: 48px;
  font-size: 1.2rem;
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .work::before, .work .section-head h2, .work .filter-btn { transition: none; }
  .hero-scroll-line { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 220px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 420px; }
  .contact-card { grid-template-columns: 1fr; }
  .plans-grid { grid-template-columns: minmax(0, 440px); }
}

@media (max-width: 640px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    /* hidden links can't be reached with Tab while the menu is closed */
    visibility: hidden;
    transition: max-height 0.3s ease, visibility 0s linear 0.3s;
  }
  .nav-links.is-open {
    max-height: 340px;
    visibility: visible;
    transition: max-height 0.3s ease, visibility 0s;
  }
  .nav-links li { width: 100%; text-align: center; }
  .nav-links a { display: block; padding: 1rem; }
  .nav-cta { border-radius: 0; }

  .gallery { grid-template-columns: 1fr; grid-auto-rows: 300px; }
  .photo-tall { grid-row: span 1; }
  /* Tall photos shown as short tiles on phones: keep heads in frame */
  .gallery img.focus-phone-top { object-position: 50% 4%; }
  .form-row { grid-template-columns: 1fr; }
  .lightbox { padding: 1rem 1rem 5rem; }
  .lightbox-figure { max-width: 100%; }
  .lightbox-figure img { max-height: 70vh; }
  /* arrows sit side by side at the bottom on phones; swipe also works */
  .lightbox-nav {
    position: absolute;
    bottom: 1.2rem;
    width: 44px;
    height: 44px;
  }
  .lightbox-prev { left: calc(50% - 54px); }
  .lightbox-next { right: calc(50% - 54px); }
}

/* ---------- Hebrew version (right-to-left) ---------- */
html[lang="he"] {
  --font-display: "Frank Ruhl Libre", Georgia, serif;
  --font-body: "Heebo", "Inter", Arial, sans-serif;
}
/* wide letter spacing suits English capitals, not Hebrew letters */
[dir="rtl"] .hero-eyebrow,
[dir="rtl"] .hero-scroll,
[dir="rtl"] .photo-tag,
[dir="rtl"] .plan-badge { letter-spacing: 0.04em; }
[dir="rtl"] .hero-title { letter-spacing: 0; }
[dir="rtl"] .lightbox-close { right: auto; left: 1.6rem; }
@media (max-width: 640px) {
  [dir="rtl"] .lightbox-prev { left: auto; right: calc(50% - 54px); }
  [dir="rtl"] .lightbox-next { right: auto; left: calc(50% - 54px); }
}
