/*!
 * Carbonia Cup – Emergency Registration
 * Copyright © 2026 Carbonia Racing a Karting Klub, z. s.
 * Grafika a vývoj: David Friček / Dafric
 * Všechna práva vyhrazena.
 */

:root {
  color-scheme: light;
  --ink: #0f0f0f;
  --muted: #37383b;
  --line: #dfe4ec;
  --soft: #f4f6f9;
  --accent: #dfff00;
  --accent-strong: #c7e900;
  --danger: #d72d35;
  --white: #ffffff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
}

.race-panel {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  background: #070b12;
  color: var(--white);
}

.race-panel__image,
.race-panel__shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.race-panel__image {
  object-fit: cover;
  object-position: center 52%;
}

.race-panel__shade {
  background:
    linear-gradient(180deg, rgba(4, 8, 14, 0.18), rgba(4, 8, 14, 0.82)),
    linear-gradient(90deg, rgba(4, 8, 14, 0.46), transparent 72%);
}

.race-panel__content {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 420px;
  flex-direction: column;
  padding: 24px;
}

.brand-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.12));
}

.registration-header {
  position: relative;
  z-index: 10;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.registration-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 24px;
}

@media (min-width: 1080px) {
  .registration-header__inner {
    padding: 14px max(42px, calc((100vw - 1240px) / 2));
  }
}

.race-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.race-brand picture {
  display: flex;
}

.race-brand>span {
  color: var(--ink);
  font-size: .95rem;
  font-style: italic;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -.025em;
}

.language-switch {
  position: relative;
  flex-shrink: 0;
}

.language-switch button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.language-switch__trigger {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  transition: background-color 150ms, transform 150ms;
}

.language-switch__trigger:hover,
.language-switch__trigger[aria-expanded="true"] {
  background: var(--soft);
}

.language-switch__trigger:active {
  transform: scale(.96);
}

.language-switch__trigger img {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .28);
}

.language-switch__menu {
  position: absolute;
  z-index: 5;
  top: calc(100% + 8px);
  right: 0;
  width: 150px;
  overflow: hidden;
  padding: 6px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 32px rgba(0, 0, 0, .22);
}

.language-switch__menu button {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 7px;
  background: transparent;
  color: #344054;
  font-size: .72rem;
  font-weight: 800;
  text-align: left;
  text-transform: uppercase;
}

.language-switch__menu button:hover,
.language-switch__menu button[aria-checked="true"] {
  background: #f2f4f7;
  color: var(--ink);
}

.language-switch__menu img {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
}

.language-switch__check {
  width: 16px;
  height: 16px;
  margin-left: auto;
  fill: none;
  stroke: #6b8500;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
}

.language-switch__menu button[aria-checked="true"] .language-switch__check {
  opacity: 1;
}

.language-switch button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

@media (max-width: 380px) {
  .registration-header__inner {
    padding: 10px 20px;
  }

  .registration-header .brand-logo {
    width: 46px;
    height: 46px;
  }
}

.race-panel__copy {
  width: 100%;
  margin: auto 0;
  max-width: 560px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: #3b485d;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.eyebrow--red {
  font-weight: bold;
  color: #ff2727;

}

.eyebrow--light {
  color: var(--white);
  font-size: 0.98rem;
}

.race-panel .eyebrow {
  margin-bottom: 28px;
}

.race-panel h1 {
  display: grid;
  justify-items: center;
  gap: 0.02em;
  margin: 0;
  font-size: clamp(2.55rem, 9.35vw, 4.93rem);
  font-style: italic;
  font-weight: 950;
  letter-spacing: -0.04em;
  line-height: 0.86;
  text-transform: uppercase;
}

.race-panel__sponsor {
  color: var(--white);
  font-size: 0.66em;
  letter-spacing: -0.025em;
}

.race-panel__brand {
  color: var(--accent);
  white-space: nowrap;
}

.race-panel__copy>p:last-child {
  max-width: 440px;
  margin: 18px auto 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
}

.race-panel__note {
  margin: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.78rem;
}

.form-panel {
  background: var(--white);
}

.form-wrap {
  width: min(100%, 900px);
  margin: 0 auto;
  padding: 42px 20px 28px;
}

.form-header {
  max-width: 680px;
  margin-bottom: 38px;
}

.form-header h2 {
  margin: 0;
  font-size: clamp(1.9rem, 5vw, 3rem);
  font-style: italic;
  font-weight: 950;
  letter-spacing: -0.05em;
  line-height: 1.12;
  text-transform: uppercase;
}

.form-header .eyebrow {
  margin-top: 4px;
  margin-bottom: 14px;
}

.form-header__help {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.form-header__help .eyebrow--red {
  display: inline;
  margin-right: 0.3em;
}

.form-header__contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.form-header__contact a {
  color: var(--ink);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--ink) 38%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

.form-header__contact a:hover {
  color: var(--accent-dark);
  text-decoration-color: currentColor;
}

.form-header__contact a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 58%, transparent);
  outline-offset: 2px;
}

.registration-form {
  display: grid;
  gap: 26px;
}

.registration-form[hidden] {
  display: none;
}

.registration-closed {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
}

.registration-closed[hidden] {
  display: none;
}

.registration-closed__icon {
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--muted);
}

.registration-closed>div {
  min-width: 0;
}

.registration-closed h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.125rem;
  line-height: 1.5;
  font-weight: 750;
}

.registration-closed p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.registration-closed .registration-closed__contact {
  margin-top: 12px;
}

.registration-closed a {
  color: var(--ink);
  font-weight: 600;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.registration-closed a:hover {
  text-decoration-thickness: 2px;
}

.registration-closed a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
  border-radius: 2px;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 32px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
}

legend {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px 0 0;
  color: var(--ink);
  font-size: 1.05rem;
  font-style: italic;
  font-weight: 900;
  letter-spacing: -0.015em;
  text-transform: uppercase;
}

legend span {
  color: #475467;
  font-size: 0.78rem;
  font-style: normal;
  letter-spacing: 0.12em;
}

.field-grid {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

fieldset > .field-grid:first-of-type {
  margin-top: 0;
}

.field {
  min-width: 0;
}

.field label {
  display: block;
  margin-bottom: 8px;
  color: #455269;
  font-size: 0.82rem;
  font-weight: 800;
}

.field label span,
.consent label span,
.consent strong {
  color: var(--danger);
}

input,
select,
textarea {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  background: var(--white);
  color: var(--ink);
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

input,
select {
  padding: 0 14px;
}

select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475467' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  cursor: pointer;
}

select:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230c1528' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

optgroup {
  font-family: inherit;
  font-weight: 700;
  color: #1a243b;
}

textarea {
  min-height: 130px;
  padding: 13px 14px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #626f84;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #aeb7c4;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(12, 21, 40, 0.1);
}

.field small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.77rem;
}

.conditional-field {
  margin-top: 18px;
  padding: 16px;
  border-radius: 12px;
  background: var(--soft);
}

.conditional-field[hidden] {
  display: none;
}

.counter {
  text-align: right;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 20px;
  cursor: pointer;
  color: #455269;
  font-size: 0.88rem;
}

.consent input {
  width: 22px;
  min-width: 22px;
  height: 22px;
  min-height: 22px;
  margin: 1px 0 0;
  accent-color: var(--ink);
}

.consent a,
.privacy-details a {
  color: var(--ink);
  font-weight: 800;
  text-underline-offset: 3px;
}

.privacy-details {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
  color: var(--muted);
  font-size: 0.8rem;
}

.privacy-details summary {
  padding: 13px 15px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 850;
}

.privacy-details[open] summary {
  border-bottom: 1px solid var(--line);
}

.privacy-details div {
  padding: 4px 15px 13px;
}

.privacy-details p {
  margin: 10px 0 0;
}

.turnstile-area {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--soft);
}

.turnstile-area[hidden] {
  display: none;
}

.turnstile-area>div:first-child {
  display: grid;
  gap: 3px;
}

.turnstile-area strong {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
}

.turnstile-area span {
  color: var(--muted);
  font-size: 0.76rem;
}

#turnstile-widget {
  width: 100%;
  min-height: 65px;
}

.submit-area {
  padding: 24px;
  border-radius: 16px;
  background: var(--ink);
  color: var(--white);
}

.submit-area p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.83rem;
}

.form-status {
  display: none;
  margin-top: 10px !important;
  color: #ff9da3 !important;
  font-weight: 800;
}

.form-status.is-visible {
  display: block;
}

.submit-area button {
  display: inline-flex;
  width: 100%;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #070b12;
  cursor: pointer;
  font-size: 0.9rem;
  font-style: italic;
  font-weight: 950;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  transition: background-color 150ms ease, transform 150ms ease;
}

.submit-area button:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

.submit-area button:active {
  transform: translateY(0) scale(0.99);
}

.submit-area button:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 3px;
}

.submit-area button:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.submit-area svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
  transition: transform 180ms ease;
}

.submit-area button:hover:not(:disabled) svg,
.submit-area button:focus-visible:not(:disabled) svg {
  transform: translateX(3px);
}

@keyframes page-reveal-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes page-reveal-image {
  from {
    opacity: 0.55;
    transform: scale(1.035);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.race-panel__image {
  animation: page-reveal-image 900ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.brand-logo,
.race-panel__copy,
.race-panel__note,
.form-header,
.registration-form>fieldset,
.turnstile-area,
.submit-area,
.site-footer {
  animation: page-reveal-up 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.brand-logo {
  animation-delay: 80ms;
}

.race-panel__copy {
  animation-delay: 150ms;
}

.race-panel__note {
  animation-delay: 220ms;
}

.form-header {
  animation-delay: 160ms;
}

.registration-form>fieldset:nth-of-type(1) {
  animation-delay: 220ms;
}

.registration-form>fieldset:nth-of-type(2) {
  animation-delay: 280ms;
}

.registration-form>fieldset:nth-of-type(3) {
  animation-delay: 340ms;
}

.turnstile-area {
  animation-delay: 380ms;
}

.submit-area {
  animation-delay: 420ms;
}

.site-footer {
  animation-delay: 460ms;
}

@media (prefers-reduced-motion: reduce) {

  .submit-area button:hover:not(:disabled) svg,
  .submit-area button:focus-visible:not(:disabled) svg {
    animation: none;
  }
}

/* ─── Footer (styl hlavního webu) ─── */
.site-footer {
  width: 100%;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.8125rem;
  margin-top: 40px;
}

.site-footer__inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 44px 20px 28px;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
}

.site-footer__logo {
  font-size: 1.85rem;
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: -0.04em;
  color: #0f172a;
  line-height: 1;
}

.site-footer__desc {
  margin: 12px 0 0;
  max-width: 360px;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: #64748b;
  font-weight: 500;
}

.site-footer__social-block {
  margin-top: 24px;
}

.site-footer__col-heading {
  font-size: 0.625rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: #0f172a;
  margin: 0 0 12px;
}

.site-footer__social-icons {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-footer__social-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  text-decoration: none;
  transition: transform 200ms ease, filter 200ms ease;
  flex-shrink: 0;
}

.site-footer__social-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.12);
}

.site-footer__social-btn--fb {
  background: #1877f2;
}

.site-footer__social-btn--ig {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
}

.site-footer__social-btn--yt {
  background: #ff0000;
}

.site-footer__contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.site-footer__link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #64748b;
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: color 180ms ease;
}

.site-footer__link svg {
  flex-shrink: 0;
  color: #64748b;
  transition: color 180ms ease;
}

/* Hover jde na ČERNOU (#0f172a), NIKOLIV do žluté! */
.site-footer__link:hover {
  color: #0f172a;
}

.site-footer__link:hover svg {
  color: #0f172a;
}

.site-footer__divider {
  width: 100%;
  height: 1px;
  background: #e2e8f0;
  margin: 32px 0 20px;
}

.site-footer__bottom {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

.site-footer__copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.site-footer__author {
  margin: 0;
  color: #64748b;
}

.site-footer__author a,
.site-footer__author strong,
.site-footer__author-name {
  color: #0f172a;
  font-weight: 700;
  text-decoration: none;
  transition: color 180ms ease;
}

.site-footer__author a:hover {
  color: #0f172a;
  text-decoration: underline;
}

.site-footer__author-suffix {
  text-transform: lowercase;
  font-weight: 700;
  color: #0f172a;
}

@media (min-width: 768px) {
  .site-footer__inner {
    padding: 48px 42px 32px;
  }

  .site-footer__grid {
    grid-template-columns: 1.4fr 1fr;
    gap: 48px;
  }

  .site-footer__bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

.honeypot {
  display: none !important;
}

@media (min-width: 680px) {
  .form-wrap {
    padding: 58px 42px 34px;
  }

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

  .field--full {
    grid-column: 1 / -1;
  }

  .submit-area {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
  }

  .submit-area p {
    margin: 0;
  }

  .submit-area button {
    width: auto;
    min-width: 240px;
    padding: 0 26px;
  }

}

@media (min-width: 1080px) {
  .race-panel {
    min-height: 540px;
  }

  .race-panel__content {
    min-height: 540px;
    padding: 42px max(42px, calc((100vw - 1240px) / 2));
  }

  .race-panel__image {
    object-position: center 52%;
  }

  .race-panel__shade {
    background:
      linear-gradient(180deg, rgba(4, 8, 14, 0.12), rgba(4, 8, 14, 0.82)),
      linear-gradient(90deg, rgba(4, 8, 14, 0.38), transparent 68%);
  }

  .race-panel__note {
    margin-top: 30px;
  }

  .race-panel__copy {
    max-width: 1000px;
    margin-right: auto;
    margin-left: auto;
  }

  .race-panel h1 {
    font-size: clamp(4rem, 5.95vw, 6.3rem);
  }

  .race-panel__copy>p:last-child {
    font-size: 1.1rem;
  }

  .form-wrap {
    width: min(100%, 1040px);
    padding: 72px 48px 40px;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-delay: 0ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
