/*
 * Commercial fonts: add Ciutadela-Bold.woff2 and CodecPro-Bold.woff2 to /public/fonts/
 */
@font-face {
  font-family: 'Ciutadela';
  src: local('Ciutadela'), local('Ciutadela-Bold'),
       url('../fonts/Ciutadela-Bold.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Codec';
  src: local('Codec Pro'), local('CodecPro'),
       url('../fonts/CodecPro-Bold.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --navy: #0d2a52;
  --blue: #1a4b8c;
  --teal: #00b8c8;
  --red: #d94030;
  --gold: #f0b429;
  --white: #f4f6fa;
  --dark: #080f1e;
  --mid: #0f1e38;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  overflow-x: hidden;
}

/* Full viewport on mobile browsers (address bar) */
#hero {
  min-height: 100svh;
}
@supports (height: 100dvh) {
  #hero {
    min-height: max(100svh, 100dvh);
  }
}

/* Prevent oversized display type from causing horizontal scroll */
#hero .font-ciutadela {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .animate-float-a,
  .animate-float-a-slow,
  .animate-float-a-fast,
  .animate-blk,
  .animate-blk-delayed,
  .animate-blk-delayed-2,
  .animate-blk-delayed-3,
  .hero-chamfer-wrap {
    animation: none !important;
  }
  .animate-blk,
  .animate-blk-delayed,
  .animate-blk-delayed-2,
  .animate-blk-delayed-3 {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
  }
  .animate-rise-01,
  .animate-rise-02,
  .animate-rise-03,
  .animate-rise-04,
  .animate-rise-05,
  .animate-rise-06,
  .animate-rise-07,
  .animate-rise-08,
  .h-onchain-fill,
  .h-ticker-inner {
    animation: none !important;
  }
  .h-onchain-fill {
    clip-path: inset(0 0 0 0);
  }
  .animate-rise-01,
  .animate-rise-02,
  .animate-rise-03,
  .animate-rise-04,
  .animate-rise-05,
  .animate-rise-06,
  .animate-rise-07,
  .animate-rise-08 {
    opacity: 1;
    transform: none;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

::-webkit-scrollbar {
  width: 3px;
}
::-webkit-scrollbar-track {
  background: var(--dark);
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 184, 200, 0.4);
  border-radius: 2px;
}

/* Hero backgrounds */
.h-grid {
  background-image:
    linear-gradient(rgba(0, 184, 200, 0.042) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 184, 200, 0.042) 1px, transparent 1px);
  background-size: 66px 66px;
}
.h-vignette {
  background:
    radial-gradient(ellipse 72% 85% at 26% 52%, rgba(8, 15, 30, 0.95) 0%, transparent 72%),
    radial-gradient(ellipse 55% 55% at 92% 12%, rgba(0, 184, 200, 0.12) 0%, transparent 62%),
    radial-gradient(ellipse 40% 45% at 8% 94%, rgba(217, 64, 48, 0.07) 0%, transparent 55%),
    radial-gradient(ellipse 55% 55% at 78% 82%, rgba(26, 75, 140, 0.24) 0%, transparent 60%);
}
.h-noise {
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
}

@keyframes floatA {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  35% {
    transform: translate(16px, -24px) scale(1.04);
  }
  68% {
    transform: translate(-11px, 13px) scale(0.97);
  }
}
.animate-float-a {
  animation: floatA 11s ease-in-out infinite;
}
.animate-float-a-slow {
  animation: floatA 14s ease-in-out infinite reverse;
}
.animate-float-a-fast {
  animation: floatA 9s ease-in-out infinite 2.5s;
}

/* Hero chamfer blocks: entrance (opacity + filter) + looping drift (transform) */
@keyframes heroBlkEnter {
  from {
    opacity: 0;
    filter: blur(12px);
  }
  to {
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes heroBlkDriftA {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  35% {
    transform: translate(12px, -18px) scale(1.05);
  }
  70% {
    transform: translate(-8px, 12px) scale(0.97);
  }
}

@keyframes heroBlkDriftB {
  0%,
  100% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
  45% {
    transform: translate(-14px, 14px) scale(1.04) rotate(-1.4deg);
  }
}

@keyframes heroBlkDriftC {
  0%,
  100% {
    transform: translate(0, 0);
  }
  30% {
    transform: translate(10px, 8px);
  }
  65% {
    transform: translate(-10px, -14px);
  }
}

@keyframes heroBlkDriftD {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  40% {
    transform: translate(8px, -12px) rotate(1.8deg);
  }
  75% {
    transform: translate(-6px, 8px) rotate(-1deg);
  }
}

.hero-chamfer-wrap {
  transform: translateZ(0);
}

.animate-blk {
  animation:
    heroBlkEnter 1s cubic-bezier(0.22, 1, 0.36, 1) forwards,
    heroBlkDriftA 9s ease-in-out infinite 1s;
}
.animate-blk-delayed {
  animation:
    heroBlkEnter 1s cubic-bezier(0.22, 1, 0.36, 1) 0.12s forwards,
    heroBlkDriftB 11s ease-in-out infinite 1.12s;
}
.animate-blk-delayed-2 {
  animation:
    heroBlkEnter 1s cubic-bezier(0.22, 1, 0.36, 1) 0.24s forwards,
    heroBlkDriftC 8s ease-in-out infinite 1.24s;
}
.animate-blk-delayed-3 {
  animation:
    heroBlkEnter 1s cubic-bezier(0.22, 1, 0.36, 1) 0.36s forwards,
    heroBlkDriftD 10.5s ease-in-out infinite 1.36s;
}

.clip-chamfer {
  clip-path: polygon(16% 0%, 100% 0%, 100% 84%, 84% 100%, 0% 100%, 0% 16%);
}

@keyframes sweepIn {
  to {
    clip-path: inset(0 0% 0 0);
  }
}
.h-onchain-fill {
  clip-path: inset(0 100% 0 0);
  animation: sweepIn 1.5s 0.7s cubic-bezier(0.76, 0, 0.18, 1) forwards;
}

@keyframes riseIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Initial state lives here so hero copy stays visible if this file fails to load (no stray Tailwind opacity-0). */
.animate-rise-01,
.animate-rise-02,
.animate-rise-03,
.animate-rise-04,
.animate-rise-05,
.animate-rise-06,
.animate-rise-07,
.animate-rise-08 {
  opacity: 0;
  transform: translateY(20px);
}

.animate-rise-01 {
  animation: riseIn 0.65s 0.05s ease forwards;
}
.animate-rise-02 {
  animation: riseIn 0.75s 0.12s ease forwards;
}
.animate-rise-03 {
  animation: riseIn 0.75s 0.18s ease forwards;
}
.animate-rise-04 {
  animation: riseIn 0.75s 0.24s ease forwards;
}
.animate-rise-05 {
  animation: riseIn 0.78s 0.32s ease forwards;
}
.animate-rise-06 {
  animation: riseIn 0.78s 0.42s ease forwards;
}
.animate-rise-07 {
  animation: riseIn 0.8s 0.52s ease forwards;
}
.animate-rise-08 {
  animation: riseIn 0.8s 0.62s ease forwards;
}

@keyframes ticker {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}
.h-ticker-inner {
  animation: ticker 30s linear infinite;
}
.h-ticker-inner:hover {
  animation-play-state: paused;
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Theme cards bottom accent */
.tc {
  --ac: var(--teal);
}
.tc[data-accent='teal'] {
  --ac: var(--teal);
}
.tc[data-accent='red'] {
  --ac: var(--red);
}
.tc[data-accent='gold'] {
  --ac: var(--gold);
}
.tc[data-accent='blue'] {
  --ac: var(--blue);
}
.tc::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--ac);
  transform: scaleX(0);
  transition: transform 0.3s;
  transform-origin: left;
}
.tc:hover::after {
  transform: scaleX(1);
}

.map-gr {
  background-image:
    linear-gradient(rgba(0, 184, 200, 0.065) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 184, 200, 0.065) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* Nav mobile panel */
#nav-panel[data-open='true'] {
  pointer-events: auto;
  opacity: 1;
}
#nav-panel[data-open='false'] {
  pointer-events: none;
  opacity: 0;
}

.day-pane {
  display: none;
}
.day-pane.active {
  display: block;
}
.day-tab.active {
  color: var(--teal);
  border-bottom-color: var(--teal);
}

.chip.r {
  background: rgba(217, 64, 48, 0.1);
  color: var(--red);
}
.chip.g {
  background: rgba(240, 180, 41, 0.1);
  color: var(--gold);
}

/* Horizontal padding that respects notched devices */
.pad-x-section {
  padding-left: max(1.25rem, env(safe-area-inset-left));
  padding-right: max(1.25rem, env(safe-area-inset-right));
}
@media (min-width: 640px) {
  .pad-x-section {
    padding-left: max(2rem, env(safe-area-inset-left));
    padding-right: max(2rem, env(safe-area-inset-right));
  }
}
@media (min-width: 1024px) {
  .pad-x-section {
    padding-left: max(5vw, env(safe-area-inset-left));
    padding-right: max(5vw, env(safe-area-inset-right));
  }
}

/* Schedule day tabs: horizontal scroll on narrow phones */
.day-tabs-scroll {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.day-tabs-scroll::-webkit-scrollbar {
  display: none;
}

/* Registration: category & native selects on dark UI */
.reg-form {
  color-scheme: dark;
}

.reg-category-wrap {
  position: relative;
}

.reg-category-wrap::after {
  content: '';
  position: absolute;
  right: 1rem;
  top: 50%;
  width: 0.5rem;
  height: 0.5rem;
  margin-top: -0.35rem;
  border-right: 2px solid rgba(244, 246, 250, 0.5);
  border-bottom: 2px solid rgba(244, 246, 250, 0.5);
  transform: rotate(45deg);
  pointer-events: none;
}

select.reg-category {
  appearance: none;
  -webkit-appearance: none;
}

select.reg-category option,
select.reg-category optgroup {
  background-color: #0f1e38;
  color: #f4f6fa;
}

/* Award nominations: category select */
.nomination-form {
  color-scheme: dark;
}

.speaker-nomination-form {
  color-scheme: dark;
}

.award-category-wrap {
  position: relative;
}

.award-category-wrap::after {
  content: '';
  position: absolute;
  right: 1rem;
  top: 50%;
  width: 0.5rem;
  height: 0.5rem;
  margin-top: -0.35rem;
  border-right: 2px solid rgba(240, 180, 41, 0.65);
  border-bottom: 2px solid rgba(240, 180, 41, 0.65);
  transform: rotate(45deg);
  pointer-events: none;
}

select.award-category {
  appearance: none;
  -webkit-appearance: none;
}

select.award-category option,
select.award-category optgroup {
  background-color: #0f1e38;
  color: #f4f6fa;
}
