/* Hover guard — the `@media (hover: hover)` blocks below.
 *
 * A touch screen has no pointer to hover with, so the browser synthesises a
 * hover on the first tap. Every :hover rule then fires on that tap, the
 * browser counts it as "the page changed", and the click that would have
 * followed the link is swallowed: the button plays its animation and you have
 * to tap a second time to actually go anywhere. `hover: hover` matches only
 * devices with a real hovering pointer, so these rules are skipped entirely on
 * phones and tablets and one tap is enough. Desktop is unaffected — a
 * conditional group rule changes neither specificity nor source order.
 */

/* ============================================================
   ViDiPiXs — Editorial footer
   ============================================================ */

:root {
  --tg-gold: #FFCC01;
  --tg-bg: #0a0a0a;
  --tg-bg-soft: #070707;
  --tg-fg: #ecebe6;
  --tg-fg-soft: #cfcdc6;
  --tg-muted: #8b8a85;
  --tg-line: #1a1a1a;
  --tg-line-strong: #2a2620;
  --tg-border: #3a3830;
}

.tg-footer {
  background: var(--tg-bg-soft);
  color: var(--tg-fg);
  font-family: 'Inter', sans-serif;
  border-top: 0.5px solid var(--tg-line-strong);
  padding: clamp(70px, 9vw, 110px) clamp(20px, 5vw, 64px) 0;
}
.tg-footer * { box-sizing: border-box; }

.tg-footer .tg-serif {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.tg-footer em.tg-gold,
.tg-footer .tg-gold {
  color: var(--tg-gold);
  font-style: italic;
  font-family: 'Cormorant Garamond', serif;
}
.tg-footer .tg-eyebrow {
  font-size: 13px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--tg-gold);
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  margin-bottom: 22px;
  display: block;
}

/* ============ TOP CTA BAND ============ */
.tg-footer-cta {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: end;
  padding-bottom: 60px;
  border-bottom: 0.5px solid var(--tg-line-strong);
  max-width: 1500px;
  margin: 0 auto;
}
.tg-footer-cta h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(36px, 5.5vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--tg-fg);
  margin: 12px 0 0;
}
.tg-footer-cta h2 em { font-style: italic; color: var(--tg-gold); }
.tg-footer-cta-side {
  align-self: end;
  text-align: right;
}
.tg-footer-cta-side p {
  font-size: 14px;
  color: var(--tg-fg-soft);
  max-width: 380px;
  margin: 0 0 22px auto;
  line-height: 1.7;
  font-weight: 300;
}
.tg-footer-news {
  display: flex;
  flex-direction: column;
  border: 0.5px solid var(--tg-border);
  max-width: 420px;
  margin-left: auto;
  background: var(--tg-bg);
}
.tg-footer-news input {
  width: 100%;
  padding: 14px 18px;
  background: transparent;
  border: 0;
  border-bottom: 0.5px solid var(--tg-border);
  color: var(--tg-fg);
  font-size: 13px;
  outline: none;
  font-family: 'Inter', sans-serif;
}
.tg-footer-news input::placeholder { color: var(--tg-muted); }
.tg-footer-news button {
  width: 100%;
  padding: 14px 24px;
  background: var(--tg-gold);
  color: #0a0a0a;
  border: 0;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}
@media (hover: hover) {
  .tg-footer-news button:hover { background: #fff; }
}

/* Pill shape + animated white-trace gold border, paid pages only. The
   --tg-angle @property and tg-btn-spin keyframes come from the paid pages'
   own CSS (home/service/portfolio/gallery.css), which are only loaded there,
   so this never animates on any other page. */
body:has(.tg-home) .tg-footer-news button,
body:has(.tg-pf)   .tg-footer-news button,
body:has(.tg-sv)   .tg-footer-news button,
body:has(.tg-gal)  .tg-footer-news button {
  border-radius: 999px;
  position: relative;
  border: 2px solid transparent;
  background:
    linear-gradient(var(--tg-gold), var(--tg-gold)) padding-box,
    repeating-conic-gradient(from var(--tg-angle),
      #B37E00 0deg, #ffffff 45deg, #B37E00 90deg) border-box;
  box-shadow:
    0 0 18px 1px rgba(255, 255, 255, 0.45),
    0 0 40px 7px rgba(255, 204, 1, 0.28);
  animation: tg-btn-spin 2.6s linear infinite;
}
/* Keep the trace on hover; just brighten the interior (higher specificity than
   the base `.tg-footer-news button:hover` so the animated border survives). */
@media (hover: hover) {
  body:has(.tg-home) .tg-footer-news button:hover,
  body:has(.tg-pf)   .tg-footer-news button:hover,
  body:has(.tg-sv)   .tg-footer-news button:hover,
  body:has(.tg-gal)  .tg-footer-news button:hover {
    background:
      linear-gradient(#fff, #fff) padding-box,
      repeating-conic-gradient(from var(--tg-angle),
        #B37E00 0deg, #ffffff 45deg, #B37E00 90deg) border-box;
  }
}
@media (prefers-reduced-motion: reduce) {
  body:has(.tg-home) .tg-footer-news button,
  body:has(.tg-pf)   .tg-footer-news button,
  body:has(.tg-sv)   .tg-footer-news button,
  body:has(.tg-gal)  .tg-footer-news button { animation: none; }
}

/* ============ MAIN GRID ============ */
.tg-footer-main {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  padding: 60px 0 50px;
  max-width: 1500px;
  margin: 0 auto;
}

/* ----- Brand column ----- */
.tg-footer-brand .tg-issue {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--tg-gold);
  margin-bottom: 18px;
}
.tg-footer-brand .tg-issue::before {
  content: '';
  width: 28px; height: 1px;
  background: var(--tg-gold);
}
.tg-footer-brand .tg-wordmark {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(36px, 4.5vw, 54px);
  line-height: 0.95;
  color: var(--tg-fg);
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}
.tg-footer-brand .tg-wordmark em { color: var(--tg-gold); }
.tg-footer-brand p {
  color: var(--tg-fg-soft);
  font-size: 14px;
  line-height: 1.75;
  max-width: 320px;
  margin: 0 0 24px;
  font-weight: 300;
}
.tg-footer-socials {
  display: flex;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;
}
.tg-footer-socials li {
  border: 0.5px solid var(--tg-line-strong);
  border-right: 0;
}
.tg-footer-socials li:last-child {
  border-right: 0.5px solid var(--tg-line-strong);
}
.tg-footer-socials a {
  width: 42px; height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tg-fg-soft);
  font-size: 14px;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}
@media (hover: hover) {
  .tg-footer-socials a:hover {
    background: var(--tg-gold);
    color: #0a0a0a;
    text-decoration: none;
  }
}

/* ----- Link columns ----- */
.tg-footer-col h4 {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--tg-gold);
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  margin: 0 0 26px;
}
.tg-footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.tg-footer-col li { margin-bottom: 12px; }
.tg-footer-col a {
  color: var(--tg-fg-soft);
  text-decoration: none;
  font-size: 14px;
  font-weight: 300;
  transition: color 0.2s ease, padding-left 0.2s ease;
  display: inline-block;
}
@media (hover: hover) {
  .tg-footer-col a:hover {
    color: var(--tg-gold);
    text-decoration: none;
    padding-left: 6px;
  }
}

/* ----- Contact column ----- */
.tg-footer-contact .tg-line {
  font-size: 14px;
  color: var(--tg-fg-soft);
  margin-bottom: 14px;
  font-weight: 300;
  display: flex;
  gap: 10px;
  align-items: center;
}
.tg-footer-contact .tg-line span {
  font-size: 9px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--tg-muted);
  min-width: 64px;
}
.tg-footer-contact a {
  color: var(--tg-fg-soft);
  text-decoration: none;
  transition: color 0.2s ease;
}
@media (hover: hover) {
  .tg-footer-contact a:hover { color: var(--tg-gold); text-decoration: none; }
}

/* ============ BOTTOM BAR ============ */
.tg-footer-bottom {
  border-top: 0.5px solid var(--tg-line-strong);
  padding: 24px 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  max-width: 1500px;
  margin: 0 auto;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--tg-muted);
}
.tg-footer-bottom-mark {
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 16px;
  color: var(--tg-fg-soft);
  letter-spacing: -0.01em;
}
.tg-footer-bottom-mark em { color: var(--tg-gold); }
.tg-footer-bottom-right { text-align: right; }
.tg-footer-bottom a { color: var(--tg-fg-soft); text-decoration: none; }
@media (hover: hover) {
  .tg-footer-bottom a:hover { color: var(--tg-gold); text-decoration: none; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px) {
  .tg-footer-main { grid-template-columns: 1fr 1fr; gap: 44px; }
  .tg-footer-brand { grid-column: span 2; }
}
@media (max-width: 700px) {
  .tg-footer-cta {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: left;
  }
  .tg-footer-cta-side { text-align: left; }
  .tg-footer-cta-side p { margin-left: 0; }
  .tg-footer-news { margin-left: 0; flex-direction: column; }
  .tg-footer-news button { width: 100%; }
  .tg-footer-main { grid-template-columns: 1fr; gap: 40px; }
  .tg-footer-brand { grid-column: auto; }
  .tg-footer-bottom {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 12px;
  }
  .tg-footer-bottom-right { text-align: center; }
}
