:root {
  --cream: #fdf8f6;
  --blush: #f5e6e8;
  --rose: #c9a9a6;
  --gold: #b8956e;
  --gold-soft: #d4bc94;
  --ink: #2c2422;
  --ink-muted: #5c504c;
  --card: rgba(255, 255, 255, 0.92);
  --shadow: 0 12px 40px rgba(44, 36, 34, 0.08);
  --radius: 18px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Outfit", system-ui, sans-serif;
  font-weight: 300;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.5;
}

body.lightbox-open {
  overflow: hidden;
  touch-action: none;
}

.site-switch {
  position: fixed;
  top: max(12px, env(safe-area-inset-top, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
  z-index: 50;
  display: flex;
  gap: 5px;
  padding: 5px;
  border: 1px solid rgba(184, 149, 110, 0.22);
  border-radius: 999px;
  background: rgba(255, 253, 250, 0.86);
  box-shadow: 0 10px 28px rgba(44, 36, 34, 0.12);
  backdrop-filter: blur(14px);
}

.site-switch__link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 500;
}

.site-switch__link--active {
  color: #fff;
  background: #6f4935;
}

@media (max-width: 520px) {
  .site-switch { left: 50%; right: auto; transform: translateX(-50%); }
  .wrap { padding-top: 5.4rem; }
}

/* ——— Background mosaic (mozaiğin ÜSTÜNDE hafif perde; içerik en üstte) ——— */
.bg-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  pointer-events: none;
}

.bg-track {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  min-width: 100%;
  min-height: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  animation: mosaicPan 110s ease-in-out infinite alternate;
  will-change: transform;
}

.bg-track--alt {
  animation-duration: 140s;
  animation-direction: alternate-reverse;
}

@keyframes mosaicPan {
  0% {
    transform: translate(0, 0) scale(1.01);
  }
  100% {
    transform: translate(-1.2%, 0.8%) scale(1.04);
  }
}

.bg-grid {
  display: grid;
  box-sizing: border-box;
  width: 100%;
  min-width: 100%;
  min-height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(6px, 1.5vw, 12px);
  gap: clamp(6px, 1.5vw, 10px);
  grid-template-columns: repeat(auto-fill, minmax(min(76px, 22vw), 1fr));
  grid-auto-rows: minmax(min(76px, 22vw), 104px);
  align-content: start;
  justify-content: stretch;
}

.bg-veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    165deg,
    rgba(253, 248, 246, 0.5) 0%,
    rgba(245, 230, 232, 0.42) 48%,
    rgba(253, 248, 246, 0.52) 100%
  );
}

.bg-tile {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  border-radius: 10px;
  opacity: 0;
  filter: brightness(1) contrast(1.05) saturate(1.1);
  will-change: opacity;

  --fade-delay: 0s;

  animation: bgTileFade 1.1s ease forwards;
  animation-delay: var(--fade-delay);
}

video.bg-tile {
  object-fit: cover;
  object-position: center center;
}

@keyframes bgTileFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 0.72;
  }
}

/* ——— Layout ——— */
.wrap {
  position: relative;
  z-index: 1;
  max-width: 32rem;
  margin: 0 auto;
  padding-top: clamp(2rem, 5vw, 3.5rem);
  padding-left: max(clamp(1rem, 4vw, 2rem), env(safe-area-inset-left, 0px));
  padding-right: max(clamp(1rem, 4vw, 2rem), env(safe-area-inset-right, 0px));
  padding-bottom: max(1.75rem, env(safe-area-inset-bottom, 0px));
  text-align: center;
}

.wrap--wide {
  max-width: 56rem;
}

.eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}

h1 {
  margin: 0 0 1rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.1rem, 6vw, 2.85rem);
  line-height: 1.15;
  color: var(--ink);
}

.ampersand {
  font-style: italic;
  font-weight: 400;
  color: var(--rose);
}

.subtitle {
  margin: 0 auto 1.75rem;
  max-width: 28rem;
  font-size: 0.95rem;
  color: var(--ink-muted);
}

.card {
  position: relative;
  z-index: 2;
  background: var(--card);
  padding: 1.35rem 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(184, 149, 110, 0.12);
  backdrop-filter: blur(10px);
}

.card--form {
  text-align: left;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ——— Form ——— */
.file-label {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: clamp(7.5rem, 28vw, 9rem);
  padding: 1rem;
  border: 2px dashed rgba(184, 149, 110, 0.45);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  overflow: hidden;
}

.file-label:hover {
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.85);
}

.file-label--drag {
  border-color: var(--gold-soft);
  background: rgba(255, 255, 255, 0.95);
  border-style: solid;
}

.file-label__text {
  position: relative;
  z-index: 0;
  font-size: 0.9rem;
  color: var(--ink-muted);
  text-align: center;
  pointer-events: none;
}

.file-label input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
  font-size: 3rem;
}

.file-label input[type="file"]::-webkit-file-upload-button {
  display: none;
}

.file-label input[type="file"]::file-selector-button {
  display: none;
}

.form-hint {
  margin: 0.75rem 0 1rem;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.file-preview {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  max-height: 9rem;
  overflow-y: auto;
  font-size: 0.78rem;
  color: var(--ink-muted);
  text-align: left;
}

.file-preview__item {
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(184, 149, 110, 0.15);
  word-break: break-word;
}

.file-preview__item--bad {
  color: #c62828;
}

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 8px;
  margin-top: 0.85rem;
  max-height: 11rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.thumb-tile {
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 8px rgba(44, 36, 34, 0.08);
}

.thumb-tile img,
.thumb-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-tile--bad {
  outline: 2px solid #e57373;
  outline-offset: 2px;
}

.thumb-tile--add {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  min-width: 64px;
  min-height: 64px;
  margin: 0;
  padding: 0;
  border: 2px dashed rgba(184, 149, 110, 0.55);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
  font-family: inherit;
  font-size: 1.85rem;
  font-weight: 500;
  line-height: 1;
  color: var(--gold);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(184, 149, 110, 0.2);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.thumb-tile--add:hover {
  border-color: var(--gold);
  background: #fff;
  color: #9a7654;
}

.thumb-tile--add:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.field-label {
  display: block;
  margin-top: 1rem;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.optional {
  font-weight: 300;
  opacity: 0.85;
}

.note-field {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.65rem 0.75rem;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--ink);
  border: 1px solid rgba(184, 149, 110, 0.35);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  resize: vertical;
}

.note-field::placeholder {
  color: #9a8f8c;
}

.btn {
  display: inline-block;
  margin: 0;
  padding: 0.85rem 1.5rem;
  width: 100%;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, var(--gold) 0%, #9a7654 100%);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(154, 118, 84, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(184, 149, 110, 0.2);
}

.btn-primary {
  min-height: 44px;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(154, 118, 84, 0.35);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 4px 12px rgba(154, 118, 84, 0.15);
}

.btn-touch {
  min-height: 44px;
  min-width: 44px;
}

.btn-secondary {
  width: auto;
  padding: 0.55rem 1.15rem;
  font-size: 0.75rem;
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(184, 149, 110, 0.45);
  box-shadow: none;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.7);
  box-shadow: none;
}

.btn-primary.btn-send,
.btn-block {
  width: 100%;
}

.footer-link {
  margin-top: 1.75rem;
  font-size: 0.9rem;
}

.footer-link a,
.alert a {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid rgba(184, 149, 110, 0.35);
}

.footer-link a:hover,
.alert a:hover {
  color: #9a7654;
}

/* ——— Alerts ——— */
.alert {
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  text-align: left;
  animation: alertIn 0.5s ease forwards;
}

@keyframes alertIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert-success {
  background: rgba(232, 245, 233, 0.95);
  border: 1px solid rgba(129, 199, 132, 0.35);
}

.alert-error {
  background: rgba(255, 235, 238, 0.95);
  border: 1px solid rgba(239, 154, 154, 0.4);
}

/* ——— Gallery page ——— */
.top-nav {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 1.25rem;
}

.gallery-header {
  margin-bottom: 1.75rem;
}

.gallery-header h1 {
  margin-bottom: 0.35rem;
}

.gallery-header p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.gallery-toolbar {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.85rem;
  margin-top: 1.25rem;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
  pointer-events: auto;
}

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.search-label {
  display: block;
  width: 100%;
}

.gallery-search {
  width: 100%;
  min-height: 48px;
  padding: 0.65rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  border: 1px solid rgba(184, 149, 110, 0.4);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
}

.gallery-search::placeholder {
  color: #9a8f8c;
}

.filter-btn {
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.55rem 1.1rem;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(184, 149, 110, 0.4);
  background: rgba(255, 255, 255, 0.65);
  color: var(--ink-muted);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(184, 149, 110, 0.2);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.filter-btn:hover {
  border-color: var(--gold);
  color: var(--ink);
}

.filter-btn.is-active {
  background: linear-gradient(135deg, var(--gold) 0%, #9a7654 100%);
  border-color: transparent;
  color: #fff;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(128px, 42vw), 1fr));
  gap: clamp(8px, 2.5vw, 14px);
}

.gallery-grid[data-filter="photo"] .gallery-item--video {
  display: none;
}

.gallery-grid[data-filter="video"] .gallery-item--image {
  display: none;
}

button.gallery-item {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
}

.gallery-item {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(44, 36, 34, 0.08);
  opacity: 0;
  animation: galleryFade 0.85s ease forwards;
  animation-delay: 0s;
}

.gallery-item__thumb {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  overflow: hidden;
  flex-shrink: 0;
}

.gallery-item:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.gallery-item__caption {
  margin: 0;
  padding: 0.4rem 0.55rem 0.55rem;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--ink-muted);
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid rgba(184, 149, 110, 0.12);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: left;
}

.gallery-item__badge {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: rgba(26, 21, 20, 0.55);
  color: #fff;
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

@keyframes galleryFade {
  from {
    opacity: 0;
    transform: scale(0.97) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.gallery-item .media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-item video.media {
  background: #1a1514;
}

.empty-gallery {
  text-align: center;
  padding: 2rem 1.5rem;
}

.empty-gallery p {
  margin: 0 0 1.25rem;
  color: var(--ink-muted);
}

/* ——— Lightbox ——— */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  padding: clamp(0.75rem, 3vw, 2rem);
}

.lightbox[hidden] {
  display: none !important;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 14, 12, 0.86);
  backdrop-filter: blur(6px);
}

.lightbox__stage {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  max-width: min(96vw, 1100px);
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(0.5rem, env(safe-area-inset-top)) max(0.5rem, env(safe-area-inset-right))
    max(0.5rem, env(safe-area-inset-bottom)) max(0.5rem, env(safe-area-inset-left));
}

.lightbox__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  max-width: 100%;
  max-height: 88vh;
}

.lightbox__media {
  max-width: min(92vw, 1100px);
  max-height: min(72vh, 820px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.lightbox__caption {
  margin: 0;
  max-width: min(92vw, 520px);
  padding: 0.5rem 0.85rem;
  font-size: 0.9rem;
  line-height: 1.4;
  text-align: center;
  color: #f5f0ec;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 10px;
}

.lightbox__close {
  position: absolute;
  top: max(0.5rem, env(safe-area-inset-top));
  right: max(0.5rem, env(safe-area-inset-right));
  z-index: 5;
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.22);
}

.lightbox__nav {
  position: absolute;
  z-index: 5;
  top: 50%;
  margin-top: -1.75rem;
  width: 3rem;
  height: 3.5rem;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}

.lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox__nav--prev {
  left: max(0.35rem, env(safe-area-inset-left));
}

.lightbox__nav--next {
  right: max(0.35rem, env(safe-area-inset-right));
}

@media (prefers-reduced-motion: reduce) {
  .bg-track {
    animation: none;
  }

  .bg-tile {
    animation: bgTileFade 0.4s ease forwards;
  }
}

@media (max-width: 480px) {
  .bg-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(56px, 18vw), 1fr));
    grid-auto-rows: minmax(min(56px, 18vw), 88px);
  }

  h1 {
    font-size: 1.95rem;
  }

  .lightbox__nav {
    width: 2.75rem;
    height: 3.25rem;
    font-size: 1.45rem;
  }

  .lightbox__media {
    max-height: min(64vh, 720px);
  }

  .gallery-toolbar {
    align-items: stretch;
  }
}
