:root {
  --primary: #f18723;
  --secondary: #cc1977;
  --bg: #f9f9fb;
  --card-bg: #fff;
  --text: #222;
  --radius: 16px;
  --shadow: 0 4px 24px #0002;
  --header-offset: 96px;
}

html,
body {
  font-family: "Inter", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.header {
  background: var(--card-bg);
  box-shadow: var(--shadow);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 0.5rem 0;
  overflow: hidden;
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  padding: 0.75rem 1rem;
  width: 100%;
  min-height: auto;
  gap: 0.75rem;
  overflow: hidden;
  box-sizing: border-box;
}

.header h1 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 2rem;
  font-weight: 600;
  margin: 0;
  justify-content: flex-start;
  flex: 0 1 auto;
  min-width: 60px;
}

.header .header-contact {
  color: #fff;
  background: var(--secondary);
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
  flex: 0 0 auto;
  margin-left: auto;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  transition: all 0.15s;
  cursor: pointer;
  border: none;
  display: inline-block;
  white-space: nowrap;
  min-width: fit-content;
}

.header .header-contact:hover {
  background: #aa1566;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(204, 25, 119, 0.3);
}

.header .header-contact:active {
  transform: translateY(0);
}

.header .header-info {
  background: transparent;
  color: var(--secondary);
  border: 2px solid var(--secondary);
  font-weight: 700;
  font-size: 0.95rem;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  margin-left: 0.6rem;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.header .header-info:hover {
  background: var(--secondary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  border-color: transparent;
}

.header .header-info:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(204, 25, 119, 0.12);
}

.header img.logo {
  height: 50px;
  width: auto;
  border-radius: 0;
  box-shadow: none;
  background: none;
  max-width: 180px;
}

/* Header brand (uses footer logo) */
.header .header-logo {
  height: 44px;
  width: auto;
  max-width: 56px;
}

.header .brand-text {
  display: flex;
  flex-direction: column;
  margin-left: 0.5rem;
  align-items: flex-start;
}

.header .site-name {
  font-size: 1.05rem;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.header .site-sub {
  font-size: 0.68rem;
  color: rgba(34, 34, 34, 0.6);
  font-weight: 400;
  margin-top: 0.02rem;
}

.hero {
  text-align: center;
  margin: 2rem 0 1rem 0;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.hero h1 img.logo {
  height: 228px;
  width: auto;
  border-radius: 0;
  box-shadow: none;
  background: none;
  margin-bottom: 1.5rem;
  max-width: 90vw;
}

/* Brand + subtitle styling: compact, elegant and minimal */
.hero h1 .brand {
  font-size: 1.45rem;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-top: 0.15rem;
}

.hero h1 .subtitle {
  display: block;
  max-width: 720px;
  font-size: 0.78rem;
  color: rgba(34, 34, 34, 0.65);
  font-weight: 400;
  margin-top: 0.18rem;
  line-height: 1.2;
  letter-spacing: 0.03em;
}

.app-list {
  list-style: none;
  padding: 0 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px 16px;
  justify-content: center;
  margin: 2.5rem 0 2.5rem 0;
  row-gap: 20px;
}

.app-card {
  flex: 1 1 240px;
  max-width: 320px;
  min-width: 180px;
  background: var(--card-bg);
  padding: 28px 16px 20px 16px;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid #eee;
  margin: 0 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 130px;
  position: relative;
  overflow: hidden;
  /* Smooth, modern hover animation */
  transition:
    transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.28s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Fading gradient overlay for ultra-smooth hover */
.app-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 90%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Keep content above the overlay */
.app-card > * {
  position: relative;
  z-index: 1;
}

.app-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
  border-color: var(--primary);
  color: #fff;
}

.app-card:hover::before {
  opacity: 1;
}

.coming-soon {
  position: relative;
  pointer-events: none;
  opacity: 0.75;
}

.coming-soon::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.15);
  border-radius: inherit;
}

/* Ensure inner content adapts to the hover background */
.app-card:hover .icon,
.app-card:hover strong,
.app-card:hover span {
  color: #fff;
}

.app-card .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  font-size: 2.5rem;
  color: var(--primary);
}

.app-card a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  gap: 0.25rem;
  text-decoration: none;
  color: inherit;
}

.app-card strong {
  font-size: 1.2rem;
  color: var(--secondary);
  font-weight: 600;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.app-card span {
  display: block;
  color: #666;
  margin: 0;
  font-size: 1rem;
  white-space: normal;
  word-wrap: break-word;
  max-width: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wrapper {
  flex: 1 0 auto;
  padding-top: var(--header-offset);
}

.footer {
  flex-shrink: 0;
  width: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
  color: #fff;
  font-size: 1.05rem;
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: var(--shadow);
  padding: 2rem 0 1rem 0;
  text-align: center;
  letter-spacing: 0.02em;
  position: relative;
}

.footer .footer-logo {
  display: inline-block;
  vertical-align: middle;
  height: 36px;
  width: 36px;
  margin-right: 0.75rem;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px #0002;
  padding: 4px;
}

.footer .footer-copyright {
  font-weight: 500;
  font-size: 1.1rem;
  color: #fff;
  display: inline-block;
  vertical-align: middle;
}

.fade-out {
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.contact-modal-backdrop {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background: #0006;
  align-items: center;
  justify-content: center;
}

.contact-modal-backdrop.active {
  display: flex;
}

.contact-modal {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px #0003;
  padding: 1.2rem 1rem 1rem 1rem;
  min-width: 220px;
  max-width: 95vw;
  text-align: center;
  position: relative;
  animation: modalIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.contact-modal h2 {
  margin-top: 0;
  font-size: 1.2rem;
  color: var(--secondary);
  font-weight: 600;
}

.contact-modal .contact-options {
  margin: 1rem 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.contact-modal .contact-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  font-size: 0.98rem;
}

.contact-modal .contact-option a {
  color: var(--primary);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.98rem;
}

.contact-modal .contact-option a:hover {
  color: var(--secondary);
  text-decoration: underline;
}

.contact-modal .close-modal {
  position: absolute;
  top: 0.5rem;
  right: 0.7rem;
  background: none;
  border: none;
  font-size: 1.3rem;
  color: #888;
  cursor: pointer;
  transition: color 0.15s;
}

.contact-modal .close-modal:hover {
  color: var(--secondary);
}

.contact-modal .contact-note {
  margin-top: 1rem;
  margin-bottom: 0.2rem;
  color: #b00;
  font-size: 0.93rem;
  background: #fff6f6;
  border-radius: 7px;
  padding: 0.6em 0.7em;
  line-height: 1.4;
}

/* Updated modal styling - consolidated and enhanced */
.contact-modal-backdrop {
  display: none;
  position: fixed;
  z-index: 1100;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 1rem;
  transition: opacity 0.15s ease;
}

.contact-modal-backdrop.active {
  display: flex;
}

.contact-modal {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  padding: 1.4rem 1.2rem;
  min-width: 280px;
  max-width: 620px;
  width: calc(100% - 40px);
  text-align: left;
  position: relative;
  animation: modalIn 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-modal h2 {
  margin-top: 0;
  font-size: 1.15rem;
  color: var(--secondary);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.contact-modal p {
  color: #444;
  margin: 0 0 0.6rem 0;
  line-height: 1.45;
}

.contact-modal ul {
  margin: 0 0 0.8rem 1.2rem;
  color: #444;
  padding-left: 0.25rem;
}

.contact-modal .close-modal {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f4f4f6;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #666;
  cursor: pointer;
  transition:
    background 0.12s,
    color 0.12s;
}

.contact-modal .close-modal:hover {
  background: var(--secondary);
  color: #fff;
}

.visually-hidden {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

.contact-modal-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0 0 0.6rem 0;
  text-align: center;
}

.contact-modal-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--secondary);
  color: #fff;
  font-size: 1.1rem;
}

.info-modal-body {
  text-align: left;
  line-height: 1.45;
  padding: 0 0.2rem;
}

@media (max-width: 1024px) {
  :root {
    --header-offset: 88px;
  }

  .header-inner {
    max-width: 100%;
    padding: 0.6rem 0.5rem;
    gap: 0.5rem;
  }

  .header h1 {
    font-size: 1.5rem;
  }

  .header img.logo {
    height: 56px;
  }

  .header .header-contact {
    font-size: 0.95rem;
    padding: 0.55rem 1rem;
  }

  .hero h1 img.logo {
    height: 160px;
  }

  .hero h1 .brand {
    font-size: 1.3rem;
  }

  .hero h1 .subtitle {
    font-size: 0.74rem;
    max-width: 640px;
  }

  .app-list {
    gap: 18px 12px;
    padding: 0 12px;
  }

  .app-card {
    max-width: 100%;
    min-width: 0;
    padding: 20px 8px 12px 8px;
    min-height: 100px;
  }
}

@media (max-width: 700px) {
  :root {
    --header-offset: 78px;
  }

  .header-inner {
    flex-wrap: nowrap;
    padding: 0.5rem 0.4rem;
    gap: 0.3rem;
    width: calc(100% - 0.8rem);
  }

  .header h1 {
    font-size: 1.1rem;
    flex: 1 1 auto;
    min-width: 40px;
  }

  .header img.logo {
    height: 44px;
    max-width: 110px;
  }

  /* Keep header brand compact on smaller screens */
  .header .site-name {
    font-size: 0.98rem;
  }

  .header .site-sub {
    display: none;
  }

  .header .header-contact {
    font-size: 0.85rem;
    padding: 0.5rem 0.9rem;
    flex: 0 0 auto;
  }

  .hero h1 img.logo {
    height: 96px;
  }

  .hero h1 .brand {
    font-size: 1.12rem;
  }

  .hero h1 .subtitle {
    font-size: 0.72rem;
    max-width: 420px;
  }

  .app-list {
    flex-direction: column;
    gap: 8px;
    /* Reduce gap between cards */
    margin: 1rem 0;
    padding: 0 12px;
  }

  .app-card {
    max-width: calc(100% - 16px);
    min-width: 0;
    margin: 0 8px;
    padding: 3px 1px 2px 1px;
    /* Reduce vertical padding */
    min-height: 30px;
    /* Reduce min-height */
    flex-wrap: nowrap;
  }

  .app-card .icon {
    font-size: 2rem;
  }

  .app-card strong {
    font-size: 1.1rem;
  }

  .app-card span {
    font-size: 0.9rem;
  }

  .app-card a {
    justify-content: center;
    flex-wrap: nowrap;
  }

  .footer {
    font-size: 0.98rem;
    padding: 1.2rem 0 0.7rem 0;
  }

  .footer .footer-logo {
    height: 28px;
    width: 28px;
    margin-right: 0.5rem;
  }
}

@media (max-width: 400px) {
  :root {
    --header-offset: 66px;
  }

  .header-inner {
    flex-wrap: nowrap;
    padding: 0.4rem 0.3rem;
    gap: 0.2rem;
    width: calc(100% - 0.6rem);
  }

  .header h1 {
    font-size: 0.95rem;
    flex: 1 1 auto;
    min-width: 35px;
  }

  .header img.logo {
    height: 32px;
    max-width: 70px;
  }

  .header .site-name {
    font-size: 0.9rem;
  }

  .header .header-contact {
    font-size: 0.75rem;
    padding: 0.35rem 0.6rem;
    flex: 0 0 auto;
    margin-left: auto;
  }

  .hero h1 img.logo {
    height: 64px;
  }

  .hero h1 .brand {
    font-size: 1rem;
  }

  .hero h1 .subtitle {
    font-size: 0.68rem;
    max-width: 300px;
  }

  .app-card {
    padding: 4px 2px 3px 2px;
    min-height: 45px;
  }

  .app-card .icon {
    font-size: 1.8rem;
  }

  .app-card strong {
    font-size: 1rem;
  }

  .app-card span {
    font-size: 0.85rem;
  }

  .footer {
    font-size: 0.9rem;
  }
}

@keyframes snowfall {
  0% {
    transform: translateY(-10vh) translateX(0);
    opacity: 1;
  }

  90% {
    opacity: 1;
  }

  100% {
    transform: translateY(100vh) translateX(100px);
    opacity: 0;
  }
}

@keyframes sway {
  0%,
  100% {
    transform: translateX(0);
  }

  50% {
    transform: translateX(50px);
  }
}

.intro-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.35);

  z-index: 1200;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition:
    opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.8s ease;
}

.intro-overlay--active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.intro-overlay--fadeout {
  opacity: 0;
}

.intro-overlay-logo {
  max-width: min(420px, 70vw);
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  transform-origin: center;

  animation: logoCinematicReveal 4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes logoCinematicReveal {
  0% {
    opacity: 0;
    transform: scale(0.94) translateY(8px);
  }

  20% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }

  70% {
    opacity: 1;
    transform: scale(1.015) translateY(-2px);
  }

  85% {
    opacity: 0.6;
    transform: scale(1.025) translateY(-4px);
  }

  100% {
    opacity: 0;
    transform: scale(1.04) translateY(-6px);
  }
}

.intro-active {
  overflow: hidden;
}

/* Utility classes */
.link-unstyled {
  text-decoration: none;
  color: inherit;
}

.text-center {
  text-align: center;
}

.heading-section {
  font-weight: 600;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.section-description {
  color: #666;
  font-size: 1.1rem;
}
