/* ==========================================================================
   Contact (contact.html) and Gallery (gallery.html)
   Builds on home.css (--hp-* tokens), service.css (.sv glass) and, for the gallery,
   projects.css (filters + full-screen viewer). Dark default, light via data-theme.
   ========================================================================== */

.ct-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ══ CONTACT ══════════════════════════════════════════════════════ */
.ct-hero { min-height: clamp(500px, 70vh, 660px); }
.ct-hero .sv-hero__inner { padding-bottom: clamp(100px, 9vw, 128px); }

.ct-status { padding: 26px 26px 22px; animation: sv-rise 1s var(--hp-ease) .45s both; }
.ct-status__now { display: flex; align-items: center; gap: 10px; margin: 14px 0 16px; color: #fff; font-family: var(--hp-serif); font-size: 24px; line-height: 1.2; }
.ct-status__now i { width: 10px; height: 10px; flex: none; border-radius: 50%; background: #E8C97A; box-shadow: 0 0 0 4px rgba(232, 201, 122, .2); }
.ct-status__now.is-open i { background: #4FD18B; box-shadow: 0 0 0 4px rgba(79, 209, 139, .2), 0 0 12px rgba(79, 209, 139, .9); animation: pj-pulse 2s ease-in-out infinite; }
.ct-status__now.is-closed i { background: rgba(255, 255, 255, .45); box-shadow: none; }
.ct-status__hours { margin: 0; padding: 0; list-style: none; }
.ct-status__hours li { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-top: 1px solid rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .66); font-size: 13.5px; }
.ct-status__hours strong { color: #fff; font-weight: 500; }
.ct-status__reply { display: flex; align-items: center; gap: 10px; margin: 14px 0 0; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .12); color: #E8C97A; font-size: 13px; letter-spacing: .04em; }
.ct-status__reply svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }

/* direct lines — lifted over the hero edge */
.ct-lines-wrap { padding-top: 0; padding-bottom: clamp(44px, 5vw, 70px); }
.ct-lines { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: -54px; }
.ct-line { display: flex; flex-direction: column; padding: 26px 24px 22px; transition: transform .45s var(--hp-ease); }
.lux-home .ct-line.visible:hover { transform: translateY(-5px); }
.ct-line small { margin-top: 18px; color: var(--hp-muted); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; }
.lux-home .ct-line__value { display: block; margin: 6px 0 18px; color: var(--hp-heading); font-family: var(--hp-serif); font-size: clamp(21px, 1.9vw, 26px); font-weight: 600; line-height: 1.3; text-decoration: none; overflow-wrap: anywhere; }
a.ct-line__value:hover { color: var(--hp-gold); }
.ct-line__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--hp-line); }
.ct-line__actions a,
.ct-line__actions button {
  padding: 7px 12px;
  border: 1px solid var(--hp-line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--hp-text);
  font-family: var(--hp-sans);
  font-size: 12px;
  letter-spacing: .04em;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .25s ease, color .25s ease, background .25s ease;
}
.ct-line__actions a:hover,
.ct-line__actions button:hover { border-color: var(--hp-gold); color: var(--hp-gold); }
.ct-line__actions .is-done { border-color: transparent; background: linear-gradient(180deg, #E8C97A, #B8902F); color: #0D0D0B; }
.ct-copied { min-height: 0; margin: 0; }

/* form */
.ct-form-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(36px, 6vw, 90px); align-items: start; }
.ct-form-intro { position: sticky; top: calc(var(--nav-h, 62px) + 40px); }
.ct-form-intro .hp-lead { margin-top: 22px; }
.ct-next { display: grid; gap: 18px; margin: 34px 0 0; padding: 0; list-style: none; }
.ct-next li { display: flex; align-items: flex-start; gap: 16px; }
.ct-next li > span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #F8E7B4, #C9A84C 52%, #7E6224 100%);
  box-shadow: inset 0 2px 2px rgba(255, 255, 255, .6), 0 10px 22px -10px rgba(201, 168, 76, .9);
  color: #1A1408;
  font-family: var(--hp-serif);
  font-size: 17px;
  font-weight: 600;
}
.ct-next strong { display: block; color: var(--hp-heading); font-size: 15.5px; font-weight: 500; }
.ct-next small { display: block; margin-top: 3px; color: var(--hp-muted); font-size: 13.5px; line-height: 1.5; }

.ct-form { padding: clamp(24px, 3.2vw, 40px); }
.ct-topics { margin: 0 0 22px; padding: 0; border: 0; min-width: 0; }
.ct-topics legend { margin-bottom: 12px; padding: 0; color: var(--hp-muted); font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; }
.ct-topics__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ct-topics label { position: relative; cursor: pointer; }
.ct-topics input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ct-topics label > span {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid var(--hp-line-strong);
  background: transparent;
  color: var(--hp-text);
  font-size: 13.5px;
  line-height: 1.25;
  transition: border-color .25s ease, background .25s ease, color .25s ease, transform .25s var(--hp-ease);
}
.ct-topics svg { width: 19px; height: 19px; flex: none; fill: none; stroke: var(--hp-gold); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: stroke .25s ease; }
.ct-topics label:hover > span { border-color: var(--hp-gold-line); transform: translateY(-2px); }
.ct-topics input:focus-visible + span { box-shadow: 0 0 0 3px rgba(232, 201, 122, .4); }
.ct-topics input:checked + span { border-color: transparent; background: linear-gradient(180deg, #E8C97A, #B8902F); color: #0D0D0B; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 12px 24px -14px rgba(201, 168, 76, .9); }
.ct-topics input:checked + span svg { stroke: #0D0D0B; }
.ct-topics.is-invalid label > span { border-color: rgba(214, 75, 90, .7); }

.ct-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.ct-field { position: relative; margin-bottom: 14px; }
.ct-field input,
.ct-field textarea {
  display: block;
  width: 100%;
  padding: 24px 16px 8px;
  border: 1px solid var(--hp-line-strong);
  border-radius: 0;
  background: transparent;
  color: var(--hp-heading);
  font-family: var(--hp-sans);
  font-size: 15.5px;
  outline: none;
  transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}
.ct-field input { height: 60px; }
.ct-field textarea { min-height: 150px; padding-top: 28px; resize: vertical; line-height: 1.6; }
.ct-field label {
  position: absolute;
  top: 30px;
  left: 16px;
  color: var(--hp-muted);
  font-size: 15px;
  pointer-events: none;
  transform: translateY(-50%);
  transform-origin: left center;
  transition: top .25s var(--hp-ease), transform .25s var(--hp-ease), color .25s ease;
}
.ct-field input:focus,
.ct-field textarea:focus { border-color: var(--hp-gold); background: var(--hp-gold-soft); box-shadow: 0 0 0 4px rgba(201, 168, 76, .14); }
.ct-field input:focus + label,
.ct-field input:not(:placeholder-shown) + label,
.ct-field textarea:focus + label,
.ct-field textarea:not(:placeholder-shown) + label { top: 14px; color: var(--hp-gold); transform: translateY(-50%) scale(.76); letter-spacing: .05em; }
.ct-field.is-invalid input,
.ct-field.is-invalid textarea { border-color: var(--hp-red); box-shadow: 0 0 0 4px var(--hp-red-soft); }
.ct-count { position: absolute; right: 12px; bottom: 10px; color: var(--hp-muted); font-size: 11px; letter-spacing: .06em; pointer-events: none; }
.ct-hint { margin: -4px 0 18px; color: var(--hp-muted); font-size: 12.5px; line-height: 1.55; }
.ct-error { margin: 0 0 14px; padding: 12px 14px; border-left: 3px solid var(--hp-red); background: var(--hp-red-soft); color: var(--hp-heading); font-size: 13.5px; }
.ct-error[hidden] { display: none; }
.ct-submit { width: 100%; min-height: 58px; }
.ct-submit__busy { display: none; }
.ct-submit.is-busy { pointer-events: none; opacity: .85; }
.ct-submit.is-busy .ct-submit__text { display: none; }
.ct-submit.is-busy .ct-submit__busy { display: inline; }
.ct-submit.is-busy svg { animation: ct-nudge .8s ease-in-out infinite; }
@keyframes ct-nudge { 50% { transform: translateX(6px); } }
.ct-privacy { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 14px 0 0; color: var(--hp-muted); font-size: 12.5px; }
.ct-privacy svg { width: 15px; height: 15px; fill: none; stroke: var(--hp-gold); stroke-width: 1.6; }

/* map */
.ct-map { position: relative; height: clamp(360px, 46vw, 520px); overflow: hidden; border: 1px solid var(--sv-glass-line); box-shadow: var(--hp-shadow); }
.ct-map iframe { display: block; width: 100%; height: 100%; border: 0; filter: grayscale(.35) contrast(1.05); transition: filter .5s ease; }
html:not([data-theme="light"]) .ct-map iframe { filter: invert(.9) hue-rotate(180deg) grayscale(.4) contrast(.95); }
.ct-map:hover iframe { filter: none; }
.ct-map__card { position: absolute; left: 24px; bottom: 24px; max-width: 320px; padding: 22px 22px 20px; }
.lux-home .ct-map__card strong { display: block; margin: 6px 0 6px; font-family: var(--hp-serif); font-size: 24px; font-weight: 600; color: var(--hp-heading); }
.ct-map__card p { margin: 0 0 10px; color: var(--hp-text); font-size: 14px; line-height: 1.6; }
.ct-map__card a { color: var(--hp-gold); text-decoration: none; font-size: 14px; }

/* ══ GALLERY ══════════════════════════════════════════════════════ */
.gl-hero { min-height: clamp(520px, 72vh, 680px); }
.gl-hero__mosaic {
  position: absolute;
  inset: 0;
  z-index: -2;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 4px;
}
.gl-hero__mosaic span { position: relative; overflow: hidden; background: #111; }
.gl-hero__mosaic span:first-child { grid-row: span 2; }
.gl-hero__mosaic span:only-child { grid-column: 1 / -1; }
.gl-hero__mosaic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); animation: sv-kenburns 18s ease-out forwards; animation-delay: calc(var(--i, 0) * .25s); }
.gl-hero__veil {
  background:
    linear-gradient(90deg, rgba(10, 10, 9, .94) 0%, rgba(10, 10, 9, .8) 42%, rgba(10, 10, 9, .45) 100%),
    linear-gradient(0deg, rgba(10, 10, 9, .75), transparent 45%);
}

.gl-filters { flex-wrap: nowrap; }
.gl-select { display: flex; align-items: center; gap: 10px; flex: none; padding-left: 14px; border-left: 1px solid var(--hp-line); }
.gl-select select {
  height: 38px;
  max-width: 240px;
  min-width: 0;
  padding: 0 36px 0 14px;
  border: 1px solid var(--hp-line-strong);
  border-radius: 999px;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%23C9A84C' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center / 16px;
  color: var(--hp-text);
  font-family: var(--hp-sans);
  font-size: 12.5px;
  cursor: pointer;
  -webkit-appearance: none;
          appearance: none;
}
.gl-select select:focus { outline: none; border-color: var(--hp-gold); }
.gl-select option { background: var(--hp-surface); color: var(--hp-text); }
.gl-clear { color: var(--hp-gold); }

/* masonry */
.gl-masonry { column-count: 3; column-gap: 16px; }
.gl-item {
  position: relative;
  display: block;
  margin: 0 0 16px;
  overflow: hidden;
  break-inside: avoid;
  background: var(--hp-surface-2);
  box-shadow: var(--hp-shadow-sm);
  isolation: isolate;
}
.gl-item.is-later { display: none; }
.gl-item img { display: block; width: 100%; height: auto; min-height: 160px; object-fit: cover; transition: transform 1.1s var(--hp-ease), filter .5s ease; }
.gl-item:hover img { transform: scale(1.06); filter: brightness(1.05); }
.gl-item__shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(0deg, rgba(10, 10, 9, .85), rgba(10, 10, 9, .1) 55%, transparent); opacity: 0; transition: opacity .45s ease; }
.gl-item::after { content: ''; position: absolute; inset: 0; z-index: 2; border: 1px solid transparent; transition: inset .45s var(--hp-ease), border-color .45s ease; pointer-events: none; }
.gl-item:hover::after { inset: 10px; border-color: rgba(232, 201, 122, .6); }
.gl-item:hover .gl-item__shade,
.gl-item:focus-visible .gl-item__shade { opacity: 1; }
.gl-item__zoom {
  position: absolute;
  z-index: 3;
  top: 18px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(180deg, #E8C97A, #B8902F);
  opacity: 0;
  transform: scale(.7);
  transition: opacity .35s ease, transform .45s var(--hp-ease);
}
.gl-item__zoom svg { width: 17px; height: 17px; fill: none; stroke: #0D0D0B; stroke-width: 1.7; stroke-linecap: round; }
.gl-item:hover .gl-item__zoom { opacity: 1; transform: none; }
.gl-item__cap { position: absolute; z-index: 3; left: 20px; right: 20px; bottom: 18px; color: #fff; opacity: 0; transform: translateY(12px); transition: opacity .4s ease, transform .5s var(--hp-ease); }
.gl-item:hover .gl-item__cap,
.gl-item:focus-visible .gl-item__cap { opacity: 1; transform: none; }
.gl-item__cap small { display: block; color: #E8C97A; font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; }
.gl-item__cap strong { display: block; margin-top: 4px; font-family: var(--hp-serif); font-size: 21px; font-weight: 600; line-height: 1.2; }
.gl-item__cap em { display: block; margin-top: 4px; color: rgba(255, 255, 255, .75); font-size: 13px; font-style: normal; }
.gl-more { margin-top: 30px; text-align: center; }
.gl-more .sv-btn:hover svg { transform: translateY(3px); }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 991px) {
  .ct-lines { grid-template-columns: minmax(0, 1fr); margin-top: -40px; }
  .ct-hero .sv-hero__inner { padding-bottom: 80px; }
  .ct-form-layout { grid-template-columns: minmax(0, 1fr); }
  .ct-form-intro { position: static; }
  .ct-status { max-width: 460px; }
  .gl-masonry { column-count: 2; }
  .gl-filters { flex-direction: column; align-items: stretch; gap: 10px; }
  .gl-select { padding: 10px 0 0; border-left: 0; border-top: 1px solid var(--hp-line); }
  .gl-select { min-width: 0; }
  .gl-select select { flex: 1; width: 100%; min-width: 0; max-width: none; text-overflow: ellipsis; }
}

@media (max-width: 640px) {
  .ct-topics__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ct-row { grid-template-columns: minmax(0, 1fr); }
  .ct-map__card { left: 12px; right: 12px; bottom: 12px; max-width: none; padding: 16px; }
  .gl-masonry { column-gap: 10px; }
  .gl-item { margin-bottom: 10px; }
  .gl-item__cap { left: 12px; right: 12px; bottom: 10px; opacity: 1; transform: none; }
  .gl-item__cap strong { font-size: 15px; }
  .gl-item__cap em, .gl-item__cap small { display: none; }
  .gl-item__shade { opacity: .9; background: linear-gradient(0deg, rgba(10, 10, 9, .8), transparent 50%); }
  .gl-hero__mosaic { grid-template-columns: 1fr 1fr; }
  .gl-hero__mosaic span:first-child { grid-column: span 2; grid-row: auto; }
  .gl-hero__mosaic { grid-template-rows: 1.4fr 1fr; }
  .gl-hero__mosaic span:nth-child(n+4) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .gl-hero__mosaic img { animation: none; transform: none; }
  .ct-status__now.is-open i { animation: none; }
}
