/* =========================================================
   CryptoCon landing page
   ---------------------------------------------------------
   BRAND SETTINGS – values taken from auscryptocon.com
   (Automatic.css palette + Bricks theme styles).
   ========================================================= */
:root {
  /* Sydney = site "primary" (orange) */
  --sydney:              #F78200;
  --sydney-light:        #FFDBB3;
  --sydney-semi-light:   #FFAC4D;
  --sydney-dark:         #804400;

  /* Coming Soon = site "secondary" (blue) */
  --soon:                #4095FF;
  --soon-light:          #B3D5FF;
  --soon-semi-light:     #4D9DFF;
  --soon-dark:           #003980;

  /* Auckland teal (from the Auckland lock-up logo) */
  --auckland:            #33E6C1;
  --auckland-light:      color-mix(in srgb, var(--auckland) 45%, #fff);
  --auckland-semi-light: color-mix(in srgb, var(--auckland) 75%, #fff);
  --auckland-dark:       color-mix(in srgb, var(--auckland) 50%, #000);

  --bg:   #000000;               /* site --base */
  --text: #ffffff;
  --divider: #1a1a1a;            /* site --base-ultra-dark */

  --font-body:    Helvetica, "Helvetica Neue", Arial, sans-serif;   /* site --text-font-family */
  --font-heading: Helvetica, "Helvetica Neue", Arial, sans-serif;   /* site --heading-font-family */

  --speed: 450ms;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- Layout: 3 columns on desktop ---------- */
.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 100vh;
  height: 100svh;
  gap: 1px;                       /* thin divider between tiles */
  background: var(--divider);
}

/* ---------- Tile ---------- */
.tile {
  /* each tile feeds its colours into the site's button variables */
  --accent: var(--soon);
  --primary: var(--accent);
  position: relative;
  display: block;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  isolation: isolate;
  background: var(--bg);
  transition: filter var(--speed) ease;
}
.tile--sydney {
  --accent: var(--sydney);
  --primary-light: var(--sydney-light);
  --primary-semi-light: var(--sydney-semi-light);
  --primary-dark: var(--sydney-dark);
}
.tile--auckland {
  --accent: var(--auckland);
  --primary-light: var(--auckland-light);
  --primary-semi-light: var(--auckland-semi-light);
  --primary-dark: var(--auckland-dark);
}
.tile--soon {
  --accent: var(--soon);
  --primary-light: var(--soon-light);
  --primary-semi-light: var(--soon-semi-light);
  --primary-dark: var(--soon-dark);
}

.tile__bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform 900ms cubic-bezier(.2,.7,.2,1);
}

/* desktop (portrait images): keep each landmark in frame */
.tile--sydney   .tile__bg { object-position: 55% 50%; }   /* Opera House sails */
.tile--auckland .tile__bg { object-position: 20% 50%; }   /* Sky Tower + pōhutukawa */
.tile--soon     .tile__bg { object-position: 40% 50%; }

/* legibility shade + accent glow (glow hidden until hover) */
.tile::before,
.tile::after {
  content: "";
  position: absolute; inset: 0;
  z-index: -1;
  pointer-events: none;
}
.tile::before {
  background: linear-gradient(to bottom, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 35%, rgba(0,0,0,0) 70%, rgba(0,0,0,.45) 100%);
}
.tile::after {
  background: linear-gradient(to top, color-mix(in srgb, var(--accent) 40%, transparent) 0%, transparent 55%);
  box-shadow: inset 0 0 0 3px var(--accent);
  opacity: 0;
  transition: opacity var(--speed) ease;
}

/* ---------- Tile text ---------- */
.tile__content {
  position: absolute;
  top: clamp(1.5rem, 7vh, 4.75rem);
  left: clamp(1.25rem, 3vw, 3.75rem);
  right: 1.25rem;
}
.tile__content--center {
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
}

.tile__lockup { margin: 0; line-height: 0; }
.tile__lockup img { display: block; width: clamp(240px, 24vw, 460px); height: auto; }

.tile__logo { display: block; width: clamp(240px, 24vw, 460px); height: auto; margin-bottom: .35em; }

.tile__city {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 2.25vw, 2.9rem);
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
  color: var(--accent);
}
.tile__date {
  margin: .4em 0 0;
  font-size: clamp(.95rem, 1.25vw, 1.5rem);
  text-transform: uppercase;
  color: var(--soon);
}

.tile__soon {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(3rem, 5.4vw, 6.5rem);
  font-weight: 400;
  line-height: .92;
  text-transform: uppercase;
}
.tile__soon::after {
  content: "";
  display: block;
  width: 75%;
  height: 4px;
  margin: .3em auto 0;
  background: var(--soon);
  transition: width var(--speed) ease;
}

/* ---------- Button (matches auscryptocon.com "Get Tickets") ---------- */
.tile__cta {
  position: absolute;
  left: clamp(1.25rem, 3vw, 3.75rem);
  bottom: clamp(1.25rem, 6vh, 3.5rem);
  min-width: 140px;
  padding: .75em 1.5em;                 /* site --btn-pad-y / --btn-pad-x */
  border: 2px solid var(--primary);
  font-family: var(--font-body);
  font-size: 1.09375rem;                /* 17.5px, as on the site */
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  color: #000;                          /* site --btn-text-color: var(--base) */
}

/* =========================================================
   Aurora button – copied from auscryptocon.com
   (WPCodeBox snippet "Button Aurora Styles").
   Changes: square corners (the site's buttons render square),
   and it lights up when the whole tile is hovered.
   ========================================================= */
.btn--aurora {
  --blob-1:  var(--primary);
  --blob-2:  var(--primary);
  --blob-3:  var(--primary-light);
  --blob-4:  var(--primary-light);
  --blob-5:  var(--primary-semi-light);
  --blob-6:  var(--primary-semi-light);
  --blob-7:  var(--primary-dark);
  --blob-8:  var(--primary-dark);
  --blob-9:  #000000;   /* --base */
  --blob-10: #000000;
  --blob-11: #a6a6a6;   /* --base-semi-light */
  --blob-12: #a6a6a6;

  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  background: radial-gradient(ellipse 90% 62% at 50% 46%, var(--primary) 12%, var(--primary) 100%);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn--aurora::before {
  content: "";
  position: absolute;
  inset: -40%;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
  background:
    radial-gradient(circle at 50% 50%, var(--blob-1)  0%, var(--blob-1)  20%, transparent 58%),
    radial-gradient(circle at 50% 50%, var(--blob-2)  0%, var(--blob-2)  20%, transparent 58%),
    radial-gradient(circle at 50% 50%, var(--blob-3)  0%, var(--blob-3)  20%, transparent 58%),
    radial-gradient(circle at 50% 50%, var(--blob-4)  0%, var(--blob-4)  20%, transparent 58%),
    radial-gradient(circle at 50% 50%, var(--blob-5)  0%, var(--blob-5)  20%, transparent 58%),
    radial-gradient(circle at 50% 50%, var(--blob-6)  0%, var(--blob-6)  20%, transparent 58%),
    radial-gradient(circle at 50% 50%, var(--blob-7)  0%, var(--blob-7)  10%, transparent 52%),
    radial-gradient(circle at 50% 50%, var(--blob-8)  0%, var(--blob-8)  10%, transparent 52%),
    radial-gradient(circle at 50% 50%, var(--blob-9)  0%, var(--blob-9)   8%, transparent 50%),
    radial-gradient(circle at 50% 50%, var(--blob-10) 0%, var(--blob-10)  8%, transparent 50%),
    radial-gradient(circle at 50% 50%, var(--blob-11) 0%, var(--blob-11) 16%, transparent 60%),
    radial-gradient(circle at 50% 50%, var(--blob-12) 0%, var(--blob-12) 16%, transparent 60%);
  background-repeat: no-repeat;
  background-size:
    150px 150px, 150px 150px, 150px 150px, 150px 150px,
    145px 145px, 145px 145px,
    230px 230px, 230px 230px,
    270px 270px, 270px 270px,
    175px 175px, 175px 175px;
  filter: blur(12px);
  animation: aurora-drift 6s ease-in-out infinite alternate;
  animation-play-state: paused;
}

.tile:hover .btn--aurora::before,
.tile:focus-visible .btn--aurora::before {
  opacity: 1;
  animation-play-state: running;
}

@keyframes aurora-drift {
  0% {
    background-position:
      5% 15%, 25% 85%, 35% 10%, 50% 80%, 55% 5%, 70% 80%,
      80% 25%, 40% 90%, 20% 20%, 85% 15%, 30% 5%, 60% 85%;
  }
  50% {
    background-position:
      45% 75%, -10% 30%, 70% -20%, 20% 35%, 90% 45%, 45% 25%,
      40% 70%, 75% 40%, 60% -25%, 50% 65%, 65% 50%, 30% 35%;
  }
  100% {
    background-position:
      -15% 40%, 50% 95%, 15% 50%, 75% 100%, 35% -15%, 95% 60%,
      110% 10%, 20% 105%, 0% 60%, 105% -20%, 10% -10%, 80% 75%;
  }
}

.tile:hover .btn--aurora,
.tile:focus-visible .btn--aurora {
  transform: scale(1.03);
  box-shadow:
    0 0 40px var(--primary),
    inset 0 0 12px var(--primary),
    inset 0 0 30px var(--primary);
}

.tile:active .btn--aurora { transform: scale(0.97); }

/* ---------- Tile hover / focus highlight ---------- */
.tile:hover::after,
.tile:focus-visible::after   { opacity: 1; }
.tile:hover .tile__bg,
.tile:focus-visible .tile__bg { transform: scale(1.04); }
.tile:hover .tile__soon::after { width: 100%; }

.tile:focus-visible { outline: none; }

/* dim the other tiles while one is hovered */
@media (hover: hover) {
  .tiles:hover .tile:not(:hover) { filter: brightness(.6) saturate(.8); }
}

/* touch devices: show highlight while pressed */
@media (hover: none) {
  .tile:active::after { opacity: 1; }
}

/* =========================================================
   Breakpoints – the same ones auscryptocon.com uses (Bricks):
     Tablet portrait   ≤ 991px  → tiles stack into 3 horizontal bands
     Mobile landscape  ≤ 767px
     Mobile portrait   ≤ 478px
   The button stays anchored bottom-left of each tile at every size.
   ========================================================= */

/* ---------- Tablet portrait (≤ 991px) ---------- */
@media (max-width: 991px) {
  .tiles {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, 1fr);
    height: auto;
    min-height: 100vh;
    min-height: 100svh;
  }
  .tile { min-height: 300px; }

  .tile__content { top: 2rem; left: 2rem; }
  .tile__lockup img,
  .tile__logo    { width: 360px; }
  .tile__city    { font-size: 2.2rem; }
  .tile__soon    { font-size: 4rem; }
  .tile__cta     { left: 2rem; bottom: 2rem; }

  /* wide bands (landscape images): keep the skylines in frame */
  .tile--sydney   .tile__bg { object-position: 40% 75%; }
  .tile--auckland .tile__bg { object-position: 35% 60%; }
  .tile--soon     .tile__bg { object-position: 40% 55%; }
}

/* ---------- Mobile landscape (≤ 767px) ---------- */
@media (max-width: 767px) {
  .tile { min-height: 220px; }

  .tile__content { top: 1.5rem; left: 1.25rem; }
  .tile__lockup img,
  .tile__logo    { width: min(300px, 75vw); }
  .tile__city    { font-size: 1.9rem; }
  .tile__soon    { font-size: 3rem; }
  .tile__cta     { left: 1.25rem; bottom: 1.25rem; font-size: 1rem; }
}

/* ---------- Mobile portrait (≤ 478px) ---------- */
@media (max-width: 478px) {
  .tile__lockup img,
  .tile__logo    { width: min(260px, 78vw); }
  .tile__city    { font-size: 1.6rem; }
  .tile__soon    { font-size: 2.6rem; }
  .tile__cta     { padding: .7em 1.3em; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
