/* MOGAMBO — the page /instaleaza (instaleaza.html + js/install.js): one view per kind of phone,
   the drawn iPhone, the QR code for computers, benefits and questions. Only this page loads it.
   Tokens from tokens.css, .mg-ico and --mg-pop from dock.css. */
/* ================= page ================= */

body.ins-page {
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(80% 50% at 50% -8%, rgba(200, 160, 97, 0.16), transparent 64%),
    radial-gradient(60% 40% at 100% 100%, rgba(200, 160, 97, 0.06), transparent 70%),
    var(--bg);
  padding-bottom: var(--dock-space);
}
.ins-skip {
  position: absolute; left: 12px; top: -60px; z-index: calc(var(--z-header) + 1); max-width: calc(100% - 24px);
  padding: 10px 16px; border-radius: var(--r-pill); background: var(--brass-grad); color: var(--on-brass);
  font-weight: 800; text-decoration: none; white-space: nowrap; overflow: hidden; transition: top 0.2s var(--ease);
}
.ins-skip:focus { top: calc(12px + var(--safe-t)); }

.ins-header {
  position: relative; z-index: var(--z-header);
  padding: calc(14px + var(--safe-t)) max(var(--gutter), env(safe-area-inset-right, 0px)) 14px max(var(--gutter), env(safe-area-inset-left, 0px));
}
.ins-header-inner { max-width: 1040px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ins-brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; min-width: 0; text-decoration: none; color: var(--text); border-radius: var(--r-sm); }
.ins-brand-logo { height: 40px; width: auto; max-width: min(100%, 50vw, 220px); object-fit: contain; }
.ins-brand-name {
  font-family: var(--font-display); font-size: 22px; letter-spacing: 0.08em; text-transform: uppercase;
  line-height: var(--anton-lh); margin-block: calc((1 - var(--anton-lh)) * 0.5em);
}
.ins-back {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; max-width: 58%; padding: 4px 16px 4px 12px;
  border-radius: var(--r-pill); border: 1px solid var(--line-2); background: rgba(239, 226, 204, 0.04);
  color: var(--text-2); font-size: 14px; font-weight: 700; line-height: 1.3; text-decoration: none; overflow-wrap: anywhere;
}
.ins-back .mg-ico { width: 18px; height: 18px; transition: transform 0.3s var(--mg-pop); }
@media (hover: hover) {
  .ins-back:hover { color: var(--text); border-color: var(--line-3); background: rgba(239, 226, 204, 0.08); }
  .ins-back:hover .mg-ico { transform: translateX(-3px); }
}
@media (max-width: 420px) { .ins-brand-name { display: none; } }

.ins-main {
  max-width: calc(1040px + 2 * var(--gutter)); margin: 0 auto; outline: none;
  padding: 8px max(var(--gutter), env(safe-area-inset-right, 0px)) 40px max(var(--gutter), env(safe-area-inset-left, 0px));
  display: grid; gap: clamp(20px, 4vw, 36px);
}

/* hero */
.ins-hero { display: grid; justify-items: center; text-align: center; gap: 14px; padding-top: clamp(8px, 3vw, 28px); }
.ins-icon-stage { position: relative; width: 148px; height: 148px; display: grid; place-items: center; margin-bottom: 6px; }
.ins-icon {
  position: relative; width: 128px; height: 128px; border-radius: 30px;
  box-shadow: 0 0 0 1px rgba(239, 226, 204, 0.14), 0 22px 48px rgba(0, 0, 0, 0.65), 0 0 60px rgba(200, 160, 97, 0.18);
  animation: ins-float 5s ease-in-out infinite;
}
.ins-icon-ring {
  position: absolute; inset: 0; border-radius: 40px; border: 1px solid rgba(200, 160, 97, 0.35);
  animation: ins-ring 2.8s var(--ease-out) infinite;
}
@keyframes ins-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes ins-ring { 0% { transform: scale(0.86); opacity: 0.9; } 100% { transform: scale(1.18); opacity: 0; } }

.ins-kicker { color: var(--brass-2); font-size: 13px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; }
.ins-title {
  font-family: var(--font-display); font-size: clamp(40px, 9vw, 76px); text-transform: uppercase; letter-spacing: 0.01em;
  line-height: var(--anton-lh); max-width: 14ch; overflow-wrap: anywhere;
}
.ins-text { color: var(--text-2); max-width: 54ch; font-size: clamp(15.5px, 1.2vw, 17.5px); }

.ins-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 30px; border: 0; border-radius: var(--r-pill);
  background: var(--brass-grad); color: var(--on-brass); font-weight: 800; font-size: 16.5px; letter-spacing: 0.01em;
  text-decoration: none; box-shadow: 0 10px 30px rgba(200, 160, 97, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.25s var(--mg-pop), box-shadow 0.25s var(--ease);
  -webkit-tap-highlight-color: transparent; overflow-wrap: anywhere; line-height: 1.25; text-align: center;
}
.ins-btn .mg-ico { width: 21px; height: 21px; stroke-width: 2.2; }
.ins-btn:active { transform: scale(0.97); }
@media (hover: hover) { .ins-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(200, 160, 97, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.35); } }
.ins-btn--ghost { background: rgba(239, 226, 204, 0.05); color: var(--text); border: 1px solid var(--line-2); box-shadow: none; }
@media (hover: hover) { .ins-btn--ghost:hover { background: rgba(239, 226, 204, 0.1); box-shadow: none; } }
.ins-btn--sm { min-height: 48px; padding: 0 20px; font-size: 15px; }
.ins-hero .ins-btn:not(.ins-btn--ghost) { width: min(100%, 360px); }

/* on a phone the steps must start on the first screen: a smaller hero */
@media (max-width: 560px) {
  .ins-hero { gap: 10px; padding-top: 0; }
  .ins-icon-stage { width: 92px; height: 92px; margin-bottom: 0; }
  .ins-icon { width: 80px; height: 80px; border-radius: 19px; }
  .ins-icon-ring { border-radius: 26px; }
  .ins-title { font-size: clamp(34px, 10vw, 44px); }
  .ins-text { font-size: 15px; }
  .ins-main { gap: 20px; }
}

/* ================= the views (one is shown) ================= */
.ins-card {
  background: linear-gradient(180deg, rgba(239, 226, 204, 0.045), rgba(239, 226, 204, 0.015)), var(--bg-2);
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(20px, 3.4vw, 32px);
  display: grid; gap: 16px; justify-items: start;
}
.ins-card[hidden], .ins-section[hidden], .ins-other[hidden] { display: none; }
.ins-view { width: 100%; max-width: 760px; justify-self: center; animation: ins-in 0.35s var(--ease-out) both; }
@keyframes ins-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.ins-h2 { font-family: var(--font-display); font-size: clamp(24px, 3.4vw, 32px); text-transform: uppercase; letter-spacing: 0.02em; line-height: var(--anton-lh); }
.ins-h2--center { text-align: center; }
.ins-note, .ins-card p { color: var(--text-2); }
.ins-prompt { display: grid; gap: 10px; width: 100%; justify-items: start; }
.ins-prompt[hidden], .ins-manual[hidden] { display: none; }
.ins-prompt .ins-btn { width: min(100%, 380px); }
.ins-play { width: min(100%, 380px); }
.ins-play[hidden] { display: none; }
.ins-manual { display: grid; gap: 12px; width: 100%; }
.ins-manual.is-secondary { opacity: 0.85; }

/* numbered steps */
.ins-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; width: 100%; }
.ins-step {
  display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 14px; padding: 12px 14px;
  border-radius: var(--r); border: 1px solid var(--line); background: rgba(239, 226, 204, 0.025);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), transform 0.3s var(--mg-pop);
}
.ins-step-n {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg-4); border: 1px solid var(--line-2); color: var(--brass-2); font-weight: 800; font-size: 15px;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.ins-step-text { color: var(--text); line-height: 1.5; }
.ins-steps--live .ins-step { cursor: pointer; }
.ins-steps--live .ins-step.is-on { border-color: color-mix(in srgb, var(--brass) 55%, transparent); background: rgba(200, 160, 97, 0.08); }
.ins-steps--live .ins-step.is-on .ins-step-n { background: var(--brass-grad); color: var(--on-brass); border-color: transparent; }

.ins-tip { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); background: rgba(78, 161, 255, 0.07); border: 1px solid rgba(78, 161, 255, 0.25); }
.ins-tip .mg-ico { width: 20px; height: 20px; color: #7ab8ff; margin-top: 2px; }
.ins-tip p { color: var(--text); margin: 0; }

/* in-app browser: an arrow up to the ⋯ / ⋮ menu of Instagram & co. */
/* no entry animation here: a transform on the card would pin the arrow to the card, not to the screen */
.ins-inapp { border-color: color-mix(in srgb, var(--warn) 45%, transparent); animation: none; }
.ins-inapp-arrow {
  position: fixed; top: calc(6px + var(--safe-t)); right: 14px; z-index: 5; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; background: var(--brass-grad); color: var(--on-brass); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: ins-nudge 1.4s var(--ease) infinite;
}
.ins-inapp-arrow .mg-ico { width: 24px; height: 24px; stroke-width: 2.4; }
@keyframes ins-nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
body:not([data-ins-current="inapp"]) .ins-inapp-arrow { display: none; }

/* computer: the big QR code */
.ins-desktop { grid-template-columns: auto 1fr; align-items: center; gap: clamp(20px, 3vw, 36px); }
.ins-desktop-text { display: grid; gap: 10px; justify-items: start; }
.ins-qr { width: clamp(220px, 26vw, 300px); aspect-ratio: 1; padding: 10px; border-radius: var(--r); background: #f1e8d9; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45); }
.ins-qr svg { width: 100%; height: 100%; display: block; }
@media (max-width: 640px) { .ins-desktop { grid-template-columns: 1fr; justify-items: center; text-align: center; } .ins-desktop-text { justify-items: center; } }

/* inside the installed app */
.ins-installed { justify-items: center; text-align: center; }
.ins-done-title { color: var(--ok); font-weight: 800; font-size: clamp(20px, 3vw, 24px); }
.ins-done-btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.ins-push { width: 100%; padding-top: 16px; border-top: 1px solid var(--line); }
.ins-push[hidden] { display: none; }

/* "another phone?" */
.ins-other { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; color: var(--text-3); font-size: 14.5px; }
.ins-other-btns { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.ins-chip {
  min-height: 40px; padding: 0 16px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: transparent;
  color: var(--text-2); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer;
}
.ins-chip[aria-pressed="true"] { background: var(--bg-4); color: var(--text); border-color: var(--line-3); }
@media (hover: hover) { .ins-chip:hover { color: var(--text); border-color: var(--line-3); } }

/* ================= the drawn iPhone (Safari) ================= */
.ins-ios-grid { display: grid; grid-template-columns: auto 1fr; gap: clamp(18px, 4vw, 40px); align-items: center; width: 100%; }
@media (max-width: 560px) { .ins-ios-grid { grid-template-columns: 1fr; justify-items: center; } }
.ins-phone {
  --w: 200px; width: var(--w); aspect-ratio: 9 / 18.5; border-radius: 34px; padding: 9px;
  background: linear-gradient(160deg, #3a352f, #15130f); box-shadow: 0 0 0 1px rgba(239, 226, 204, 0.15), 0 24px 60px rgba(0, 0, 0, 0.6);
}
.ins-phone-screen { position: relative; height: 100%; border-radius: 26px; overflow: hidden; background: #f4efe7; color: #1d1a16; font-size: 11px; }
.ins-phone-page { position: absolute; inset: 34px 14px 70px; display: grid; align-content: start; gap: 8px; }
.ins-phone-line { height: 8px; border-radius: 4px; background: #d8cfc1; width: 70%; }
.ins-phone-line--wide { width: 100%; height: 12px; background: #1d1a16; }
.ins-phone-line--short { width: 45%; }
.ins-phone-block { height: 70px; border-radius: 10px; background: linear-gradient(135deg, #e6d3b0, #c8a061); margin-top: 6px; }
.ins-phone-bar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 58px; padding: 0 12px 10px; display: flex; align-items: center; gap: 8px;
  background: rgba(248, 245, 240, 0.96); border-top: 1px solid #e2dacd;
}
.ins-phone-url { flex: 1; height: 28px; border-radius: 9px; background: #e7e0d5; display: grid; place-items: center; font-weight: 700; color: #4a443c; }
.ins-phone-share { position: relative; width: 30px; height: 30px; display: grid; place-items: center; color: #0a7aff; }
.ins-phone-share .mg-ico { width: 22px; height: 22px; stroke-width: 2; }
.ins-phone-sheet {
  position: absolute; left: 6px; right: 6px; bottom: 6px; padding: 10px 8px; border-radius: 16px; background: #fff;
  box-shadow: 0 -6px 30px rgba(0, 0, 0, 0.18); display: grid; gap: 6px; transform: translateY(110%); transition: transform 0.5s var(--ease-out);
}
.ins-phone-row { position: relative; height: 30px; border-radius: 8px; background: #f1ece4; display: flex; align-items: center; gap: 6px; padding: 0 8px; font-weight: 700; white-space: nowrap; overflow: hidden; }
.ins-phone-row .mg-ico { width: 18px; height: 18px; flex: none; }
.ins-phone-row--add { background: #fff; border: 1px solid #e2dacd; }
.ins-phone-dialog {
  position: absolute; inset: 0; background: #f4efe7; display: grid; align-content: start; gap: 16px; padding: 14px 12px;
  transform: translateY(100%); transition: transform 0.5s var(--ease-out);
}
.ins-phone-dialog-top { display: flex; justify-content: space-between; align-items: center; padding-top: 16px; }
.ins-phone-cancel { width: 40px; height: 8px; border-radius: 4px; background: #c9c0b2; }
.ins-phone-confirm { position: relative; color: #0a7aff; font-size: 12px; }
.ins-phone-app { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: #fff; }
.ins-phone-app img { width: 44px; height: 44px; border-radius: 11px; }
.ins-phone-appname { font-weight: 800; font-size: 13px; }
/* the round "tap here" mark */
.ins-tap { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; pointer-events: none; opacity: 0; }
.ins-tap::before, .ins-tap::after { content: ''; position: absolute; inset: 0; border-radius: 50%; }
.ins-tap::before { background: rgba(200, 160, 97, 0.45); }
.ins-tap::after { border: 2px solid var(--brass); animation: ins-tap 1.4s var(--ease-out) infinite; }
@keyframes ins-tap { 0% { transform: scale(0.6); opacity: 1; } 100% { transform: scale(1.7); opacity: 0; } }
.ins-phone-row--add .ins-tap { left: auto; right: 10px; margin-left: 0; }
/* step 1: tap Share · 2: the sheet, tap the row · 3: the dialog, tap Adaugă · 4: done */
.ins-phone[data-step="1"] .ins-phone-share .ins-tap,
.ins-phone[data-step="2"] .ins-phone-row--add .ins-tap,
.ins-phone[data-step="3"] .ins-phone-confirm .ins-tap { opacity: 1; }
.ins-phone[data-step="2"] .ins-phone-sheet { transform: none; }
.ins-phone[data-step="3"] .ins-phone-dialog, .ins-phone[data-step="4"] .ins-phone-dialog { transform: none; }
.ins-phone[data-step="4"] .ins-phone-app { box-shadow: 0 0 0 3px rgba(31, 164, 99, 0.5); }

/* ================= benefits, questions ================= */
.ins-section { display: grid; gap: 16px; }
.ins-benefits { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.ins-benefit {
  position: relative; padding: 18px 18px 18px 20px; border-radius: var(--r-lg); border: 1px solid var(--line);
  background: var(--bg-2); display: grid; gap: 6px; overflow: hidden;
}
.ins-benefit::before { content: ''; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 3px; background: var(--brass-grad); }
.ins-benefit-title { font-family: var(--font-body); font-weight: 800; font-size: 17px; line-height: 1.3; }
.ins-benefit p { color: var(--text-2); font-size: 15px; line-height: 1.5; }

.ins-faq { display: grid; gap: 8px; max-width: 760px; width: 100%; justify-self: center; }
.ins-q { border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2); }
.ins-q summary {
  list-style: none; cursor: pointer; padding: 14px 44px 14px 16px; font-weight: 800; position: relative; min-height: 48px;
  display: flex; align-items: center; border-radius: var(--r);
}
.ins-q summary::-webkit-details-marker { display: none; }
.ins-q summary::after {
  content: ''; position: absolute; right: 18px; top: 50%; width: 9px; height: 9px; margin-top: -7px;
  border-right: 2px solid var(--brass-2); border-bottom: 2px solid var(--brass-2); transform: rotate(45deg); transition: transform 0.25s var(--ease);
}
.ins-q[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.ins-q p { padding: 0 16px 16px; color: var(--text-2); line-height: 1.55; margin: 0; }

.ins-help { text-align: center; color: var(--text-3); font-size: 14px; }

/* the credit at the very bottom (same look as the site's footer) */
.ins-foot { display: flex; justify-content: center; padding: 8px var(--gutter) calc(24px + var(--dock-space, 0px)); }
.powered-by { display: inline-flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 13px; text-decoration: none; }
.powered-by img { height: 18px; width: auto; opacity: 0.8; transition: opacity 0.2s var(--ease); }
@media (hover: hover) { .powered-by:hover img { opacity: 1; } .powered-by:hover { color: var(--text-2); } }
body.ins-page { padding-bottom: 0; }

@media (prefers-reduced-motion: reduce) {
  .ins-view, .ins-icon, .ins-icon-ring, .ins-inapp-arrow, .ins-tap::after { animation: none !important; }
  .ins-phone-sheet, .ins-phone-dialog, .ins-step { transition: none; }
}

/* inside the installed app (standalone): room for the phone's status bar */
@media (display-mode: standalone) {
  .ins-header { padding-top: calc(10px + var(--safe-t)); }
}
