/* FreshMaid Services — Mobile First, Figma tokens */

:root {
  --color-bg: #d8f0fd;
  --color-primary: #152e88;
  --color-text: #100c31;
  --color-card: #c3eaff;
  --color-white: #ffffff;
  --color-btn-border: #37c3ff;
  --color-btn-from: #80ffff;
  --color-btn-to: #66d6ff;
  --color-muted: #9196a5;
  --font-heading: 'Tenor Sans', sans-serif;
  --font-body: 'Nunito Sans', sans-serif;
  --radius-sm: 10px;
  --radius-md: 16px;
  --container-max: 1440px;
  --section-pad-x: 20px;
  --section-pad-y: 40px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style-position: outside;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--section-pad-x);
  padding-right: var(--section-pad-x);
}

/* Typography */
.heading-xl {
  font-family: var(--font-heading);
  font-size: 40px;
  line-height: 1;
  text-transform: uppercase;
  font-weight: 400;
}

.heading-lg {
  font-family: var(--font-heading);
  font-size: 26px;
  line-height: 1.2;
  text-transform: uppercase;
  font-weight: 400;
}

.heading-md {
  font-family: var(--font-heading);
  font-size: 18px;
  line-height: 1.2;
  text-transform: uppercase;
  font-weight: 400;
}

.text-subtitle {
  font-size: 20px;
  font-weight: 600;
}

.text-body-lg {
  font-size: 20px;
  font-weight: 400;
}

.text-body {
  font-size: 16px;
  font-weight: 400;
}

.text-small {
  font-size: 14px;
}

.text-nav {
  font-family: var(--font-heading);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Buttons & badges */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-white);
}

.badge--filled {
  background: var(--color-primary);
}

.badge--outline {
  border: 2px solid var(--color-white);
  background: transparent;
}

.btn-frost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 20px;
  border: 2px solid var(--color-btn-border);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--color-btn-from) 0%, var(--color-btn-to) 100%);
  color: var(--color-white);
  font-size: 24px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
  width: 100%;
  max-width: 400px;
}

.btn-frost:hover {
  opacity: 0.9;
}

.btn-frost .crystal {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.btn-frost--game {
  font-size: 22px;
  padding: 12px 24px;
  width: auto;
  max-width: 100%;
  align-self: center;
  margin-left: auto;
  margin-right: auto;
}

.btn-frost--game .crystal {
  width: 44px;
  height: 44px;
}

/* Header */
.site-header {
  position: relative;
  z-index: 10;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  z-index: 110;
  margin-bottom: 32px;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-white);
  flex-shrink: 0;
  min-width: 0;
}

.logo__icon {
  width: 24px;
  height: 24px;
  object-fit: cover;
  flex-shrink: 0;
}

.logo__text {
  font-family: var(--font-heading);
  font-size: 16px;
  text-transform: uppercase;
  line-height: 1;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  position: relative;
  z-index: 110;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-white);
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.main-nav {
  display: none;
  position: fixed;
  inset: 0;
  top: 0;
  background: rgba(21, 46, 136, 0.98);
  z-index: 105;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 80px 20px 40px;
}

.main-nav.is-open {
  display: flex;
}

body.nav-open {
  overflow: hidden;
}

.main-nav a {
  font-family: var(--font-heading);
  font-size: 14px;
  text-transform: uppercase;
  color: var(--color-white);
  text-align: center;
}

.main-nav a:hover {
  opacity: 0.8;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 24px var(--section-pad-x) 60px;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background: var(--color-primary);
  z-index: 0;
}

.hero__bg-img {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 140%;
  object-fit: cover;
  object-position: center bottom;
  opacity: 0.6;
}

@media (min-width: 1200px) {
  .hero--home .hero__bg-img {
    height: 100%;
    object-position: right bottom;
    opacity: 1;
  }
}

.hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 770px;
}

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero__title {
  font-family: var(--font-heading);
  font-size: 48px;
  line-height: 1;
  text-transform: uppercase;
  color: var(--color-white);
}

.hero__desc {
  font-size: 18px;
  color: var(--color-white);
  line-height: 1.5;
}

.hero__disclaimer {
  font-size: 14px;
  color: var(--color-white);
  line-height: 1.5;
}

.hero .container {
  position: relative;
}

/* Banner strip */
.banner-strip {
  position: relative;
  z-index: 3;
  background: var(--color-primary);
  padding: 10px var(--section-pad-x);
  text-align: center;
}

.banner-strip p {
  font-family: var(--font-heading);
  font-size: 14px;
  color: var(--color-white);
  text-transform: uppercase;
  line-height: 1.4;
}

/* Sections */
.section {
  padding: var(--section-pad-y) var(--section-pad-x);
}

.section--white {
  background: var(--color-white);
}

.section__header {
  text-align: center;
  margin-bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Cards grid */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.card {
  background: var(--color-card);
  border-radius: var(--radius-md);
  padding: 15px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.card__icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  object-fit: cover;
}

.card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

/* Legend section */
.section--legend {
  position: relative;
  padding: 60px var(--section-pad-x);
  color: var(--color-white);
  overflow: hidden;
}

.section--legend::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to left, var(--color-bg), var(--color-primary));
  z-index: 0;
}

.section--legend__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2;
  z-index: 0;
}

.section--legend .container {
  position: relative;
  z-index: 1;
}

.legend-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.legend-grid__img {
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 605 / 340;
}

.legend-grid__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.legend-text {
  font-size: 18px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.legend-text p {
  margin-bottom: 1em;
}

/* Team */
.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.team-card__photo {
  border-radius: var(--radius-sm);
  overflow: hidden;
  height: 200px;
  margin-bottom: 7px;
}

.team-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.team-card__role {
  font-weight: 700;
  font-size: 16px;
}

.story-text {
  font-size: 18px;
  line-height: 1.5;
}

.story-text p {
  margin-bottom: 1em;
}

/* Kumo section */
.section--kumo {
  position: relative;
  padding: 60px var(--section-pad-x);
  color: var(--color-white);
  overflow: hidden;
}

.section--kumo::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to left, var(--color-bg), var(--color-primary));
  z-index: 0;
}

.section--kumo__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2;
  z-index: 0;
}

.kumo-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

.kumo-grid__photo {
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 1;
}

.kumo-grid__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kumo-grid__text {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.kumo-grid__text p {
  font-size: 18px;
  line-height: 1.5;
}

/* Games */
.balance-bar-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 10px;
}

.balance-bar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--color-primary);
  color: var(--color-white);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  max-width: 100%;
  white-space: normal;
  text-align: center;
  justify-content: center;
}

.balance-bar .crystal {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
}

.game-block {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 40px;
}

.game-block:last-child {
  margin-bottom: 0;
}

.game-stats {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-text);
  font-size: 16px;
}

.game-stats__col {
  min-width: 100px;
}

.game-stats__label {
  font-weight: 700;
  display: block;
}

.game-preview {
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 625 / 300;
}

.game-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-main-img {
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 405 / 720;
  max-width: 405px;
  margin: 0 auto;
}

.game-main-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Responsible blanket */
.blanket-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
}

.blanket-grid__img {
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 1;
  max-width: 400px;
  margin: 0 auto;
}

.blanket-grid__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blanket-grid__text {
  font-size: 18px;
  line-height: 1.6;
}

/* FAQ */
.section--faq {
  position: relative;
  overflow: hidden;
}

.section--faq__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2;
  pointer-events: none;
}

.faq-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.faq-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.faq-item {
  background: var(--color-card);
  border-radius: var(--radius-sm);
  padding: 25px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item__header {
  display: block;
}

.faq-item__title-wrap {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.faq-item__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  object-fit: contain;
  margin-top: 2px;
}

.faq-item__title {
  font-weight: 700;
  font-size: 20px;
  line-height: 1.3;
}

.faq-item__answer {
  font-size: 16px;
  line-height: 1.5;
  margin: 0;
}

/* Game modal */
.game-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.game-modal.is-open {
  display: flex;
}

body.game-open {
  overflow: hidden;
}

.game-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 12, 49, 0.88);
}

.game-modal__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1024px;
  height: min(85vh, 720px);
  background: #0a1a52;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
}

.game-modal__frame-wrap {
  flex: 1;
  width: 100%;
  min-height: 0;
  position: relative;
  overflow: hidden;
  background: #000;
}

.game-modal__frame {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 800px;
  height: 600px;
  border: 0;
  display: block;
  background: #000;
  transform-origin: center center;
  max-width: none;
  max-height: none;
}

.game-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.15);
  color: var(--color-white);
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}

.game-modal__close:hover {
  background: rgba(255, 255, 255, 0.28);
}

@media (max-width: 767px) {
  .game-modal {
    padding: 0;
  }

  .game-modal__dialog {
    max-width: none;
    height: 100%;
    border-radius: 0;
  }

  .game-modal__close {
    top: 8px;
    right: 8px;
  }
}

/* Footer */
.site-footer {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 40px var(--section-pad-x);
}

.site-footer__top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  margin-bottom: 40px;
}

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

.site-footer__legal {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
}

.site-footer__disclaimer {
  font-size: 14px;
  line-height: 1.5;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-bottom: 40px;
}

.site-footer__nav a {
  font-family: var(--font-heading);
  font-size: 12px;
  text-transform: uppercase;
}

.site-footer__divider {
  width: 100%;
  height: 1px;
  margin-bottom: 40px;
  opacity: 0.3;
}

.site-footer__responsible {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
}

.site-footer__responsible p {
  max-width: 309px;
  font-size: 16px;
}

.site-footer__links {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 20px;
}

.site-footer__links a {
  font-weight: 700;
  font-size: 16px;
  text-decoration: underline;
}

.site-footer__helpline {
  font-weight: 700;
  font-size: 16px;
  text-align: center;
  margin-bottom: 20px;
}

.site-footer__note {
  color: var(--color-muted);
  font-size: 16px;
  text-align: center;
  line-height: 1.5;
}

/* Legal pages */
.page-legal .hero {
  padding: 24px var(--section-pad-x) 48px;
}

.page-legal .site-header__inner {
  margin-bottom: 24px;
}

.page-legal .hero__content {
  gap: 0;
}

.page-legal .hero__title {
  font-size: 40px;
}

.legal-content {
  padding: 40px var(--section-pad-x);
}

.legal-content__updated {
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 40px;
}

.legal-content__body {
  font-size: 18px;
  line-height: 1.6;
  max-width: 100%;
}

.legal-content__body p {
  margin-bottom: 1em;
}

.legal-content__body ul {
  margin: 0 0 1em 36px;
  list-style: disc;
}

.legal-content__body a {
  text-decoration: underline;
}

.legal-content__body h2 {
  font-size: 18px;
  font-weight: 400;
  margin-bottom: 0.5em;
}

/* Tablet */
@media (min-width: 768px) {
  :root {
    --section-pad-x: 40px;
  }

  .logo__text {
    font-size: 20px;
  }

  .hero__title {
    font-size: 72px;
  }

  .btn-frost--game {
    font-size: 26px;
    padding: 12px 26px;
  }

  .balance-bar {
    font-size: 20px;
  }

  .hero__desc {
    font-size: 24px;
  }

  .banner-strip p {
    font-size: 20px;
  }

  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .legend-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

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

  .kumo-grid {
    grid-template-columns: 300px 1fr;
  }

  .kumo-grid__photo {
    margin: 0;
  }

  .game-block {
    grid-template-columns: 1fr 405px;
    align-items: start;
  }

  .blanket-grid {
    grid-template-columns: 400px 1fr;
  }

  .faq-grid {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer__top {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer__legal {
    align-items: flex-end;
    text-align: right;
  }

  .page-legal .hero {
    padding-bottom: 60px;
  }

  .page-legal .site-header__inner {
    margin-bottom: 32px;
  }

  .page-legal .hero__title {
    font-size: clamp(40px, 8vw, 64px);
    line-height: 1.05;
    word-break: break-word;
  }

  .legal-content__body {
    font-size: 24px;
  }
}

/* Mobile / tablet header — burger until nav fits */
@media (max-width: 1319px) {
  .site-header__inner {
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .logo {
    flex: 0 0 auto;
  }

  .nav-toggle {
    display: flex;
    margin-left: auto;
  }

  .main-nav {
    display: none;
    position: fixed;
    inset: 0;
    top: 0;
    z-index: 105;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 80px 20px 40px;
    background: rgba(21, 46, 136, 0.98);
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    font-size: 14px;
    text-align: center;
    white-space: normal;
  }
}

/* Desktop header — horizontal nav */
@media (min-width: 1320px) {
  .nav-toggle {
    display: none !important;
  }

  .site-header__inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 48px;
    align-items: center;
    justify-content: initial;
    margin-bottom: 48px;
  }

  .logo {
    grid-column: 1;
    grid-row: 1;
    flex: none;
    position: relative;
    z-index: 2;
  }

  .main-nav {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    position: static;
    inset: unset;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    flex: none;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 32px;
    padding: 0;
    margin: 0;
    background: none;
    z-index: 1;
    overflow: hidden;
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
    text-align: left;
  }
}

@media (min-width: 1440px) {
  .site-header__inner {
    column-gap: 56px;
  }

  .main-nav {
    gap: 56px;
  }
}

/* Desktop */
@media (min-width: 1200px) {
  :root {
    --section-pad-x: 100px;
  }

  .hero {
    padding: 40px var(--section-pad-x) 0;
    min-height: 620px;
  }

  .hero .container {
    position: relative;
    min-height: 560px;
    padding-bottom: 0;
  }

  body:not(.page-legal) .hero__content {
    max-width: 770px;
  }

  .hero__inner {
    display: block;
    position: relative;
    z-index: 1;
    min-height: auto;
    padding-bottom: 40px;
  }

  .hero__title {
    font-size: 96px;
  }

  .banner-strip p {
    font-size: 24px;
    white-space: nowrap;
  }

  .heading-xl {
    font-size: 40px;
  }

  .team-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .btn-frost {
    font-size: 32px;
    width: auto;
  }

  .btn-frost--game {
    font-size: 32px;
    padding: 14px 28px;
    min-width: 417px;
    align-self: flex-start;
    margin-left: 0;
    margin-right: 0;
  }

  .balance-bar {
    font-size: 20px;
    padding: 12px 28px;
  }

  .btn-frost .crystal {
    width: 50px;
    height: 50px;
  }

  .site-footer {
    padding: 40px 135px;
  }

  .page-legal .hero {
    min-height: auto;
    padding: 40px var(--section-pad-x) 100px;
  }

  .page-legal .hero .container {
    min-height: auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding-bottom: 0;
  }

  .page-legal .site-header__inner {
    margin-bottom: 0;
  }

  .page-legal .hero__title {
    font-size: 96px;
  }
}
