
/* ========================================
   1. GLOBAL
======================================== */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Trebuchet MS", Arial, sans-serif;
  color: #12467f;
}

body {
  background: #d5f4ff;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}


/* ========================================
   2. HEADER
======================================== */

.topbar {
  background: linear-gradient(110deg, #E5A0BF, #F5C5D9);
  color: #173E67;

  position: sticky;
  top: 0;
  z-index: 1000;
}

.top-inner {
  max-width: 1400px;
  margin: auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Club logo */

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo {
  width: 66px;
  height: 66px;
  object-fit: contain;
  border-radius: 50%;
  flex-shrink: 0;
  filter: none;
}

.brand strong {
  font-size: clamp(19px, 2.9vw, 37px);
  letter-spacing: 0.035em;
  white-space: nowrap;
  display: block;
  line-height: 1.12;
}

.brand small {
  font-size: clamp(8px, 1vw, 13px);
  letter-spacing: 0.35em;
  display: block;
  margin-top: 5px;
}

/* Language selector */

.languages {
  display: flex;
  align-items: center;
  gap: 3px;
  background: #fff;
  border-radius: 100px;
  padding: 7px 11px;
  color: #14518d;
  box-shadow: 0 3px 15px #155e9b20;
  white-space: nowrap;
}

.languages button {
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  border: 0;
  background: transparent;
  color: #14518d;
  padding: 10px 12px;
  border-radius: 100px;
  cursor: pointer;
}

.languages button[aria-pressed="true"] {
  background: #d4edff;
}

.languages button:focus-visible,
.card:focus-visible {
  outline: 3px solid #ff4a97;
  outline-offset: 3px;
}


/* ========================================
   3. BACKGROUND & PAGE CONTENT
======================================== */

/*
  Background independent of card height.
  Keep background fixed to the viewport.
  Cards can grow without resizing the image.
*/

.scene {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 90px);

  background-image:
    linear-gradient(#ffffff05, #ffffff20),
    url("../assets/background-desktop.webp");

  background-size: 100% 100%;
  background-position: center top;
  background-repeat: no-repeat;
  background-color: #dcf5ff;
}

.scene::before {
  content: "";
  position: absolute;

  top: 0;
  left: 0;
  right: 0;

  height: calc(100vh - 90px);
  min-height: 0;

  z-index: -1;
  pointer-events: none;

  background-image:
    linear-gradient(#ffffff05, #ffffff20),
    url("../assets/background-desktop.webp");

  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

.content {
  flex: 1;
  display: flex;
  flex-direction: column;

  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px 20px;
}


/* ========================================
   4. HERO - WELCOME + MASCOT
======================================== */

.hero {
  position: relative;
  min-height: 410px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

/* Welcome speech bubble */

.welcome {
  position: relative;
  flex: 0 1 570px;
  min-width: 0;
  max-width: 570px;
  margin: 0;

  background: rgba(255, 255, 255, 0.94);
  border: 2px solid rgba(255, 255, 255, 0.95);
  border-radius: 32px;

  padding: 35px 42px;
  box-shadow: 0 8px 24px rgba(18, 70, 127, 0.10);
}

/* Speech bubble tail pointing toward mascot */

.welcome::after {
  content: "";
  position: absolute;

  right: -23px;
  top: 45%;

  width: 36px;
  height: 36px;

  background: rgba(255, 255, 255, 0.94);
  clip-path: polygon(0 0, 100% 50%, 0 100%);

  z-index: 1;
}

.welcome h1 {
  font-size: clamp(28px, 3.3vw, 52px);
  margin: 0;
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.welcome h1 span,
.welcome h1 em {
  display: block;
  font-style: normal;
}

.welcome h1 em {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f13b91;
  margin-top: 10px;
  white-space: nowrap;
}

.welcome h1 em span:first-child {
  display: inline-block;
  flex-shrink: 1;
  min-width: 0;
}

.welcome h1 em .heart {
  display: inline-block;
  position: static;
  flex-shrink: 0;
  margin-left: 0;
  line-height: 1;
  vertical-align: middle;
}

.welcome p {
  font-weight: 800;
  font-size: clamp(13px, 1.4vw, 20px);
  margin: 18px 0 0;
}

/* Heart beside club name */

.heart {
  position: static;
  display: inline;
  margin-left: 4px;
  font-size: 0.75em;
  color: #ff70ad;
  vertical-align: top;
  line-height: 1;
}

.welcome h1 em span {
  display: inline;
}

/* Eel mascot */

.hero > .eel {
  position: relative;
  display: block;

  width: 38%;
  max-width: 480px;
  height: auto;
  object-fit: contain;

  flex-shrink: 0;
  margin: 0;
  pointer-events: none;
  z-index: 2;
}


/* ========================================
   5. SERVICE CARDS
======================================== */

.cards {
  display: grid;

  /* Desktop: 3 columns x 2 rows */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, auto);
  grid-auto-flow: column;

  gap: 15px;

  /* Center in remaining vertical space */
  margin-top: auto;
  margin-bottom: auto;

  padding-top: 30px;
  padding-bottom: 30px;

  /* Move cards upward */
  transform: translateY(-55px);
}

/* Main card */

.card {
  min-height: 175px;
  height: auto;

  display: flex;
  align-items: center;
  gap: 14px;

  padding: 18px 16px;

  border: 5px solid #ffffff;
  border-radius: 30px;

  text-decoration: none;
  color: #12467f;

  box-shadow:
    0 12px 28px rgba(15, 65, 110, 0.25),
    0 3px 8px rgba(15, 65, 110, 0.12);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

/* Hover effect */

@media (hover: hover) {
  .card:hover {
    transform: translateY(-6px);

    box-shadow:
      0 18px 35px rgba(15, 65, 110, 0.32),
      0 5px 12px rgba(15, 65, 110, 0.15);
  }
}

/* Card icons */

.card img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Card text container */

.card-copy {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Card title */

.card h2 {
  font-size: clamp(20px, 1.8vw, 26px);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 8px;
}

/* Card description */

.card p {
  font-size: clamp(14px, 1.2vw, 18px);
  line-height: 1.4;
  margin: 0;
  white-space: pre-line;
}

/* Card arrow */

.arrow {
  display: grid;
  place-items: center;

  flex: 0 0 31px;
  width: 31px;
  height: 31px;

  color: white;
  border-radius: 50%;

  font-size: 30px;
  line-height: 1;
}


/* ========================================
   CARD COLORS
======================================== */

/* Club Rules */

.rules {
  background: #ffe8f1;
}

.rules .arrow {
  background: #f34e9a;
}

/* Session Schedule */

.schedule {
  background: #def3ff;
}

.schedule .arrow {
  background: #27adf7;
}

/* New Registration */

.registration {
  background: #defbef;
}

.registration .arrow {
  background: #00c5a1;
}

/* Edit / Cancel Registration */

.edit {
  background: #ffeddc;
}

.edit .arrow {
  background: #ff8952;
}

/* Feedback & Suggestions */

.feedback {
  background: #f4e6ff;
}

.feedback .arrow {
  background: #bd65e9;
}

/* Contact Us */

.contact {
  background: #fff8d9;
}

.contact .arrow {
  background: #ffbd08;
}


/* ========================================
   6. FOOTER - PAGE BOTTOM
======================================== */

footer {
  margin-top: auto;
  text-align: center;
  padding: 20px 10px 16px;
  font-size: 16px;
  font-weight: 800;
  text-shadow: 0 1px 8px #fff;
}


/* ========================================
   7. TOAST NOTIFICATION
======================================== */

#toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;

  background: #fff;
  border: 2px solid #ff95bd;
  border-radius: 18px;

  padding: 16px 22px;
  max-width: min(92vw, 560px);

  box-shadow: 0 10px 35px #1234;
  font-size: 15px;
}

#toast[hidden] {
  display: none;
}


/* ========================================
   8. TABLET - MAX 850px
======================================== */

@media (max-width: 850px) {

  /* Header */

  .top-inner {
    padding: 14px 18px;
  }

  .brand-logo {
    width: 43px;
    height: 43px;
  }

  .brand strong {
    font-size: 22px;
  }

  .brand small {
    font-size: 9px;
  }

  /* Content */

  .content {
    padding: 0 15px 20px;
  }

  /* Hero */

  .hero {
    min-height: 355px;
    gap: 10px;
  }

  .welcome {
    width: 100%;
    max-width: 1100px;
    box-sizing: border-box;
    padding: 27px 28px;
  }

  .hero > .eel {
    width: 40%;
  }

  /* Cards */

  .cards {
    gap: 10px;
  }

  .card {
    padding: 12px;
    gap: 8px;
    min-height: 155px;
    border-radius: 22px;
  }

  .card img {
    width: 55px;
    height: 65px;
  }

  .card h2 {
    font-size: 18px;
  }

  .card p {
    font-size: 14px;
  }

  .arrow {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
    font-size: 23px;
  }
}


/* ========================================
   9. MOBILE - MAX 620px
======================================== */

@media (max-width: 620px) {

  /* Header */

  .top-inner {
    padding: 12px 10px;
    gap: 7px;
  }

  .brand {
    gap: 5px;
  }

  .brand-logo {
    width: 32px;
    height: 36px;
  }

  .brand strong {
    font-size: clamp(12px, 3.8vw, 18px);
  }

  .brand small {
    font-size: clamp(5px, 1.35vw, 7px);
    letter-spacing: 0.17em;
  }

  /* Language selector */

  .languages {
    padding: 3px 4px;
    gap: 0;
  }

  .languages span {
    font-size: 12px;
  }

  .languages button {
    font-size: clamp(9px, 2.6vw, 12px);
    padding: 7px 5px;
  }

  /* Mobile portrait background */

  .scene {
    min-height: calc(100vh - 60px);

    background-image:
      linear-gradient(#ffffff05, #ffffff10),
      url("../assets/background-mobile.webp");

    background-size: 100% 100%;
    background-position: center top;
    background-repeat: no-repeat;
  }

  .scene::before {
    height: calc(100vh - 60px);

    background-image:
      linear-gradient(#ffffff05, #ffffff10),
      url("../assets/background-mobile.webp");

    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
  }

  .content {
    padding: 0 10px 18px;
  }

  /* Hero */

  .hero {
    min-height: clamp(290px, 84vw, 445px);
    gap: 6px;
  }

  .welcome {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;

    padding: 18px 14px;
    border-radius: 22px;
  }

  /* Smaller speech bubble tail on mobile */

  .welcome::after {
    right: -14px;
    top: 42%;
    width: 22px;
    height: 26px;
  }

  .welcome h1 em {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    white-space: nowrap;
    margin-top: 5px;
  }

  .welcome p {
    font-size: clamp(10px, 2.6vw, 14px);
    margin-top: 9px;
  }

  .heart {
    position: static;
    display: inline-block;
    flex-shrink: 0;
    font-size: 0.75em;
    line-height: 1;
  }

  .hero > .eel {
    width: 45%;
    max-width: 45%;
  }

  /* Mobile cards: 2 columns x 3 rows */

  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(3, auto);
    grid-auto-flow: row;

    gap: 8px;

    margin-top: auto;
    margin-bottom: auto;

    padding-top: 20px;
    padding-bottom: 20px;

    /* Move cards upward */
    transform: translateY(-25px);
  }

  .card {
    min-height: 145px;
    height: auto;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;

    position: relative;

    padding: 10px 9px;
    border-width: 3px;
    border-radius: 20px;
    gap: 2px;
  }

  .card img {
    width: 52px;
    height: 48px;
  }

  .card h2 {
    font-size: clamp(14px, 3.8vw, 19px);
    margin-bottom: 4px;
    max-width: calc(100% - 22px);
  }

  .card p {
    font-size: clamp(12px, 3vw, 14px);
    line-height: 1.35;
    white-space: pre-line;
  }

  .arrow {
    position: absolute;
    right: 7px;
    top: 12px;

    width: 21px;
    height: 21px;
    font-size: 21px;
  }

  /* Footer */

  footer {
    font-size: 10px;
    padding-top: 22px;
  }
}
