:root {
  --bg: #f7f8fb;
  --header-bg: #eef2f6;
  --footer-bg: #f6f8fa;
  --surface: #fbfcfd;
  --text: #0f1728;
  --muted: #667085;
  --muted-soft: #7c8797;
  --line: #d8e0ea;
  --line-soft: #e7edf3;
  --shadow-soft: 0 12px 28px rgba(15, 23, 40, 0.045);
  --shadow-hover: 0 18px 36px rgba(15, 23, 40, 0.075);
  --radius-card: 24px;
  --container: 1380px;
  --a2-blue: #5faee6;
  --a2-blue-dark: #4d9bd7;
  --a2-orange: #ebaa1f;
  --dev-bg: #fff8ea;
  --dev-line: #edd29a;
  --dev-text: #8d5a00;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #fcfcfd 0%, var(--bg) 100%);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.site-header,
.site-footer {
  width: 100%;
}

.site-header {
  background: var(--header-bg);
  border-bottom: 1px solid #edf2f7;
}

.site-footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--line-soft);
  margin-top: auto;
}

.container,
.site-main {
  width: min(calc(100% - 40px), var(--container));
  margin: 0 auto;
}

.site-main {
  flex: 1;
}

.header-inner {
  padding: 24px 0 20px;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-logo {
  max-height: 60px;
  width: auto;
}

.brand-fallback {
  display: none;
  font-size: clamp(1.85rem, 4vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.05em;
}

.dev-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fffdf7 0%, var(--dev-bg) 100%);
  border: 1px solid var(--dev-line);
  color: var(--dev-text);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 8px 18px rgba(143, 93, 0, 0.065);
  white-space: nowrap;
  max-width: 100%;
}

.dev-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #d97706;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.hero {
  padding: 34px 0 14px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.95rem, 4vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.hero p {
  margin: 14px 0 0;
  max-width: 68ch;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.65;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
  padding: 34px 0 46px;
}

.app-link {
  grid-column: span 4;
  min-width: 0;
}

.app-card {
  position: relative;
  height: 100%;
  min-height: 152px;
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) 38px;
  align-items: stretch;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
  border: 1px solid #d6dfe8;
  box-shadow: var(--shadow-soft);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.app-link:hover .app-card,
.app-link:focus-visible .app-card {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: #cbd4de;
}

.app-tile {
  position: relative;
  display: grid;
  place-items: center;
  padding: 10px;
  min-height: 100%;
  text-align: center;
  background: linear-gradient(180deg, var(--tile-bg, var(--a2-blue)) 0%, var(--tile-bg-2, var(--a2-blue-dark)) 100%);
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-card) 0 0 var(--radius-card);
  overflow: hidden;
}

.app-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0) 60%);
  pointer-events: none;
}

.app-code {
  position: relative;
  z-index: 1;
  font-size: clamp(1.95rem, 3vw, 2.55rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  color: var(--tile-text, var(--a2-orange));
  text-shadow:
    -1px -1px 0 rgba(0,0,0,0.6),
     1px -1px 0 rgba(0,0,0,0.6),
    -1px  1px 0 rgba(0,0,0,0.6),
     1px  1px 0 rgba(0,0,0,0.6),
     0    2px 5px rgba(0,0,0,0.14);
}

.app-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px 16px 16px 18px;
}

.app-title {
  margin: 0;
  font-size: 1.42rem;
  line-height: 1.1;
  letter-spacing: -0.045em;
}

.app-description {
  margin: 10px 0 0;
  color: #475467;
  font-size: 0.98rem;
  line-height: 1.52;
}

.app-domain {
  margin: 10px 0 0;
  color: var(--muted-soft);
  font-size: 0.82rem;
  line-height: 1.4;
  word-break: break-word;
}

.app-arrow-wrap {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 14px;
}

.app-arrow {
  width: 27px;
  height: 27px;
  border-radius: 999px;
  border: 1px solid #bcc6d1;
  color: #334155;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.72);
}

.footer-inner {
  padding: 15px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.footer-brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.footer-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.12;
}

.footer-brand-name {
  font-weight: 800;
  font-size: 1rem;
}

.footer-brand-tag {
  color: #6b7280;
  font-size: 0.83rem;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.77rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.lang-switch a { color: var(--muted); }
.lang-switch a.active { color: var(--text); font-weight: 800; }

.center-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.center-card {
  width: min(100%, 520px);
  background: white;
  border-radius: 24px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  padding: 32px;
  text-align: center;
}
.center-card h1 {
  margin: 0 0 10px;
  letter-spacing: -0.04em;
}
.center-card p {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.65;
}
.center-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--a2-blue-dark);
  color: white;
  font-weight: 700;
}

@media (max-width: 1180px) {
  .app-link { grid-column: span 6; }
}

@media (max-width: 820px) {
  .header-inner { padding: 18px 0 18px; }
  .brand-row { align-items: flex-start; flex-direction: column; gap: 12px; }
  .brand-logo-wrap {
    gap: 12px;
    flex-direction: column;
    align-items: flex-start;
  }
  .brand-logo { max-height: 54px; }
  .dev-badge {
    white-space: normal;
    line-height: 1.25;
  }
}

@media (max-width: 760px) {
  .container, .site-main { width: min(calc(100% - 28px), var(--container)); }
  .hero { padding-top: 26px; }
  .apps-grid { gap: 14px; padding-top: 26px; padding-bottom: 30px; }
  .app-link { grid-column: span 12; }
  .app-card { grid-template-columns: 96px minmax(0, 1fr) 32px; min-height: 142px; }
  .app-content { padding: 16px 14px 15px 16px; }
  .app-title { font-size: 1.22rem; }
  .app-description { font-size: 0.92rem; }
  .app-domain { font-size: 0.79rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
}

@media (max-width: 460px) {
  .container, .site-main { width: min(calc(100% - 32px), var(--container)); }
  .header-inner { padding: 16px 0; }
  .brand-logo { max-height: 46px; }
  .dev-badge {
    font-size: 0.71rem;
    padding: 7px 11px;
  }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 0.95rem; line-height: 1.6; }
  .apps-grid { padding-top: 24px; padding-bottom: 26px; }
  .app-card { grid-template-columns: 88px minmax(0, 1fr) 30px; min-height: 136px; }
  .app-code { font-size: 1.85rem; }
  .app-content { padding: 14px 12px 13px 14px; }
  .app-title { font-size: 1.12rem; }
  .app-description { font-size: 0.88rem; }
  .footer-inner { padding: 14px 0 16px; }
}

/* ===== Desktop/LG refinement only ===== */
@media (min-width: 1200px) {
  .brand-logo {
    max-height: 48px !important;
  }

  .dev-badge {
    padding: 7px 11px !important;
    font-size: 0.68rem !important;
    letter-spacing: 0.05em !important;
  }

  .hero {
    padding: 22px 0 6px !important;
  }

  .hero h1 {
    font-size: clamp(1.65rem, 3.2vw, 2.25rem) !important;
    letter-spacing: -0.05em !important;
  }

  .hero p {
    margin-top: 10px !important;
    font-size: 0.9rem !important;
    line-height: 1.55 !important;
    max-width: 60ch !important;
  }

  .apps-grid {
    gap: 14px !important;
    padding: 24px 0 34px !important;
  }

  .app-card {
    min-height: 124px !important;
    grid-template-columns: 94px minmax(0, 1fr) 32px !important;
    border-radius: 20px !important;
  }

  .app-tile {
    border-radius: 20px 0 0 20px !important;
  }

  .app-code {
    font-size: clamp(1.55rem, 2.4vw, 2rem) !important;
  }

  .app-content {
    padding: 14px 14px 13px 14px !important;
  }

  .app-title {
    font-size: 1.14rem !important;
    line-height: 1.08 !important;
  }

  .app-description {
    margin-top: 8px !important;
    font-size: 0.82rem !important;
    line-height: 1.42 !important;
  }

  .app-domain {
    margin-top: 7px !important;
    font-size: 0.72rem !important;
    line-height: 1.3 !important;
  }

  .app-arrow-wrap {
    padding-top: 11px !important;
    padding-right: 8px !important;
  }

  .app-arrow {
    width: 23px !important;
    height: 23px !important;
  }

  .footer-inner {
    padding: 11px 0 !important;
  }

  .footer-brand img {
    width: 25px !important;
    height: 25px !important;
  }

  .footer-brand-name {
    font-size: 0.88rem !important;
  }

  .footer-brand-tag {
    font-size: 0.74rem !important;
  }

  .lang-switch {
    font-size: 0.69rem !important;
    gap: 8px !important;
  }
}

/* ===== Mobile: give the arrow more breathing room ===== */
@media (max-width: 760px) {
  .app-card {
    grid-template-columns: 96px minmax(0, 1fr) 36px !important;
  }

  .app-arrow-wrap {
    padding-top: 12px !important;
    padding-right: 8px !important;
    justify-content: flex-end !important;
  }

  .app-arrow {
    width: 24px !important;
    height: 24px !important;
  }
}