/* Hydroman Home — W3.CSS foundations and the revised Figma layout.
 * These page-specific rules leave Race, Form and shared/vendor styles intact.
 */
.home-page {
  --ice: #dafbfe;
  --section-width: 392px;
  --dark-border: rgb(0 0 0 / 25%);
  letter-spacing: -.01em;
}

.home-page main > section,
.event-card {
  scroll-margin-top: 100px;
}

.home-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 64px;
  padding: 24px 16px 64px;
}

.section-content,
.section-heading-wrap {
  width: 100%;
  max-width: var(--section-width);
}

.section-heading-wrap {
  display: flex;
  align-items: flex-start;
}

.section-label {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 2px;
  font: 700 14px/14px var(--heading-font);
  letter-spacing: -.025em;
  text-transform: uppercase;
}

.section-headline {
  font: 700 36px/36px var(--heading-font);
  letter-spacing: -.8px;
  text-transform: uppercase;
}

.section-subtitle {
  margin: 0;
  font: 700 24px/24px var(--heading-font);
  letter-spacing: -.025em;
  text-transform: uppercase;
}

.home-copy {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.home-copy p,
.buoy-product-copy > p {
  font: 500 16px/24px var(--body-font);
  letter-spacing: -.01em;
}

.home-section--light {
  background: #fff;
  color: #000;
}

.home-section--ice {
  background: var(--ice);
  color: #000;
}

.home-section--light .section-label,
.home-section--ice .section-label {
  border-color: var(--dark-border);
}

/* Welcome fills at least the viewport and grows when content needs more room.
 * Its actual bottom remains the header state boundary. */
.welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: auto;
  min-height: 560px;
  min-height: max(560px, 100vh);
  min-height: max(560px, 100dvh);
  gap: 24px;
  padding: 80px 16px;
}

.welcome > *,
.welcome-center > * { flex-shrink: 0; }

.welcome::before {
  content: '';
  flex: 0 0 20px;
}

.welcome-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  width: 100%;
}

.welcome-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  font: 700 52px/52px var(--heading-font);
  letter-spacing: -.03em;
  text-transform: uppercase;
}

.welcome-first-line {
  display: flex;
  align-items: flex-start;
  gap: 4px;
}

.welcome-first-line .status-tag {
  margin-top: 8px;
}

.home-page .welcome-action {
  width: 234px;
  max-width: 100%;
}

.status-tag {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  height: 24px;
  padding: 0 4px;
  border-radius: 2px;
  background: linear-gradient(rgb(255 255 255 / 25%), rgb(255 255 255 / 20%));
  color: var(--accent);
  font: 600 10px/10px var(--body-font);
  letter-spacing: -.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-tag--accent {
  background: var(--accent);
  color: #000;
}

.status-tag--dark {
  background: var(--ink);
  color: #fff;
}

.media-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  background: #000;
  color: #fff;
  font: 600 10px/10px var(--body-font);
  letter-spacing: -.02em;
  text-transform: uppercase;
}

.about-gallery {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.about-gallery > .media-placeholder {
  aspect-ratio: 8 / 3;
}

.about-gallery-pair {
  display: flex;
  gap: 8px;
}

.about-gallery-pair > .media-placeholder {
  flex: 1;
}

/* Merchandise is informational; the buoy can be bought during registration. */
.merchandise-section {
  gap: 40px;
}

.merchandise-section .section-label {
  font-size: 16px;
  line-height: 16px;
}

.merchandise-layout {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.merchandise-layout > .media-placeholder { order: -1; }

.merchandise-copy > p {
  padding-bottom: 24px;
}

.buoy-product {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 16px;
  border-radius: 4px;
  background: var(--ink);
  color: #fff;
}

.buoy-product > .media-placeholder { border-radius: 2px; }

.buoy-product-content,
.buoy-product-copy {
  display: flex;
  flex-direction: column;
}

.buoy-product-content { gap: 32px; }
.buoy-product-copy { gap: 16px; }

.buoy-product-heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.buoy-product-divider {
  height: 0;
}

.buoy-product-divider::before {
  content: '';
  display: block;
  height: 1px;
  transform: translateY(-.5px);
  background: url('../assets/icons/home-buoy-divider.svg') center / 100% 1px no-repeat;
}

.buoy-product-price {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.buoy-product-note {
  min-height: 24px;
  color: rgb(255 255 255 / 50%);
  font: 500 14px/21px var(--body-font);
}

/* Race cards stack through tablet and form three columns on desktop. */
.events-section {
  padding-top: 64px;
}

.events-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.events-heading h3 {
  font: 700 52px/52px var(--heading-font);
  letter-spacing: -.03em;
  text-align: center;
  text-transform: uppercase;
}

.event-list {
  display: grid;
  max-width: 392px;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 64px;
}

.event-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.event-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 8px;
}

.event-heading > .section-subtitle {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}

.event-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.event-logo-mark {
  display: block;
  width: 91.2px;
  height: 12px;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
}

.event-kids-logo {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 40px;
  object-fit: contain;
  object-position: left top;
}

.event-title-line {
  color: #fff;
  font: 700 26px/24px var(--heading-font);
  letter-spacing: -.025em;
  text-transform: uppercase;
  white-space: nowrap;
}

.event-date {
  margin: 0;
  color: rgb(255 255 255 / 75%);
  font: 700 14px/14px var(--heading-font);
  letter-spacing: -.025em;
  text-transform: uppercase;
}

.event-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.event-actions > .action {
  flex: 1 1 145px;
  min-width: 0;
  max-width: 288px;
}

.home-page .action--small {
  height: 44px;
  padding: 2px 2px 2px 12px;
  border-radius: 2px;
  font-size: 16px;
  line-height: 25.6px;
}

.home-page .action--small .action-icon {
  flex-basis: 40px;
  width: 40px;
  height: 40px;
}

.home-page .action--secondary-dark {
  border: 1px solid var(--border);
  background: transparent;
  color: #fff;
}

.home-page .action--secondary-dark .action-icon {
  background: transparent;
}

/* Preparing workshops are plain articles, with no clickable/focusable surface. */
.workshop-layout {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.workshop-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.workshop-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding-top: 24px;
  background: url('../assets/icons/home-workshop-divider.svg') left top / 100% 1px no-repeat;
}

.workshop-card > .media-placeholder {
  flex: 0 0 120px;
  width: 120px;
  border-radius: 2px;
}

.workshop-card-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.workshop-card-heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.workshop-description {
  font: 600 10px/10px var(--body-font);
  letter-spacing: -.02em;
  text-transform: uppercase;
}

/* Preparing activities keep the Figma appearance but disable native interaction. */
.activities-section {
  padding-bottom: 64px;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.activity-link {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  padding: 16px 0 0;
  border: 0;
  border-radius: 0;
  background: url('../assets/icons/footer-divider.svg') left top / 100% 1px no-repeat;
  color: var(--accent);
  text-align: left;
  white-space: normal;
  overflow: visible;
}

.home-page .activity-link:disabled {
  opacity: 1;
  cursor: default;
}

.activity-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.activity-heading > .icon-button {
  margin-top: 4px;
}

.activity-name {
  display: flex;
  flex: 1;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  font: 700 52px/52px var(--heading-font);
  letter-spacing: -.03em;
  text-transform: uppercase;
}

.activity-name .status-tag {
  margin-top: 8px;
}

.activity-description {
  color: #fff;
  font: 700 18px/18px var(--heading-font);
  letter-spacing: -.02em;
  text-transform: uppercase;
}

/* Reuse shared footer components; Home now includes payment brands and SVG logos. */
.home-page .site-footer {
  padding: 64px 24px;
  color: #fff;
}

.home-page .footer-payment-logos {
  display: flex;
  justify-content: center;
}

.payment-logo-window {
  position: relative;
  flex-shrink: 0;
  width: 352px;
  max-width: calc(100vw - 32px);
  aspect-ratio: 11 / 1;
  overflow: hidden;
}

.payment-logo-window picture {
  display: block;
  height: 100%;
}

.payment-logo-window img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-page .footer-bottom {
  padding-top: 32px;
}

.home-page .footer-wordmark {
  max-width: 100%;
  line-height: 0;
}

.home-page .footer-wordmark picture {
  display: block;
}

.home-page .footer-wordmark img {
  max-width: 100%;
  height: auto;
}

.home-page .footer-copyright {
  color: rgb(255 255 255 / 25%);
}

@media (hover: hover) {
  .home-page .action--secondary-dark:hover {
    background: rgb(255 255 255 / 10%);
  }
  .activity-link:not(:disabled):hover .activity-name {
    font-style: oblique;
  }
}

@media (min-width: 439px) {
  .home-section { padding-top: 40px; }
  .about-gallery { max-width: none; }
  .about-gallery,
  .about-gallery-pair,
  .event-actions { gap: 24px; }
  .events-section { padding-top: 64px; padding-bottom: 120px; }
  .activities-section { padding-bottom: 96px; }
  .home-page .site-footer { padding-bottom: 80px; }
}

@media (min-width: 768px) {
  .home-page { --section-width: 600px; }
  .home-section { padding: 64px 32px 80px; }
  .about-copy { padding-right: 104px; }
  .merchandise-section { gap: 48px; }
  .merchandise-copy > p { max-width: 496px; }
  .buoy-product { padding: 24px; }
  .buoy-product-copy > p { max-width: 496px; }
  .events-section { padding-top: 80px; padding-bottom: 120px; }
  .workshop-copy > p { max-width: 392px; }
  .workshop-card > .media-placeholder { flex-basis: 160px; width: 160px; }
  .activities-section { padding-bottom: 120px; }
  .home-page .site-footer { padding: 64px 32px 80px; }
  .home-page .footer-inner { grid-template-columns: minmax(0, 1fr) auto; }
  .home-page .footer-top { grid-column: 1 / -1; grid-row: 1; min-height: 218px; }
  .home-page .footer-payment-logos { grid-column: 1 / -1; grid-row: 2; justify-content: flex-end; }
  .payment-logo-window { width: 332px; aspect-ratio: 332 / 32; }
  .payment-logo-window img { position: absolute; width: 106.02%; height: 100%; max-width: none; }
  .home-page .footer-bottom { grid-column: 1 / -1; grid-row: 3; }
  .home-page .footer-wordmark { margin: 0; }
  .home-page .footer-copyright { text-align: left; }
  .home-page .footer-socials { grid-column: 2; grid-row: 3; align-self: start; margin: 32px 0 0; z-index: 1; }
}



@media (min-width: 1280px) {
  .home-page { --section-width: 1224px; }
  .home-page main > section,
  .event-card { scroll-margin-top: 128px; }
  .home-section { gap: 80px; padding: 128px 32px 160px; }
  .section-label { font-size: 16px; line-height: 16px; }
  .section-headline { font-size: 72px; line-height: 72px; letter-spacing: -.025em; }
  .section-subtitle { font-size: 32px; line-height: 32px; }
  .home-copy p,
  .buoy-product-copy > p { font-size: 18px; line-height: 27px; }
  .welcome { padding-inline: 32px; }
  .welcome-center { display: contents; }
  .welcome-title { padding-top: 80px; font-size: 120px; line-height: 120px; }
  .welcome-first-line .status-tag { display: none; }
  .status-tag,
  .media-placeholder { font-size: 12px; line-height: 12px; }
  .about-copy { max-width: 600px; align-self: flex-end; padding-right: 48px; gap: 40px; }
  .about-section .about-copy { margin-right: max(0px, calc((100% - 1224px) / 2)); }
  .merchandise-layout { flex-direction: row; gap: 24px; align-items: flex-start; }
  .merchandise-layout > * { flex: 1; min-width: 0; }
  .merchandise-layout > .media-placeholder { order: 0; }
  .merchandise-copy { padding-right: 48px; }
  .merchandise-copy > p { max-width: none; padding-bottom: 27px; }
  .buoy-product { flex-direction: row; padding: 32px; border-radius: 8px; }
  .buoy-product > .media-placeholder { border-radius: 4px; }
  .buoy-product > * { flex: 1; min-width: 0; }
  .buoy-product-content { justify-content: space-between; align-self: stretch; padding-block: 16px; gap: 0; }
  .buoy-product-copy > p { max-width: none; }
  .buoy-product-note { font-size: 16px; line-height: 24px; color: rgb(255 255 255 / 65%); }
  .events-section { padding-bottom: 208px; }
  .events-heading { gap: 40px; }
  .events-heading h3 { font-size: 120px; line-height: 120px; }
  .event-list {
    max-width: 1224px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }
  .event-heading { min-height: 40px; }
  .event-date { font-size: 16px; line-height: 16px; }
  .workshops-section,
  .activities-section { padding-bottom: 208px; }
  .workshop-layout { flex-direction: row; align-items: flex-start; gap: 24px; }
  .workshop-layout > * { flex: 1; min-width: 0; }
  .workshop-copy { padding-right: 48px; }
  .workshop-copy > p { max-width: none; }
  .workshop-description { font-size: 12px; line-height: 12px; }
  .activity-list { gap: 40px; }
  .activity-link { padding-top: 40px; }
  .activity-heading { align-items: center; }
  .activity-name { gap: 16px; font-size: 120px; line-height: 120px; }
  .activity-name .status-tag { margin-top: 20px; }
  .activity-heading .icon-button { flex-basis: 96px; width: 96px; height: 96px; margin-top: 0; }
  .home-page .site-footer { padding: 128px 32px 160px; }
  .home-page .footer-inner { gap: 80px 24px; }
  .home-page .footer-top { min-height: 0; }
  .home-page .footer-bottom { padding-top: 40px; }
  .home-page .footer-socials { align-self: end; margin: 0 0 29px; }
  .payment-logo-window { width: 414px; aspect-ratio: 414 / 40; }
  .payment-logo-window img { width: 106.28%; left: -.12%; top: -.31%; }
}

@media (max-height: 640px) {
  .welcome { gap: 24px; padding-top: 88px; padding-bottom: 24px; }
  .welcome-center { display: flex; gap: 24px; }
  .welcome-title { padding-top: 0; font-size: 52px; line-height: 52px; }
  .welcome-first-line .status-tag { display: inline-flex; margin-top: 8px; }
}

/* Local photographs fill the existing media slots without changing their ratios. */
.media-placeholder { position: relative; overflow: hidden; }
.media-placeholder > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Crop thin light edges baked into the Vltava and Kids Most thumbnail exports. */
.event-card .media-placeholder > img[src$="/thumbnail-vltava.jpg"],
.event-card .media-placeholder > img[src$="/thumbnail-kidsmost.jpg"] {
  transform: scale(1.01);
}

/* Hero exports already include their dark treatment; do not darken them twice. */
.welcome { position: relative; isolation: isolate; overflow: hidden; }
.welcome > .welcome-photo {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.welcome-photo > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
