/* Shanudha Tirosh — STX Enterprises Mobile & Desktop Responsive Design System */
:root {
  --bg: #ffffff;
  --bg-subtle: #f8fafc;
  --surface: #ffffff;
  --card-bg: #ffffff;
  --border: #e2e8f0;
  --border-hover: #cbd5e1;
  
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-border: #bfdbfe;
  
  --whatsapp: #16a34a;
  --whatsapp-hover: #15803d;
  --whatsapp-light: #f0fdf4;
  --whatsapp-border: #bbf7d0;
  
  --ink: #0f172a;           /* Black text */
  --ink-secondary: #334155; /* Dark charcoal */
  --muted: #64748b;
  --ok: #16a34a;
  --accent: #2563eb;
  
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 4px 10px -2px rgba(15, 23, 42, 0.04);
  --shadow-blue: 0 8px 20px -4px rgba(37, 99, 235, 0.28);
  
  --font: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

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

html { -webkit-text-size-adjust: 100%; color-scheme: light; }

body {
  margin: 0;
  background: var(--bg-subtle);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  min-height: 100vh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

h1, h2, h3, p, ol, ul { margin: 0; }
[hidden] { display: none !important; }
svg { width: 1.25em; height: 1.25em; flex: none; }

.skip {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--primary); color: #fff; padding: .6rem 1rem; border-radius: 10px; z-index: 10;
  text-decoration: none; font-weight: 600;
}
.skip:focus { top: 1rem; }

:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 10px; }

/* Layout */
.page {
  width: 100%;
  max-width: 70rem;
  margin: 0 auto;
  padding: 1.75rem 1rem 3rem;
}

/* Intro Header */
.intro {
  text-align: center;
  margin-bottom: 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.device-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  border-radius: 50px;
  color: var(--primary-dark);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 0.75rem;
}

.device-dot {
  width: 8px; height: 8px;
  background: var(--primary);
  border-radius: 50%;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.lead {
  margin: 0.65rem auto 0;
  max-width: 44ch;
  color: var(--ink-secondary);
  font-size: 1.05rem;
  font-weight: 450;
}

/* Main Grid Layout */
.layout {
  display: grid;
  gap: 1.5rem;
}

.side {
  display: grid;
  gap: 1.5rem;
  align-content: start;
}

/* Clean White Card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: var(--border-hover);
}

/* Identity Section */
.contact-card {
  display: grid;
  gap: 1.25rem;
}

.identity {
  display: flex;
  align-items: center;
  gap: 1.15rem;
}

.avatar-wrapper {
  position: relative;
  width: 5.25rem;
  height: 5.25rem;
  flex: none;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.status-indicator {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 1.15rem;
  height: 1.15rem;
  background: var(--whatsapp);
  border: 3px solid #ffffff;
  border-radius: 50%;
}

.identity-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.identity-info h2 {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.org-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--primary-dark);
  font-size: 0.95rem;
  font-weight: 700;
}

.inline-icon {
  width: 1em; height: 1em;
}

.status-text {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.15rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--whatsapp);
}

.dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--whatsapp);
}

/* Hero Save Box */
.save-box {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--primary-light);
  border: 1.5px solid var(--primary-border);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  text-align: center;
}

.save-subtext {
  font-size: 0.85rem;
  color: var(--ink-secondary);
  font-weight: 500;
}

/* Info List */
.info-list {
  display: grid;
  gap: 0.65rem;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.85rem;
}

.info-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary);
  display: grid;
  place-items: center;
  flex: none;
}

.info-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.info-label {
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.info-value {
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.info-value.mono {
  font-family: var(--mono);
}

a.info-value:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.inline-ext {
  width: 0.8em; height: 0.8em;
  margin-left: 0.2rem;
  opacity: 0.75;
}

/* Icon Buttons (Copy) */
.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.35rem;
  padding: 0 0.75rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  flex: none;
}

.icon-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary-border);
  color: var(--primary-dark);
}

.icon-btn:active {
  transform: scale(0.96);
}

.icon-btn.done {
  color: var(--ok);
  background: var(--whatsapp-light);
  border-color: var(--whatsapp-border);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3.15rem;
  padding: 0 1.15rem;
  width: 100%;
  font: inherit;
  font-weight: 700;
  font-size: 0.975rem;
  text-decoration: none;
  text-align: center;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(0.98);
}

.btn-hero {
  min-height: 3.5rem;
  font-size: 1.05rem;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: var(--shadow-blue);
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 10px 25px -4px rgba(37, 99, 235, 0.4);
}

.btn-whatsapp {
  background: var(--whatsapp);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.25);
}

.btn-whatsapp:hover {
  background: var(--whatsapp-hover);
}

.btn-secondary {
  background: #ffffff;
  color: var(--ink);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: var(--border-hover);
}

.btn-small {
  min-height: 2.65rem;
  font-size: 0.875rem;
}

.btn-full {
  width: 100%;
}

.section-subtitle {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.65rem;
}

.actions-section {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.15rem;
}

.btn-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

.share-row {
  margin-top: 0.15rem;
}

.text-link {
  background: none;
  border: 0;
  padding: 0.25rem 0;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  text-align: left;
}

/* Success Card */
.success {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: var(--whatsapp-light);
  border: 1px solid var(--whatsapp-border);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  animation: slideUp 0.25s ease-out;
}

.tick {
  width: 1.85rem;
  height: 1.85rem;
  flex: none;
  border-radius: 50%;
  background: var(--ok);
  color: #fff;
  display: grid;
  place-items: center;
}

.success-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
}

.success-text {
  color: var(--ink-secondary);
  font-size: 0.875rem;
  margin-top: 0.1rem;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* QR Code Card */
.qr-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.qr-header h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink);
}

.qr-desc {
  font-size: 0.85rem;
  color: var(--ink-secondary);
  margin-top: 0.15rem;
}

.qr-container {
  padding: 0.75rem;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.qr {
  width: 10rem;
  height: 10rem;
}

.qr svg {
  width: 100%;
  height: 100%;
  display: block;
}

.url {
  font-family: var(--mono);
  font-size: 0.825rem;
  color: var(--primary-dark);
  background: var(--primary-light);
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  border: 1px solid var(--primary-border);
}

.qr-actions {
  display: flex;
  gap: 0.65rem;
  width: 100%;
}

.qr-actions .btn {
  flex: 1;
}

/* How-To Section */
.howto {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.howto-header {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.howto-header h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink);
}

.tab-group {
  display: flex;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
}

.tab-btn {
  flex: 1;
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 0.35rem 0.45rem;
  font: inherit;
  font-size: 0.825rem;
  font-weight: 700;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tab-btn.active {
  background: #ffffff;
  color: var(--primary-dark);
  box-shadow: var(--shadow-sm);
}

.howto-steps {
  padding-left: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.875rem;
  color: var(--ink-secondary);
}

.howto-steps li::marker {
  color: var(--primary);
  font-weight: 800;
}

.howto-steps b {
  color: var(--ink);
}

.howto-note {
  background: var(--primary-light);
  border-left: 3px solid var(--primary);
  padding: 0.6rem 0.75rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.825rem;
  color: var(--ink-secondary);
}

.howto-note code {
  font-family: var(--mono);
  color: var(--primary-dark);
}

/* Sticky Mobile Save Action Bar */
.mobile-sticky-bar {
  display: none;
}

/* Modal Dialog */
.modal {
  border: 0;
  border-radius: var(--radius-lg);
  padding: 0;
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.2);
  max-width: 26rem;
  width: 92%;
}

.modal::backdrop {
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
}

.modal-content {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink);
}

.close-btn {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.close-btn:hover {
  color: var(--ink);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.modal-step {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: var(--bg-subtle);
  padding: 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.step-num {
  width: 1.75rem;
  height: 1.75rem;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.85rem;
  flex: none;
}

.step-text strong {
  color: var(--ink);
  font-size: 0.9rem;
  display: block;
}

.step-text p {
  color: var(--ink-secondary);
  font-size: 0.825rem;
  margin-top: 0.1rem;
}

/* Footer */
.foot {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 2.5rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--border);
}

.foot-sub {
  font-size: 0.775rem;
  margin-top: 0.2rem;
}

/* Responsive Media Queries */
@media (max-width: 42rem) {
  .page {
    padding: 1.25rem 0.85rem 5.5rem;
  }
  
  .intro h1 {
    font-size: 1.85rem;
  }

  .lead {
    font-size: 0.95rem;
  }

  .card {
    padding: 1.15rem;
    border-radius: 16px;
  }

  .avatar-wrapper {
    width: 4.5rem;
    height: 4.5rem;
  }

  .identity-info h2 {
    font-size: 1.35rem;
  }

  .mobile-sticky-bar {
    display: block;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    padding: 0.65rem 0.85rem calc(0.65rem + env(safe-area-inset-bottom));
    z-index: 99;
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
  }

  .mobile-sticky-bar .btn {
    min-height: 3.35rem;
    font-size: 1rem;
  }
}

@media (min-width: 42.01rem) {
  .btn-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 62rem) {
  .page {
    padding-top: 3rem;
  }
  .layout {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 1.75rem;
    align-items: start;
  }
}
