/* SomLink Telecom brand system (Brand Guidelines 2026 v1.0) */
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/IBMPlexMonoMedium.ttf"); font-weight: 500; font-display: swap; }

:root {
  --purple: #4E1583;
  --purple-dark: #3A0F61;
  --magenta: #EC0F8C;
  --yellow: #FFD200;
  --charcoal: #3C3C3C;
  --gradient: linear-gradient(120deg, #4E1583 0%, #9C1C8C 55%, #EC0F8C 100%);

  --bg: #FAF7F4;
  --card: #FFFFFF;
  --text: var(--charcoal);
  --muted: #6F6A78;
  --line: #ECE6EF;
  --tint: #F1E9F6;
  --tint-pink: #FDE7F3;
  --danger: #D93043;

  --head: "Poppins", system-ui, sans-serif;
  --body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(58, 15, 97, .05), 0 8px 24px rgba(58, 15, 97, .06);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--body);
  background: #EEE8F1;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--head); color: var(--purple); }
[hidden] { display: none !important; }

.shell {
  max-width: 480px; min-height: 100%; margin: 0 auto;
  background: var(--bg);
  display: flex; flex-direction: column; position: relative;
}
@media (min-width: 520px) { .shell { box-shadow: 0 0 48px rgba(58, 15, 97, .12); } }

/* Inner-page top bar */
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top));
  background: rgba(250, 247, 244, .92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-title { flex: 1; margin: 0; font-size: 17px; font-weight: 600; text-align: center; }
.icon-btn {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center;
  border: 0; border-radius: 12px; background: transparent; color: var(--purple); cursor: pointer;
}
button.icon-btn:hover { background: var(--tint); }

.view { flex: 1; padding: 16px 16px 24px; }

/* Home hero */
.hero {
  position: relative; overflow: hidden;
  margin: -16px -16px 22px;
  padding: max(28px, env(safe-area-inset-top)) 22px 30px;
  background: var(--gradient);
  color: #fff;
  border-radius: 0 0 32px 32px;
}
.hero-shapes { position: absolute; inset: 0; pointer-events: none; }
.hero > *:not(.hero-shapes) { position: relative; }
.hero-logo {
  display: inline-flex; align-items: center;
  width: 84px; height: 84px; margin-bottom: 22px; overflow: hidden;
  background: #fff; border-radius: 20px;
}
.hero-logo img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.25); display: block; }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--yellow); margin-bottom: 8px; }
.hero h1 { margin: 0 0 10px; color: #fff; font-size: 30px; line-height: 1.12; font-weight: 800; letter-spacing: -.01em; }
.hero h1 em { font-style: normal; color: var(--yellow); }
.hero p { margin: 0; max-width: 30ch; font-size: 15px; line-height: 1.5; color: rgba(255, 255, 255, .86); }

.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 2px 12px; }
.section-head h2 { margin: 0; font-size: 18px; font-weight: 600; }
.section-head span { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* Bundle grid */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bundle {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  padding: 16px 14px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); box-shadow: var(--shadow);
  text-align: left; cursor: pointer; overflow: hidden;
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.bundle::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: var(--gradient); opacity: 0; transition: opacity .14s ease;
}
.bundle:hover { border-color: #DCCBE6; box-shadow: 0 2px 4px rgba(58, 15, 97, .06), 0 14px 30px rgba(58, 15, 97, .1); }
.bundle:hover::after { opacity: 1; }
.bundle:active { transform: scale(.98); }
.bundle:focus-visible { outline: 3px solid rgba(236, 15, 140, .35); outline-offset: 2px; }
.bundle-icon {
  width: 56px; height: 56px; border-radius: 16px; overflow: hidden;
  background: #fff; border: 1px solid var(--line); display: grid; place-items: center;
}
.bundle-icon img { width: 100%; height: 100%; object-fit: contain; }
.bundle-name { font-family: var(--head); font-weight: 600; font-size: 16px; color: var(--purple-dark); }
.bundle-meta { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.pill {
  display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 99px;
  background: var(--tint); color: var(--purple); font-family: var(--head); font-size: 11px; font-weight: 600; letter-spacing: .02em;
}
.pill-new { background: var(--gradient); color: #fff; }
.chev-wrap { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--tint-pink); color: var(--magenta); }

/* Bundle header on packages page */
.crumb {
  display: flex; align-items: center; gap: 14px; margin-bottom: 18px;
  padding: 14px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line);
}
.crumb img { width: 52px; height: 52px; border-radius: 14px; background: #fff; object-fit: contain; border: 1px solid var(--line); }
.crumb h2 { margin: 0; font-size: 20px; font-weight: 700; }
.crumb p { margin: 4px 0 0; }

/* Package list */
.list { display: flex; flex-direction: column; gap: 10px; }
.pkg {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 16px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); box-shadow: var(--shadow);
  text-align: left; cursor: pointer; transition: border-color .14s ease, transform .14s ease;
}
.pkg:hover { border-color: #DCCBE6; }
.pkg:active { transform: scale(.99); }
.pkg:focus-visible { outline: 3px solid rgba(236, 15, 140, .35); outline-offset: 2px; }
.pkg-body { flex: 1; min-width: 0; }
.pkg-size { font-family: var(--head); font-weight: 700; font-size: 20px; color: var(--purple); line-height: 1.1; }
.pkg-title { margin-top: 4px; font-size: 14px; line-height: 1.4; color: var(--muted); }
.pkg-title::first-letter { text-transform: uppercase; }
.pkg-body .pill { margin-top: 8px; }
.pkg-price { text-align: right; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.price-tag {
  display: inline-block; padding: 6px 12px; border-radius: 99px;
  background: var(--yellow); color: var(--purple-dark);
  font-family: var(--head); font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.old-price { font-family: var(--mono); font-size: 12px; color: var(--muted); text-decoration: line-through; }

/* Payment summary — hero banner pattern */
.summary {
  position: relative; overflow: hidden;
  padding: 18px 18px 16px; border-radius: var(--radius); margin-bottom: 22px;
  background: var(--gradient); color: #fff;
}
.summary .eyebrow { color: rgba(255, 255, 255, .8); margin-bottom: 6px; }
.summary .s-total { font-family: var(--head); font-size: 40px; font-weight: 800; line-height: 1; letter-spacing: -.01em; }
.summary .s-title { margin-top: 10px; font-family: var(--mono); font-size: 13px; color: rgba(255, 255, 255, .88); line-height: 1.5; }
.summary .s-title::first-letter { text-transform: uppercase; }

.methods { display: flex; flex-direction: column; gap: 10px; }
.method {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: 16px; background: var(--card); cursor: pointer;
  transition: border-color .14s ease, background .14s ease;
}
.method input { position: absolute; opacity: 0; pointer-events: none; }
.method img { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; background: #F4F1F6; }
.method span { flex: 1; font-weight: 600; color: var(--purple-dark); }
.radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #CFC4D8; display: grid; place-items: center; }
.method:has(input:checked) { border-color: var(--magenta); background: #FFF7FB; }
.method:has(input:checked) .radio { border-color: var(--magenta); }
.method:has(input:checked) .radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--magenta); }
.method:has(input:focus-visible) { outline: 3px solid rgba(236, 15, 140, .35); outline-offset: 2px; }

/* Footer + buttons */
.footer {
  position: sticky; bottom: 0; z-index: 4;
  padding: 12px 16px; padding-bottom: max(12px, env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 72%, rgba(250, 247, 244, 0));
}
.footer:empty { display: none; }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 54px; padding: 0 20px;
  border: 0; border-radius: 14px; cursor: pointer; text-decoration: none;
  font-family: var(--head); font-size: 16px; font-weight: 700;
  transition: filter .14s ease, transform .14s ease;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: scale(.99); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn:focus-visible { outline: 3px solid rgba(236, 15, 140, .4); outline-offset: 2px; }
.btn-buy { background: var(--yellow); color: var(--purple-dark); }
.btn-primary { background: var(--purple-dark); color: #fff; }
.btn-outline { background: var(--card); color: var(--purple); border: 2px solid var(--purple); }
.btn-outline svg { color: #25A55A; }

/* Bottom sheet */
.sheet-backdrop { position: fixed; inset: 0; z-index: 20; background: rgba(58, 15, 97, .45); animation: fade .18s ease; }
.sheet {
  position: fixed; z-index: 21; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 100%; max-width: 480px; max-height: 92vh; overflow: auto;
  padding: 10px 20px 20px; padding-bottom: max(20px, env(safe-area-inset-bottom));
  background: var(--bg); border-radius: 28px 28px 0 0;
  animation: rise .24s cubic-bezier(.2, .8, .2, 1);
}
.sheet::before { content: ""; display: block; width: 44px; height: 5px; margin: 0 auto 16px; border-radius: 99px; background: #DCD3E2; }
.sheet h3 { margin: 0 0 4px; font-size: 20px; font-weight: 700; }
.sheet .sub { margin: 0 0 20px; color: var(--muted); font-size: 14px; }
.sheet .sub b { color: var(--purple-dark); }
@keyframes rise { from { transform: translate(-50%, 100%); } }
@keyframes fade { from { opacity: 0; } }

.field { margin-bottom: 14px; }
.field label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: var(--purple-dark); }
.phone {
  display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 14px;
  background: #fff; transition: border-color .14s ease, box-shadow .14s ease;
}
.phone:focus-within { border-color: var(--purple); box-shadow: 0 0 0 4px rgba(78, 21, 131, .12); }
.phone .cc {
  align-self: stretch; display: grid; place-items: center; padding: 0 12px;
  border-right: 1.5px solid var(--line); font-family: var(--mono); color: var(--purple);
}
.phone input {
  flex: 1; min-width: 0; height: 52px; padding: 0 14px;
  border: 0; outline: 0; background: transparent; color: var(--charcoal);
  font-family: var(--mono); font-size: 17px; letter-spacing: .06em;
}
.field.invalid .phone { border-color: var(--danger); }
.err { margin-top: 6px; color: var(--danger); font-size: 13px; }
.err:empty { display: none; }
.hint { margin-top: 6px; color: var(--muted); font-size: 12px; }

/* Success */
.done { text-align: center; padding: 18px 6px 6px; }
.done-icon {
  width: 88px; height: 88px; margin: 0 auto 18px; border-radius: 50%;
  display: grid; place-items: center; background: var(--gradient); color: #fff;
}
.done h3 { font-size: 21px; margin-bottom: 10px; }
.done p { color: var(--muted); line-height: 1.6; margin: 0 0 22px; white-space: pre-line; }
.done .ref { font-family: var(--mono); font-size: 12px; margin-top: -12px; }

/* States */
.skeleton { border-radius: var(--radius); background: linear-gradient(90deg, #EFE8F2 25%, #F8F4F9 50%, #EFE8F2 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty strong { display: block; color: var(--purple); font-family: var(--head); margin-bottom: 6px; font-size: 16px; }
.empty .btn { margin-top: 16px; }

.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(58, 15, 97, .25); border-top-color: var(--purple-dark); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed; z-index: 30; left: 50%; bottom: 96px; transform: translateX(-50%);
  max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 12px;
  background: var(--purple-dark); color: #fff; font-size: 14px; box-shadow: var(--shadow);
  animation: fade .18s ease;
}

.fade-in { animation: fade .22s ease; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
