/* ============================================================
   TGC ACADEMY ON WHATSAPP - simulation styles
   (loads after styles.css + academy.css)
   ============================================================ */
:root {
  --wa-teal: #075E54;
  --wa-teal-2: #128C7E;
  --wa-green: #25D366;
  --wa-out: #D9FDD3;
  --wa-out-dark: #005C4B;
  --wa-bg: #E7DDD3;
  --wa-in: #FFFFFF;
  --wa-in-dark: #1F2C34;
  --wa-chat-dark: #0B141A;
  --wa-head-dark: #1F2C34;
}

.wa-page { min-height: 100vh; background: var(--bg); transition: background var(--t-slow); }

/* top mini nav */
.wa-nav { position: sticky; top: 0; z-index: 60; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.wa-nav .row { display: flex; align-items: center; gap: 1rem; height: 70px; }
.wa-nav .brand { display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0; }
.wa-nav .brand img { width: 36px; }
.wa-nav .brand .bn { line-height: 1.15; }
.wa-nav .brand b { font-family: var(--display); font-weight: 700; font-size: 0.92rem; display: block; white-space: nowrap; }
.wa-nav .brand em { font-style: normal; display: block; font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-2); font-weight: 600; margin-top: 2px; white-space: nowrap; }
.wa-nav .spacer { flex: 1; }

.wa-hero { padding: clamp(2.5rem, 5vw, 4rem) 0 1rem; }
.wa-hero .eyebrow { color: var(--wa-green); }
.wa-hero .eyebrow::before { background: var(--wa-green); }
.wa-hero h1 { font-family: var(--display); font-weight: 600; font-size: clamp(2rem, 4.5vw, 3.4rem); letter-spacing: -0.025em; margin-top: 1rem; max-width: 18ch; }
.wa-hero h1 .g { color: var(--wa-teal-2); }
[data-theme="dark"] .wa-hero h1 .g { color: var(--wa-green); }
.wa-hero p { color: var(--ink-2); font-size: clamp(1.05rem, 1.6vw, 1.25rem); margin-top: 1rem; max-width: 60ch; }

/* main layout */
.wa-main { display: grid; grid-template-columns: 390px 1fr; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; padding-bottom: 4rem; }
.wa-phone-col { position: sticky; top: 90px; }

/* ── iPhone frame ──────────────────────────────────────── */
.iphone { width: 390px; max-width: 100%; aspect-ratio: 390/800; margin: 0 auto; position: relative;
  background: #0a0a0a; border-radius: 54px; padding: 13px;
  box-shadow: 0 0 0 2px #2a2a2a, 0 30px 70px hsl(190 40% 10% / 0.35), inset 0 0 3px rgba(255,255,255,0.2); }
.iphone-screen { width: 100%; height: 100%; border-radius: 42px; overflow: hidden; position: relative; background: var(--wa-bg); display: flex; flex-direction: column; }
.island { position: absolute; top: 11px; left: 50%; transform: translateX(-50%); width: 116px; height: 33px; background: #000; border-radius: 20px; z-index: 30; }

/* status bar */
.wa-status { height: 50px; flex-shrink: 0; display: flex; align-items: flex-end; justify-content: space-between; padding: 0 26px 6px; font-size: 0.78rem; font-weight: 600; color: #fff; position: relative; z-index: 20; }
.wa-status.dark-text { color: #fff; }
.wa-status .sig { display: flex; align-items: center; gap: 5px; }
.wa-status .sig svg { width: 17px; height: 12px; }

/* chat header */
.wa-head { background: var(--wa-teal); color: #fff; padding: 6px 10px 10px; display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
[data-theme="dark"] .wa-head { background: var(--wa-head-dark); }
.wa-head .back { font-size: 1.5rem; line-height: 1; opacity: 0.95; }
.wa-head .ava { width: 38px; height: 38px; border-radius: 50%; background: #fff; display: grid; place-items: center; overflow: hidden; flex-shrink: 0; }
.wa-head .ava img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.wa-head .who { flex: 1; min-width: 0; }
.wa-head .who b { font-size: 0.92rem; font-weight: 600; display: block; line-height: 1.15; }
.wa-head .who span { font-size: 0.72rem; opacity: 0.85; }
.wa-head .hi { display: flex; gap: 16px; opacity: 0.95; }
.wa-head .hi svg { width: 19px; height: 19px; }

/* chat body */
.wa-chat { flex: 1; overflow-y: auto; padding: 12px 10px 6px; display: flex; flex-direction: column; gap: 4px;
  background-color: var(--wa-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='%23000' fill-opacity='0.025'%3E%3Cpath d='M14 16h4v4h-4zM34 6h3v3h-3zM58 22h5v5h-5zM24 44h4v4h-4zM50 50h3v3h-3zM68 60h4v4h-4zM8 64h3v3h-3zM44 70h4v4h-4z'/%3E%3C/g%3E%3C/svg%3E"); }
[data-theme="dark"] .wa-chat { background-color: var(--wa-chat-dark); }
.wa-chat::-webkit-scrollbar { width: 0; }

.wa-day { align-self: center; background: #FFF6D6; color: #54656f; font-size: 0.68rem; font-weight: 600; padding: 4px 11px; border-radius: 8px; margin: 6px 0; box-shadow: 0 1px 1px rgba(0,0,0,0.06); }
[data-theme="dark"] .wa-day { background: #182229; color: #8696a0; }
.wa-enc { align-self: center; text-align: center; background: #FFF6D6; color: #54656f; font-size: 0.64rem; padding: 6px 12px; border-radius: 8px; margin: 4px 18px 8px; line-height: 1.4; }
[data-theme="dark"] .wa-enc { background: #182229; color: #8696a0; }

.bubble { max-width: 80%; padding: 6px 9px 8px; border-radius: 9px; font-size: 0.85rem; line-height: 1.4; position: relative; box-shadow: 0 1px 0.5px rgba(0,0,0,0.13); word-wrap: break-word; animation: pop 0.25s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(0.98); } }
.bubble.in { align-self: flex-start; background: var(--wa-in); color: #111b21; border-top-left-radius: 2px; }
.bubble.out { align-self: flex-end; background: var(--wa-out); color: #111b21; border-top-right-radius: 2px; }
[data-theme="dark"] .bubble.in { background: var(--wa-in-dark); color: #e9edef; }
[data-theme="dark"] .bubble.out { background: var(--wa-out-dark); color: #e9edef; }
.bubble .t { font-size: 0.6rem; color: #667781; float: right; margin: 4px 0 -2px 8px; display: flex; align-items: center; gap: 3px; }
[data-theme="dark"] .bubble .t { color: #8696a0; }
.bubble .t svg { width: 14px; height: 11px; color: #53bdeb; }
.bubble b { font-weight: 600; }
.bubble .emoji { font-size: 1rem; }
.bubble.head-card { padding: 0; overflow: hidden; }

/* voice note bubble */
.wa-voice { display: flex; align-items: center; gap: 9px; min-width: 200px; padding: 3px 2px; }
.wa-voice .pp { width: 34px; height: 34px; border-radius: 50%; background: var(--wa-teal-2); color: #fff; display: grid; place-items: center; flex-shrink: 0; cursor: pointer; }
.wa-voice .pp svg { width: 16px; height: 16px; }
.wa-voice .track { flex: 1; height: 3px; background: #c8d0d2; border-radius: 3px; position: relative; }
.wa-voice .track i { position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 12px; height: 12px; border-radius: 50%; background: var(--wa-teal-2); }
.wa-voice .dur { font-size: 0.64rem; color: #667781; }

/* video card */
.wa-video { display: block; width: 240px; max-width: 100%; border-radius: 7px; overflow: hidden; position: relative; cursor: pointer; }
.wa-video .thumb { aspect-ratio: 16/9; background: linear-gradient(150deg, var(--teal-deep), #062a30); position: relative; display: grid; place-items: center; }
.wa-video .thumb img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.wa-video .pl { width: 46px; height: 46px; border-radius: 50%; background: rgba(0,0,0,0.55); display: grid; place-items: center; position: relative; z-index: 2; }
.wa-video .pl svg { width: 20px; height: 20px; color: #fff; margin-left: 2px; }
.wa-video .vt { padding: 7px 4px 2px; font-size: 0.78rem; color: inherit; }

/* certificate bubble */
.wa-cert { width: 250px; border-radius: 7px; overflow: hidden; }
.wa-cert .doc { background: #fbf9f4; border: 1px solid #e6e0d4; border-radius: 6px; padding: 14px; text-align: center; color: #16292B; }
.wa-cert .doc img { width: 40px; margin: 0 auto 6px; }
.wa-cert .doc .k { font-family: var(--display); font-size: 0.56rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--wa-teal); }
.wa-cert .doc .nm { font-family: var(--display); font-size: 1rem; font-weight: 600; color: var(--teal-deep); margin: 3px 0; }
.wa-cert .doc .ds { font-size: 0.64rem; color: #54656f; }
.wa-cert .meta { display: flex; align-items: center; gap: 7px; padding: 8px 4px 2px; font-size: 0.72rem; color: inherit; }
.wa-cert .meta svg { width: 22px; height: 22px; color: #d33; flex-shrink: 0; }

/* typing */
.wa-typing { align-self: flex-start; background: var(--wa-in); padding: 10px 14px; border-radius: 9px; border-top-left-radius: 2px; display: flex; gap: 4px; box-shadow: 0 1px 0.5px rgba(0,0,0,0.13); }
[data-theme="dark"] .wa-typing { background: var(--wa-in-dark); }
.wa-typing i { width: 7px; height: 7px; border-radius: 50%; background: #9aa6ac; animation: typing 1.2s infinite; }
.wa-typing i:nth-child(2) { animation-delay: 0.2s; } .wa-typing i:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing { 0%,60%,100% { opacity: 0.3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-4px); } }

/* quick replies + input */
.wa-foot { flex-shrink: 0; background: transparent; padding: 5px 8px 10px; }
.wa-qr { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; margin-bottom: 7px; }
.wa-qr button { background: var(--wa-in); color: var(--wa-teal-2); border: 1px solid rgba(7,94,84,0.25); font-family: var(--body); font-weight: 600; font-size: 0.8rem; padding: 7px 13px; border-radius: 18px; cursor: pointer; transition: var(--t-fast); box-shadow: 0 1px 2px rgba(0,0,0,0.08); }
.wa-qr button:hover { background: var(--wa-teal-2); color: #fff; }
[data-theme="dark"] .wa-qr button { background: var(--wa-in-dark); color: var(--wa-green); border-color: rgba(37,211,102,0.3); }
.wa-input { display: flex; align-items: center; gap: 7px; }
.wa-input .box { flex: 1; background: #fff; border-radius: 22px; padding: 9px 14px; font-size: 0.85rem; color: #111b21; display: flex; align-items: center; gap: 8px; box-shadow: 0 1px 1px rgba(0,0,0,0.08); }
[data-theme="dark"] .wa-input .box { background: var(--wa-in-dark); color: #e9edef; }
.wa-input .box input { flex: 1; border: none; background: none; outline: none; font: inherit; color: inherit; }
.wa-input .box input::placeholder { color: #8696a0; }
.wa-input .send { width: 42px; height: 42px; border-radius: 50%; background: var(--wa-teal-2); color: #fff; display: grid; place-items: center; flex-shrink: 0; cursor: pointer; transition: var(--t-fast); }
.wa-input .send:hover { background: var(--wa-teal); }
.wa-input .send svg { width: 19px; height: 19px; }

/* ── Right column ──────────────────────────────────────── */
.wa-side { display: flex; flex-direction: column; gap: 1.25rem; }
.sync-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.5rem; }
.sync-card .sh { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1.1rem; }
.sync-card .sh .live { width: 9px; height: 9px; border-radius: 50%; background: var(--wa-green); box-shadow: 0 0 0 0 rgba(37,211,102,0.5); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(37,211,102,0.5); } 70% { box-shadow: 0 0 0 8px rgba(37,211,102,0); } 100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); } }
.sync-card .sh b { font-family: var(--display); font-weight: 600; font-size: 1.05rem; }
.sync-card .sh span { font-size: 0.78rem; color: var(--muted); margin-left: auto; }
.sync-steps { display: flex; flex-direction: column; gap: 0.5rem; }
.sync-step { display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem 0.7rem; border-radius: var(--r-sm); font-size: 0.88rem; transition: var(--t); }
.sync-step .tick { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; flex-shrink: 0; color: var(--muted); }
.sync-step .tick svg { width: 12px; height: 12px; }
.sync-step.done { background: hsl(152 50% 45% / 0.08); }
.sync-step.done .tick { background: hsl(152 50% 45%); border-color: hsl(152 50% 45%); color: #fff; }
.sync-step.active { background: var(--orange-soft); }
.sync-step.active .tick { border-color: var(--accent-2); color: var(--accent-2); }
.sync-progress { height: 8px; border-radius: 99px; background: var(--bg-2); overflow: hidden; margin: 1rem 0 0.4rem; }
.sync-progress span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--wa-teal-2), var(--wa-green)); transition: width var(--t-slow); }

.drip-card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.4rem 1.5rem; }
.drip-card h4 { font-family: var(--display); font-weight: 600; font-size: 0.95rem; display: flex; align-items: center; gap: 0.5rem; }
.drip-card p { font-size: 0.85rem; color: var(--ink-2); margin: 0.5rem 0 1rem; }
.drip-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.link-card { display: flex; align-items: center; gap: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.1rem 1.3rem; }
.link-card .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; background: var(--orange-soft); color: var(--accent-2); }
.link-card .ic svg { width: 20px; height: 20px; }
.link-card b { font-family: var(--display); font-size: 0.95rem; display: block; }
.link-card span { font-size: 0.82rem; color: var(--muted); }

/* ── How it works ──────────────────────────────────────── */
.wa-how { padding: clamp(3rem, 6vw, 5rem) 0; border-top: 1px solid var(--line); }
.how-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; margin-top: 2.5rem; }
.how-step { position: relative; padding: 1.6rem; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.how-step .num { font-family: var(--display); font-weight: 600; font-size: 0.85rem; color: var(--wa-green); }
.how-step .hic { width: 46px; height: 46px; border-radius: 12px; background: var(--wa-teal); color: #fff; display: grid; place-items: center; margin: 0.9rem 0; }
.how-step .hic svg { width: 22px; height: 22px; }
.how-step h3 { font-family: var(--display); font-size: 1.1rem; font-weight: 600; }
.how-step p { font-size: 0.9rem; color: var(--ink-2); margin-top: 0.4rem; }

/* ── Developer blueprint ───────────────────────────────── */
.wa-blueprint { padding: clamp(3rem, 6vw, 5rem) 0; background: var(--bg-2); transition: background var(--t-slow); }
[data-theme="dark"] .wa-blueprint { background: #081A20; }
.bp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-top: 2.5rem; }
.bp-flow { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.75rem; }
.bp-flow h3 { font-family: var(--display); font-weight: 600; margin-bottom: 1.25rem; }
.flow-node { display: flex; align-items: flex-start; gap: 0.9rem; padding: 0.7rem 0; }
.flow-node .fn { width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; display: grid; place-items: center; font-family: var(--display); font-weight: 600; font-size: 0.85rem; }
.flow-node .fn.wa { background: var(--wa-teal); color: #fff; }
.flow-node .fn.srv { background: var(--ink); color: var(--bg); }
.flow-node .fn.db { background: var(--accent-2); color: #fff; }
.flow-node b { font-family: var(--display); font-size: 0.92rem; }
.flow-node p { font-size: 0.84rem; color: var(--ink-2); margin-top: 2px; }
.flow-arrow { text-align: center; color: var(--muted); font-size: 1.1rem; padding: 0.1rem 0; margin-left: 16px; }

.code-card { background: #0d1b21; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 0; overflow: hidden; }
.code-head { display: flex; align-items: center; gap: 0.5rem; padding: 0.8rem 1.1rem; background: #0a161b; border-bottom: 1px solid rgba(255,255,255,0.06); }
.code-head .dot { width: 11px; height: 11px; border-radius: 50%; }
.code-head .fn { margin-left: 0.6rem; font-family: var(--display); font-size: 0.78rem; color: #8696a0; }
.code-card pre { margin: 0; padding: 1.25rem; overflow-x: auto; font-family: 'SF Mono', ui-monospace, Menlo, monospace; font-size: 0.78rem; line-height: 1.65; color: #cfe3dd; }
.code-card .cm { color: #5a7a72; } .code-card .kw { color: #56d364; } .code-card .st { color: #7ee787; } .code-card .fn2 { color: #79c0ff; } .code-card .pr { color: #ffa657; }

.bp-table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.bp-table th { text-align: left; font-family: var(--display); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--line); }
.bp-table td { padding: 0.7rem 0.8rem; border-bottom: 1px solid var(--line); font-size: 0.86rem; vertical-align: top; }
.bp-table td b { font-family: var(--display); }

.wa-foot-cta { text-align: center; padding: clamp(3rem,6vw,4.5rem) 0; }
.wa-foot-cta h2 { font-family: var(--display); font-weight: 600; font-size: clamp(1.8rem,3.5vw,2.6rem); letter-spacing: -0.02em; }
.wa-foot-cta p { color: var(--ink-2); margin: 0.8rem auto 2rem; max-width: 50ch; }
.wa-foot-cta .row { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

@media (max-width: 1024px) {
  .wa-main { grid-template-columns: 1fr; }
  .wa-phone-col { position: static; }
  .how-grid { grid-template-columns: repeat(2, 1fr); }
  .bp-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .how-grid { grid-template-columns: 1fr; }
}
