﻿  :root {
    --card-w: 260px;
    --card-h: 195px;
    --gap: 28px;
    --edge-size: 110px;
  }

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

  html { width: 100%; height: 100%; }
  body { width: 100%; height: 100%; overflow: hidden; }

  body {
    background: #f5f0e8;
    color: #2c2115;
    font-family: "Open Sans", "Segoe UI", Arial, sans-serif;
  }

  #sc {
    width: 100vw;
    height: 100vh;
    overflow: auto;
    scrollbar-width: none;
  }
  #sc::-webkit-scrollbar { display: none; }

  #tiles { display: grid; }

  .gallery {
    display: grid;
    gap: var(--gap);
  }

  .card {
    width: var(--card-w);
    height: var(--card-h);
    border-radius: 10px;
    overflow: hidden;
    cursor: grab;
    position: relative;
    background: #e2d9c8;
    user-select: none;
    transition: transform 0.22s ease, box-shadow 0.22s ease, opacity 0.2s ease;
  }
  .card:active { cursor: grabbing; }
  .card:hover {
    transform: scale(1.04);
    box-shadow: 0 10px 30px rgba(100, 70, 30, 0.3);
    z-index: 2;
  }
  .card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
  }

  .card-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    color: #f7f2ea;
    font-size: 13px;
    line-height: 1.35;
    padding: 8px 10px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
  }
  .card:hover .card-caption { opacity: 1; }

  .card.placeholder {
    cursor: default;
    background: repeating-linear-gradient(
      45deg,
      rgba(130, 100, 70, 0.1),
      rgba(130, 100, 70, 0.1) 12px,
      rgba(130, 100, 70, 0.14) 12px,
      rgba(130, 100, 70, 0.14) 24px
    );
    border: 1px dashed rgba(90, 60, 30, 0.25);
  }
  .card.placeholder:hover {
    transform: none;
    box-shadow: none;
  }

  .card.dragging {
    opacity: 0.5;
    transform: scale(0.98);
    box-shadow: 0 4px 14px rgba(60, 40, 20, 0.25);
  }
  .card.drop-target {
    outline: 2px dashed rgba(100, 70, 30, 0.7);
    outline-offset: -6px;
  }

  .card.idle-spin-x img,
  .card.idle-spin-y img {
    transform-origin: center center;
    backface-visibility: hidden;
  }
  .card.idle-spin-x img {
    animation: idle-spin-x 0.9s ease-in-out;
  }
  .card.idle-spin-y img {
    animation: idle-spin-y 0.9s ease-in-out;
  }
  @keyframes idle-spin-x {
    from { transform: rotateX(0deg); }
    to { transform: rotateX(360deg); }
  }
  @keyframes idle-spin-y {
    from { transform: rotateY(0deg); }
    to { transform: rotateY(360deg); }
  }

  .edge-zone {
    position: fixed;
    z-index: 50;
    pointer-events: none;
    transition: background 0.3s;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    -webkit-mask-image: var(--fade);
    mask-image: var(--fade);
  }
  #edge-top    { --fade: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,.75) 45%, rgba(0,0,0,.18) 100%); }
  #edge-bottom { --fade: linear-gradient(to top,    rgba(0,0,0,1) 0%, rgba(0,0,0,.75) 45%, rgba(0,0,0,.18) 100%); }
  #edge-left   { --fade: linear-gradient(to right,  rgba(0,0,0,1) 0%, rgba(0,0,0,.75) 45%, rgba(0,0,0,.18) 100%); }
  #edge-right  { --fade: linear-gradient(to left,   rgba(0,0,0,1) 0%, rgba(0,0,0,.75) 45%, rgba(0,0,0,.18) 100%); }
  #edge-top    { top: 0; left: 0; right: 0; height: var(--edge-size); background: linear-gradient(to bottom, rgba(110,80,40,.22), transparent); }
  #edge-bottom { bottom: 0; left: 0; right: 0; height: var(--edge-size); background: linear-gradient(to top, rgba(110,80,40,.22), transparent); }
  #edge-left   { top: 0; left: 0; bottom: 0; width: var(--edge-size); background: linear-gradient(to right, rgba(110,80,40,.22), transparent); }
  #edge-right  { top: 0; right: 0; bottom: 0; width: var(--edge-size); background: linear-gradient(to left, rgba(110,80,40,.22), transparent); }
  #edge-top.active    { background: linear-gradient(to bottom, rgba(110,80,40,.40), transparent); }
  #edge-bottom.active { background: linear-gradient(to top, rgba(110,80,40,.40), transparent); }
  #edge-left.active   { background: linear-gradient(to right, rgba(110,80,40,.40), transparent); }
  #edge-right.active  { background: linear-gradient(to left, rgba(110,80,40,.40), transparent); }

  #top-bar {
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    max-width: calc(100vw - 24px);
    min-height: 56px;
    z-index: 80;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 8px 14px;
    gap: 8px;
  }

  #menu-root {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-self: end;
    gap: 8px;
  }

  .home-link {
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    color: #2f251a;
    padding: 9px 12px;
    border-radius: 10px;
    transition: background 0.2s ease;
    cursor: pointer;
    letter-spacing: 0.01em;
  }

  .home-link:hover {
    background: rgba(60, 45, 30, 0.3);
  }

  #galleries-button {
    border: 0;
    border-radius: 10px;
    padding: 9px 14px;
    background: rgba(60, 45, 30, 0.22);
    color: #2f251a;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
    letter-spacing: 0.01em;
  }
  #galleries-button:hover {
    background: rgba(60, 45, 30, 0.3);
  }

  #galleries-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    min-width: 240px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.38);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 14px 40px rgba(60, 40, 20, 0.25);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
    z-index: 81;
  }
  #menu-root:hover #galleries-dropdown,
  #menu-root.open #galleries-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  #contact-root {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-self: start;
  }
  #contact-button {
    border: 0;
    border-radius: 10px;
    padding: 9px 14px;
    background: rgba(60, 45, 30, 0.22);
    color: #2f251a;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
    letter-spacing: 0.01em;
  }
  #contact-button:hover {
    background: rgba(60, 45, 30, 0.3);
  }

  #contact-card {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    min-width: 310px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.38);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 14px 40px rgba(60, 40, 20, 0.25);
    padding: 12px 14px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
    z-index: 81;
    pointer-events: auto;
  }
  #contact-root:hover #contact-card {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }
  #contact-root.open #contact-card {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }
  .contact-line {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: rgba(36, 28, 20, 0.93);
    line-height: 1.35;
    margin: 2px 0;
    text-transform: uppercase;
    white-space: nowrap;
  }
  .contact-line.strong {
    font-size: 17px;
    margin-bottom: 6px;
  }
  .gallery-option {
    width: 100%;
    text-align: left;
    border: 0;
    border-radius: 8px;
    padding: 9px 10px;
    background: transparent;
    color: #312418;
    cursor: pointer;
    font-size: 14px;
  }
  .gallery-option:hover {
    background: rgba(70, 50, 30, 0.1);
  }
  .gallery-option.active {
    background: rgba(70, 50, 30, 0.18);
    font-weight: 700;
  }

  #gallery-meta-bar {
    grid-column: 1 / -1;
    display: flex;
    gap: 1rem;
    align-items: baseline;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    flex-wrap: wrap;
  }

  .gallery-meta-desc {
    font-size: 12px;
    font-weight: 400;
    color: #2f251a;
    opacity: 0.8;
    flex: 1;
  }

  .gallery-meta-dates {
    font-size: 11px;
    font-weight: 700;
    color: #2f251a;
    opacity: 0.55;
    letter-spacing: 0.03em;
    white-space: nowrap;
  }

  #gallery-page-title {
    justify-self: center;
    text-align: center;
    max-width: 100%;
    font-size: 16px;
    font-weight: 700;
    color: rgba(55, 40, 25, 0.85);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
  }

  #status-msg {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 82;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 13px;
    background: rgba(30, 20, 12, 0.72);
    color: #fff;
    max-width: min(740px, calc(100vw - 40px));
    display: none;
  }
  #status-msg.show { display: block; }

  #watermark {
    position: fixed;
    right: 18px;
    bottom: 14px;
    width: 30vw;
    z-index: 1003;
    pointer-events: none;
    user-select: none;
    text-align: right;
    font-family: "Open Sans", "Segoe UI", Arial, sans-serif;
    font-weight: 700;
    font-size: clamp(34px, 4.8vw, 88px);
    line-height: 0.95;
    letter-spacing: -0.01em;
    color: rgba(60, 60, 60, 0.42);
    transition: color 0.18s ease;
  }

  body.overlay-open #watermark {
    color: rgba(235, 235, 235, 0.54);
  }

  #overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .93);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    cursor: zoom-out;
  }
  #overlay.open { display: flex; }

  #overlay-img {
    max-width: 92vw;
    max-height: 92vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 24px 80px rgba(0,0,0,.9);
    cursor: default;
  }

  #overlay-info {
    position: fixed;
    left: 18px;
    bottom: 18px;
    z-index: 1002;
    max-width: min(540px, calc(100vw - 36px));
    background: rgba(0, 0, 0, 0.46);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    padding: 10px 12px;
    color: rgba(245, 245, 245, 0.95);
    line-height: 1.35;
    font-size: 14px;
    cursor: default;
  }
  #overlay-info .line { display: block; margin: 2px 0; }
  #overlay-info .key { color: rgba(235, 210, 170, 0.95); }

  #overlay-close {
    position: fixed;
    top: 12px;
    right: 20px;
    color: rgba(255,255,255,.75);
    font-size: 44px;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    transition: color .15s;
    z-index: 1001;
  }
  #overlay-close:hover { color: #fff; }

  #overlay-prev, #overlay-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,.7);
    font-size: 52px;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    padding: 0 18px;
    transition: color .15s;
    z-index: 1000;
  }
  #overlay-prev { left: 0; }
  #overlay-next { right: 0; }
  #overlay-prev:hover, #overlay-next:hover { color: #fff; }

  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  /* ================================
     LANDING PAGE STYLES (Black & White)
     ================================ */
  
  body.landing-page {
    background: #ffffff;
    color: #000000;
    overflow-y: auto;
    height: auto;
  }

  #landing-container {
    width: 100vw;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    padding: 3rem 2rem 4rem;
    box-sizing: border-box;
  }

  .landing-center {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    width: 100%;
    max-width: 960px;
    padding: 0;
  }

  .landing-hero {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    width: 100%;
  }

  #gallery-logo {
    width: clamp(160px, 22vw, 280px);
    flex-shrink: 0;
  }

  .landing-hero-text {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
  }

  .hero-title {
    font-family: "Open Sans", "Segoe UI", Arial, sans-serif;
    font-size: clamp(52px, 9vw, 120px);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.01em;
    color: #000;
    margin: 0;
  }

  .hero-address {
    font-family: "Open Sans", "Segoe UI", Arial, sans-serif;
    font-size: clamp(16px, 2.2vw, 28px);
    font-weight: 700;
    line-height: 1.45;
    color: #000;
    text-decoration: none;
  }

  .hero-address:hover {
    text-decoration: underline;
  }

  .landing-about {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    padding: 2rem 0;
    border-top: 1px solid #cccccc;
  }

  .landing-about p {
    font-size: clamp(14px, 1.4vw, 17px);
    font-weight: 400;
    line-height: 1.7;
    color: #222;
    margin: 0;
    text-align: left;
  }

  .landing-footer {
    margin-top: 1rem;
    padding-top: 2rem;
    border-top: 1px solid #cccccc;
    width: 100%;
  }

  .footer-fb-link {
    font-size: 14px;
    font-weight: 700;
    color: #1877f2;
    text-decoration: none;
    letter-spacing: 0.01em;
  }

  .footer-fb-link:hover {
    text-decoration: underline;
  }

  /* Gallery cards grid */
  .gallery-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    width: 100%;
  }

  .gallery-card {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 1.4rem 1.8rem;
    background: #fdf9f4;
    border: 2px solid #666;
    border-radius: 4px;
    text-decoration: none;
    color: #000;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.10);
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  }

  .gallery-card:hover {
    background: #000;
    color: #fff;
  }

  .gallery-card-title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .gallery-card-desc {
    font-size: 13px;
    font-weight: 300;
    line-height: 1.5;
  }

  .gallery-card-dates {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    opacity: 0.55;
    margin-top: 0.2rem;
  }

  #gallery-logo {
    width: 350px;
    max-width: calc(100vw - 48px);
  }

  /* Landing page watermark styling */
  body.landing-page #watermark {
    color: rgba(0, 0, 0, 0.08);
  }

  /* Landing page edge zones (no blur, no background) */
  body.landing-page .edge-zone {
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  @media (max-width: 1000px) {
    .gallery-cards {
      grid-template-columns: repeat(2, 1fr);
    }

    #top-bar {
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
      background: rgba(255, 255, 255, 0.92);
    }
  }

  @media (max-width: 800px) {
    .gallery-cards {
      grid-template-columns: 1fr;
    }

    .landing-hero {
      flex-direction: column;
      align-items: flex-start;
      gap: 1rem;
    }

    #gallery-logo {
      width: clamp(120px, 40vw, 200px);
    }

    .hero-title {
      font-size: clamp(40px, 12vw, 72px);
    }
  }


