/*
 * HDK Maribor — public site.
 * Design language follows DESIGN.md (Expo): white canvas, near-black ink,
 * black-only CTAs, hairline cards, 96px section rhythm. Expo's sky-blue
 * atmospheric wash is kept at its documented token values, where it reads
 * as rink ice behind the hero.
 *
 * The production CSP is `default-src 'self'; style-src 'self'` with no
 * 'unsafe-inline', so every rule lives in this file and fonts are served
 * from the same origin. No inline <style> blocks, no style="" attributes.
 */

/* ---------------------------------------------------------------- fonts */

@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/assets/fonts/inter-latin-ext-wght-normal.v1.woff2') format('woff2-variations');
  /* Slovene š/č/ž live in Latin Extended-A, so this range loads first. */
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/assets/fonts/inter-latin-wght-normal.v1.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --------------------------------------------------------------- tokens */

:root {
  color-scheme: light;

  --canvas: #ffffff;
  --canvas-soft: #fafafa;
  --surface-strong: #f0f0f3;
  --surface-dark: #171717;
  --surface-dark-elevated: #1f1f1f;

  --ink: #171717;
  --body: #60646c;
  /* Darkened from DESIGN.md's #999999, which fails AA against white. */
  --meta: #6b7076;
  --on-dark: #ffffff;
  --on-dark-soft: #b0b4ba;

  --primary: #000000;
  --primary-active: #1a1a1a;
  --text-link: #0d74ce;

  --hairline: #f0f0f3;
  --hairline-strong: #dcdee0;

  /* Atmospheric wash — hero only, never a brand action color. */
  --ice-light: #cfe7ff;
  --ice-mid: #a8c8e8;

  /* Single identity anchor carried over from the club crest. */
  --club: #d2193f;

  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-pill: 9999px;

  --shell: 1200px;
  --section: 96px;

  --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 12px 32px rgba(23, 23, 23, 0.08);
  --shadow-device: 0 32px 80px rgba(23, 23, 23, 0.18);
}

/* ----------------------------------------------------------------- base */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--canvas);
  color: var(--body);
  font-family: 'Inter Variable', ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

.page-shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: fixed;
  z-index: 30;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  border-radius: var(--r-md);
  background: var(--ink);
  color: var(--on-dark);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

/* --------------------------------------------------------------- header */

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  max-width: var(--shell);
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-md);
  background: var(--club);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.04em;
  text-align: center;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-copy strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.brand-copy span {
  color: var(--meta);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  padding: 8px 12px;
  border-radius: var(--r-md);
  color: var(--body);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.site-nav a:hover {
  background: var(--surface-strong);
  color: var(--ink);
}

.site-nav a[aria-current='page'] {
  color: var(--ink);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 16px;
  border-radius: var(--r-md);
  background: var(--primary);
  color: var(--on-dark);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}

.nav-cta:hover {
  background: var(--primary-active);
}

/* ----------------------------------------------------------------- hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 var(--section);
  text-align: center;
}

/* Atmospheric ice wash. Hero only, per DESIGN.md. */
.hero::before {
  content: '';
  position: absolute;
  z-index: 0;
  top: -340px;
  left: 50%;
  width: 1180px;
  height: 780px;
  transform: translateX(-50%);
  background:
    radial-gradient(closest-side, var(--ice-light) 0%, rgba(207, 231, 255, 0) 100%),
    radial-gradient(closest-side at 62% 42%, var(--ice-mid) 0%, rgba(168, 200, 232, 0) 100%);
  opacity: 0.85;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  background: var(--surface-strong);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.88px;
  text-transform: uppercase;
}

.hero-title {
  max-width: 15ch;
  font-size: clamp(38px, 7vw, 64px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.hero-lead {
  max-width: 62ch;
  color: var(--body);
  font-size: clamp(16px, 2vw, 18px);
  line-height: 1.6;
  text-wrap: pretty;
}

.hero-lead strong {
  color: var(--ink);
  font-weight: 600;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.button-primary {
  background: var(--primary);
  color: var(--on-dark);
}

.button-primary:hover {
  background: var(--primary-active);
  transform: translateY(-1px);
}

.button-secondary {
  border-color: var(--hairline-strong);
  background: var(--canvas);
  color: var(--ink);
}

.button-secondary:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}

/* --------------------------------------------------- hero device mockup */

/* DESIGN.md's device-mockup composite is the page chrome. Built in CSS so
   nothing external loads and the CSP stays at 'self'. */
.device {
  position: relative;
  z-index: 1;
  margin-top: 56px;
  perspective: 1400px;
}

.device-frame {
  width: 300px;
  margin: 0 auto;
  padding: 10px;
  border-radius: 42px;
  background: linear-gradient(160deg, #2a2a2a 0%, var(--surface-dark) 45%, #050505 100%);
  box-shadow: var(--shadow-device);
}

.device-screen {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  background: var(--canvas);
  text-align: left;
}

.device-notch {
  position: absolute;
  top: 0;
  left: 50%;
  width: 108px;
  height: 22px;
  transform: translateX(-50%);
  border-radius: 0 0 12px 12px;
  background: var(--surface-dark);
}

.app-bar {
  padding: 34px 18px 14px;
  border-bottom: 1px solid var(--hairline);
}

.app-eyebrow {
  color: var(--meta);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.app-title {
  margin-top: 3px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.app-list {
  display: flex;
  flex-direction: column;
  padding: 8px 10px 16px;
}

.app-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 8px;
  border-radius: var(--r-md);
}

.app-row + .app-row {
  border-top: 1px solid var(--hairline);
}

.app-row-day {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--r-md);
  background: var(--surface-strong);
  color: var(--ink);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.app-row-highlight .app-row-day {
  background: var(--surface-dark);
  color: var(--on-dark);
}

.app-row-copy {
  min-width: 0;
}

.app-row-label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.1px;
}

.app-row-meta {
  margin-top: 1px;
  color: var(--meta);
  font-size: 11px;
}

/* -------------------------------------------------------------- section */

.section {
  padding: var(--section) 0;
  border-top: 1px solid var(--hairline);
}

.section-soft {
  background: var(--canvas-soft);
}

.section-head {
  max-width: 62ch;
  margin-bottom: 48px;
}

.section-label {
  display: block;
  margin-bottom: 14px;
  color: var(--meta);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.88px;
  text-transform: uppercase;
}

.section-title {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.section-lead {
  margin-top: 16px;
  color: var(--body);
  font-size: 17px;
  line-height: 1.6;
  text-wrap: pretty;
}

/* ---------------------------------------------------------------- cards */

.card-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(3, 1fr);
}

.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-lg);
  background: var(--canvas);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.card:hover {
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}

.card-dark {
  border-color: var(--surface-dark);
  background: var(--surface-dark);
  color: var(--on-dark-soft);
}

.card-dark .card-title {
  color: var(--on-dark);
}

.card-index {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 6px;
  border-radius: var(--r-md);
  background: var(--surface-strong);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.card-dark .card-index {
  background: var(--surface-dark-elevated);
  color: var(--on-dark);
}

.card-title {
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.card-copy {
  font-size: 15px;
  line-height: 1.55;
}

/* ------------------------------------------------------- portal feature */

.portal-split {
  display: grid;
  align-items: center;
  gap: 48px;
  grid-template-columns: 1.05fr 0.95fr;
}

.portal-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

/* Block, not flex: the label is a bare text node next to a <span>, and a flex
   container would lay those out as two side-by-side items. */
.portal-list li {
  position: relative;
  display: block;
  padding: 14px 0 14px 20px;
  border-top: 1px solid var(--hairline);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.portal-list li::before {
  content: '';
  position: absolute;
  top: 23px;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--ink);
}

.portal-list span {
  display: block;
  margin-top: 4px;
  color: var(--body);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
}

.portal-panel {
  padding: 32px;
  border-radius: var(--r-xl);
  background: var(--surface-dark);
  color: var(--on-dark-soft);
}

.portal-panel .section-label {
  color: var(--on-dark-soft);
}

.portal-panel h3 {
  color: var(--on-dark);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.portal-panel p {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.6;
}

.portal-panel .button {
  margin-top: 24px;
  background: var(--canvas);
  color: var(--ink);
}

.portal-panel .button:hover {
  background: var(--surface-strong);
}

/* -------------------------------------------------------------- contact */

.contact-panel {
  display: grid;
  gap: 40px;
  grid-template-columns: 1fr 1fr;
  align-items: start;
}

.contact-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.contact-list > div {
  padding: 16px 0;
  border-top: 1px solid var(--hairline-strong);
}

.contact-list dt {
  color: var(--meta);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.88px;
  text-transform: uppercase;
}

.contact-list dd {
  margin: 6px 0 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
}

.contact-list dd a {
  color: var(--text-link);
  text-decoration: none;
}

.contact-list dd a:hover {
  text-decoration: underline;
}

/* ------------------------------------------------------------- cta band */

.cta-band {
  padding: var(--section) 0;
  border-top: 1px solid var(--hairline);
  text-align: center;
}

.cta-band h2 {
  max-width: 20ch;
  margin: 0 auto;
  font-size: clamp(28px, 4.4vw, 40px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.cta-band p {
  max-width: 54ch;
  margin: 16px auto 28px;
  color: var(--body);
  font-size: 17px;
}

/* --------------------------------------------------------------- footer */

.site-footer {
  padding: 56px 0;
  border-top: 1px solid var(--hairline);
  background: var(--canvas-soft);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
}

.footer-title {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.footer-meta {
  margin-top: 6px;
  color: var(--meta);
  font-size: 13px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links a {
  color: var(--body);
  font-size: 14px;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* --------------------------------------------------------- legal pages */

.legal-layout {
  display: grid;
  gap: 56px;
  grid-template-columns: minmax(0, 1fr) 240px;
  padding: 72px 0 var(--section);
}

.legal-intro {
  max-width: 68ch;
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--hairline-strong);
}

.eyebrow {
  display: block;
  margin-bottom: 14px;
  color: var(--meta);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.88px;
  text-transform: uppercase;
}

.legal-intro h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.lead {
  margin-top: 16px;
  color: var(--body);
  font-size: 17px;
  line-height: 1.6;
  text-wrap: pretty;
}

.notice {
  display: inline-block;
  margin-top: 20px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--surface-strong);
  color: var(--ink);
  font-size: 13px;
}

.notice strong {
  font-weight: 600;
}

.legal-content {
  max-width: 68ch;
}

.legal-content section + section {
  margin-top: 40px;
}

.legal-content h2 {
  margin-bottom: 12px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.legal-content p + p {
  margin-top: 12px;
}

.legal-content p {
  font-size: 16px;
  line-height: 1.65;
}

.legal-content a {
  color: var(--text-link);
  text-decoration: none;
}

.legal-content a:hover {
  text-decoration: underline;
}

.legal-side {
  position: sticky;
  top: 96px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 20px;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-lg);
  background: var(--canvas);
}

.legal-side p {
  margin-bottom: 10px;
  color: var(--meta);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.88px;
  text-transform: uppercase;
}

.legal-side a {
  padding: 7px 10px;
  border-radius: var(--r-sm);
  color: var(--body);
  font-size: 14px;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.legal-side a:hover {
  background: var(--surface-strong);
  color: var(--ink);
}

/* ------------------------------------------------------------- entrance */

.reveal {
  animation: rise 0.6s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.reveal-1 { animation-delay: 0.05s; }
.reveal-2 { animation-delay: 0.13s; }
.reveal-3 { animation-delay: 0.21s; }
.reveal-4 { animation-delay: 0.29s; }
.reveal-5 { animation-delay: 0.4s; }

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ----------------------------------------------------------- responsive */

@media (max-width: 1024px) {
  :root {
    --section: 72px;
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .portal-split {
    gap: 40px;
    grid-template-columns: 1fr;
  }

  .legal-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .legal-side {
    position: static;
    order: -1;
  }
}

@media (max-width: 720px) {
  :root {
    --section: 56px;
  }

  .header-inner,
  .footer-inner,
  .page-shell {
    padding: 0 18px;
  }

  .site-nav {
    display: none;
  }

  .hero {
    padding: 56px 0 var(--section);
  }

  .hero::before {
    width: 760px;
    height: 560px;
    top: -260px;
  }

  .card-grid,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .portal-panel {
    padding: 24px;
  }

  .button {
    width: 100%;
  }

  .button-row {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .card:hover,
  .button:hover {
    transform: none;
  }
}
