/* =====================================================================
   IpQuery.Info landing page — hero tour, code tabs, how-to cards
   ---------------------------------------------------------------------
   Loaded after geo-yak-style.css. Same layout as the YakDrop / YakTimer /
   YakCharts landings (copy + CTAs left, the narrated tour right with chapter
   buttons that seek it, then how-to cards linking into the synced /docs
   tutorials), adapted for a developer tool: a terminal stands in for the tour
   until it is deployed, and a tabbed request/response block follows the hero.

   Font sizes are rem; headings use clamp() so they scale with the viewport
   (the html 100% / body 1rem baseline comes from yakware-style.css). The hero
   panel and the code blocks are dark in BOTH themes, so their ink is fixed
   light; everything else uses theme tokens. Contrast ratios noted are against
   the darkest panel stop (#0b1a24) unless stated.
   ===================================================================== */

/* ── Hero ── */
.gq-hero { padding: 40px 0 0; }

.gq-hero__panel {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,.1);
    background: linear-gradient(160deg, #10324a 0%, #0b1f30 46%, #071219 100%);
    padding: clamp(28px, 4.5vw, 64px) clamp(20px, 4vw, 56px) clamp(24px, 3vw, 40px);
    color: #dfe7ee;
}
.gq-hero__panel::before {               /* emerald glow behind the player + a faint grid */
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(46% 58% at 78% 32%, rgba(47,163,124,.28), transparent 70%),
        radial-gradient(38% 46% at 8% 0%, rgba(56,189,248,.12), transparent 70%),
        linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 100% 32px;
}
.gq-hero__grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
    gap: clamp(28px, 4vw, 60px);
    align-items: center;
}
.gq-hero__copy { min-width: 0; }

.gq-eyebrow {
    margin: 0 0 1rem;
    font-family: var(--font-mono);
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #7ee0b8;                     /* 10.6:1 */
}
.gq-hero h1 {
    margin: 0 0 1.1rem;
    color: #f4f7f5;
    font-weight: 500;
    font-size: clamp(2.2rem, 1.2rem + 2.9vw, 3.75rem);
    line-height: 1.04;
    letter-spacing: -.015em;
}
.gq-hero h1 .accent { color: #7ee0b8; font-style: italic; }
.gq-lead {
    margin: 0 0 1.4rem;
    max-width: 36rem;
    font-size: clamp(1.05rem, .98rem + .3vw, 1.25rem);
    line-height: 1.6;
    color: #c4d0da;                     /* 11:1 */
}

.gq-outcomes {
    list-style: none;
    margin: 0 0 1.75rem;
    padding: 0;
    display: grid;
    gap: .85rem;
}
.gq-outcomes li {
    display: grid;
    grid-template-columns: 2.25rem minmax(0, 1fr);
    gap: .8rem;
    align-items: start;
    font-size: 1rem;
    line-height: 1.5;
    color: #aebdca;                     /* 8.6:1 */
}
.gq-outcomes b { display: block; color: #f4f7f5; font-weight: 600; }
.gq-outcomes__ic {
    width: 2.25rem; height: 2.25rem;
    display: grid; place-items: center;
    border-radius: 10px;
    background: rgba(47,163,124,.18);
    border: 1px solid rgba(126,224,184,.32);
    color: #a7f0d2;
    font-size: 1rem;
}

.gq-ctas { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.gq-ctas--center { justify-content: center; }
/* style.css gives this shared button a 30px/65px margin for the old centred heroes. */
.gq-ctas .marketing-free-trial-btn { margin: 0 !important; min-height: 48px; font-size: 1.05rem; padding: 0 28px; }
.gq-btn-ghost,
.gq-btn-ghost:focus {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 9px;
    border: 1px solid rgba(255,255,255,.36);
    color: #f4f7f5 !important;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.05rem;
    text-decoration: none;
}
.gq-btn-ghost:hover {
    color: #a7f0d2 !important;
    border-color: #7ee0b8;
    background: rgba(255,255,255,.05);
    text-decoration: none;
}
.gq-hero a:focus-visible,
.gq-tour__chapter:focus-visible,
.gq-tour__transcript summary:focus-visible,
.gq-close a:focus-visible {
    outline: 3px solid #fbbf24;
    outline-offset: 2px;
}
.gq-fine {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem 1.25rem;
    margin: 1.1rem 0 0;
    font-size: .9375rem;
    color: #aebdca;
}
.gq-fine span::before { content: "\2713\00a0"; color: #86efac; }

/* ── Tour player ── */
.gq-tour { min-width: 0; }
.gq-tour__player {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    overflow: hidden;
    background: #061018;
    border: 1px solid rgba(255,255,255,.14);
    box-shadow: 0 30px 70px -30px rgba(0,0,0,.7), 0 0 0 6px rgba(255,255,255,.04);
}
.gq-tour__video { display: block; width: 100%; height: 100%; object-fit: contain; background: #061018; }
.gq-tour__badge {
    position: absolute;
    left: 12px; top: 12px;
    display: inline-flex; align-items: center; gap: .45rem;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(4,16,22,.84);
    color: #fff;
    font-size: .8125rem;
    font-weight: 600;
    pointer-events: none;
    transition: opacity .2s ease;
}
.gq-tour.is-playing .gq-tour__badge { opacity: 0; }

.gq-tour__chapters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}
.gq-tour__chapter {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    flex: 1 1 auto;
    min-height: 52px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.05);
    color: #e6edf2;
    font-family: var(--font-body);
    text-align: left;
    white-space: normal;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease;
}
.gq-tour__chapter span { font-size: .75rem; font-family: var(--font-mono); color: #b4c3cf; }
.gq-tour__chapter b { font-size: .875rem; font-weight: 600; line-height: 1.25; white-space: nowrap; }
.gq-tour__chapter:hover { background: rgba(255,255,255,.10); border-color: rgba(126,224,184,.6); }
.gq-tour__chapter.is-active {
    background: #0f7a5a;                /* white ink 5.4:1 */
    border-color: #2fa37c;
    color: #fff;
}
.gq-tour__chapter.is-active span { color: #e3fbf1; }

.gq-tour__transcript { margin-top: 12px; font-size: .9375rem; color: #c4d0da; }
.gq-tour__transcript summary { cursor: pointer; color: #a7f0d2; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.gq-tour__transcript ol { margin: .25rem 0 0; padding-left: 0; list-style: none; display: grid; gap: .45rem; line-height: 1.5; }
.gq-tour__transcript li span { display: inline-block; min-width: 2.6rem; color: #7ee0b8; font-family: var(--font-mono); font-size: .875rem; }

/* ── Terminal (hero fallback until the tour is deployed) ── */
.gq-term {
    border-radius: 16px;
    overflow: hidden;
    background: #061018;
    border: 1px solid rgba(255,255,255,.14);
    box-shadow: 0 30px 70px -30px rgba(0,0,0,.7), 0 0 0 6px rgba(255,255,255,.04);
}
.gq-term__bar {
    display: flex; align-items: center; gap: 7px;
    padding: 10px 14px;
    background: rgba(255,255,255,.05);
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.gq-term__bar span { width: 11px; height: 11px; border-radius: 50%; background: #3b4a55; }
.gq-term__bar em { margin-left: 8px; font-style: normal; font-family: var(--font-mono); font-size: .75rem; color: #8fa3b2; }
.gq-term__body,
.gq-codebox pre {
    margin: 0;
    padding: 18px 20px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #d6e2ea;
    font-family: var(--font-mono);
    font-size: .875rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-x: auto;
}
.gq-term__body code,
.gq-codebox pre code { background: none; color: inherit; padding: 0; font-size: inherit; white-space: inherit; }
.gq-c-prompt { color: #7ee0b8; user-select: none; }
.gq-c-dim { color: #8fa3b2; }
.gq-c-key { color: #93c5fd; }           /* 9.9:1 */
.gq-c-str { color: #a7f0d2; }
.gq-c-num { color: #fcd34d; }
.gq-c-lit { color: #f9a8d4; }

/* ── Stats strip ── */
.gq-stats {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    margin-top: clamp(1.5rem, 3vw, 2.4rem);
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.1);
}
.gq-stat { padding: 18px 20px; background: rgba(6,18,26,.72); }
.gq-stat b {
    display: block;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.25rem);
    line-height: 1.1;
    color: #f4f7f5;
}
.gq-stat span { font-size: .9375rem; color: #aebdca; }

/* ── Code section ── */
.gq-code__grid {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    gap: clamp(28px, 4vw, 60px);
    align-items: start;
}
.gq-code h2,
.gq-learn__head h2 { margin: 0 0 .75rem; font-size: clamp(1.75rem, 1.2rem + 1.9vw, 2.75rem); line-height: 1.1; }
.gq-checks { list-style: none; margin: 1.25rem 0; padding: 0; display: grid; gap: .7rem; }
.gq-checks li {
    position: relative;
    padding-left: 1.75rem;
    font-size: 1.0625rem;
    line-height: 1.55;
    color: var(--text-muted);
}
.gq-checks li::before {
    content: "\2713";
    position: absolute; left: 0; top: 0;
    font-weight: 700;
    color: var(--accent-ink);
}
.gq-checks b { color: var(--text); font-weight: 600; }
.gq-code__copy code,
.gq-field code,
.gq-use code {
    font-family: var(--font-mono);
    font-size: .875em;
    padding: .1em .35em;
    border-radius: 5px;
    background: var(--accent-tint);
    color: var(--text);
}
.gq-code__links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin: 0; font-size: 1.0625rem; font-weight: 600; }
.gq-code__links a,
.gq-more a,
.gq-learn__all a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }

.gq-codebox {
    min-width: 0;
    border-radius: 16px;
    overflow: hidden;
    background: #061018;
    border: 1px solid #1d3442;
    box-shadow: var(--shadow-md);
}
.gq-codebox__tabs {
    display: flex;
    align-items: stretch;
    gap: 2px;
    padding: 6px 6px 0;
    background: #0b1a24;
    border-bottom: 1px solid #1d3442;
}
.gq-codebox__tab,
.gq-codebox__copy {
    min-height: 44px;
    padding: 0 16px;
    border: 0;
    border-radius: 8px 8px 0 0;
    background: transparent;
    color: #b4c3cf;
    font-family: var(--font-body);
    font-size: .9375rem;
    font-weight: 600;
    cursor: pointer;
}
.gq-codebox__tab:hover { color: #fff; background: rgba(255,255,255,.05); }
.gq-codebox__tab.is-active { color: #fff; background: #061018; box-shadow: inset 0 2px 0 #2fa37c; }
.gq-codebox__copy { margin-left: auto; border-radius: 8px; margin-bottom: 6px; min-height: 38px; color: #a7f0d2; }
.gq-codebox__copy:hover { background: rgba(126,224,184,.12); }
.gq-codebox__tab:focus-visible,
.gq-codebox__copy:focus-visible,
.gq-codebox__pane:focus-visible { outline: 3px solid #fbbf24; outline-offset: -3px; }
.gq-codebox__pane[hidden] { display: none; }
.gq-codebox__out { border-top: 1px solid #1d3442; background: #08151e; }
.gq-codebox__label {
    display: flex; flex-wrap: wrap; gap: .25rem .75rem; align-items: baseline;
    padding: 12px 20px 0;
    font-size: .8125rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #b4c3cf;
}
.gq-codebox__label span { font-family: var(--font-mono); font-weight: 500; letter-spacing: 0; text-transform: none; color: #7ee0b8; }
.gq-codebox__note { margin: 0; padding: 0 20px 16px; font-size: .875rem; line-height: 1.5; color: #9fb0bd; }   /* 7.4:1 */
.gq-codebox .gq-codebox__note code { background: rgba(255,255,255,.08) !important; color: #d6e2ea !important; padding: .05em .3em; border-radius: 4px; }

/* ── How-to cards (synced /docs tutorials) ── */
.gq-learn__head {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 16px 48px;
    align-items: end;
    margin-bottom: 32px;
}
.gq-learn__head h2 { margin: 0; }
.gq-learn__head p { margin: 0; color: var(--text-muted); font-size: 1.0625rem; line-height: 1.6; }
.gq-howto {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}
.gq-howto__card,
.gq-howto__card:hover,
.gq-howto__card:focus {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 14px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    box-shadow: var(--card-shadow);
    color: var(--text);
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.gq-howto__card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow-md); }
.gq-howto__card:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.gq-howto__thumb {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    background: var(--surface-2);
    border-bottom: 1px solid var(--surface-border-soft);
}
.gq-howto__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.gq-howto__dur {
    position: absolute;
    right: 10px; bottom: 10px;
    display: inline-flex; align-items: center; gap: .35rem;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(4,16,22,.86);
    color: #fff;
    font-size: .8125rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.gq-howto__meta { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px 18px; flex: 1; }
.gq-howto__meta small {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--accent-ink);
}
.gq-howto__meta b { font-size: 1.0625rem; font-weight: 600; line-height: 1.35; color: var(--text); }
.gq-howto__go { margin-top: auto; padding-top: 8px; font-size: .9375rem; font-weight: 600; color: var(--accent-ink); }
.gq-howto__card:hover .gq-howto__go { text-decoration: underline; text-underline-offset: 3px; }
.gq-home .sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.gq-learn__all { margin: 28px 0 0; font-size: 1.0625rem; font-weight: 600; }

/* ── Response field groups ── */
.gq-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.gq-field {
    display: flex; flex-direction: column;
    padding: 22px;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    box-shadow: var(--card-shadow);
}
.gq-field__icon {
    width: 2.5rem; height: 2.5rem;
    display: grid; place-items: center;
    margin-bottom: 14px;
    border-radius: 10px;
    background: var(--accent-tint);
    color: var(--accent-ink);
    font-size: 1.1rem;
}
.gq-field h3 { margin: 0 0 .5rem; font-size: clamp(1.15rem, 1.05rem + .3vw, 1.3rem); line-height: 1.25; }
.gq-field p { margin: 0 0 .75rem; color: var(--text-muted); font-size: 1rem; line-height: 1.55; }
.gq-field__keys { margin-top: auto !important; display: flex; flex-wrap: wrap; gap: 6px; }
.gq-more { margin: 24px 0 0; font-size: 1.0625rem; font-weight: 600; }
.gq-more--center { text-align: center; }

/* ── Use cases ── */
.gq-uses { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.gq-use,
.gq-use:hover,
.gq-use:focus {
    display: flex; flex-direction: column; gap: .5rem;
    padding: 22px;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    color: var(--text);
    text-decoration: none;
    transition: border-color .2s ease, transform .2s ease;
}
.gq-use:hover { border-color: var(--accent); transform: translateY(-2px); }
.gq-use:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.gq-use .fa { font-size: 1.35rem; color: var(--accent-ink); }
.gq-use b { font-size: 1.125rem; line-height: 1.3; }
.gq-use span { color: var(--text-muted); font-size: 1rem; line-height: 1.55; }
.gq-use em { margin-top: auto; padding-top: .5rem; font-style: normal; font-weight: 600; font-size: .9375rem; color: var(--accent-ink); }
.gq-use:hover em { text-decoration: underline; text-underline-offset: 3px; }

/* ── Keys + trust ── */
.gq-trust { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 60px); align-items: center; }
.gq-trust h2 { font-size: clamp(1.75rem, 1.2rem + 1.9vw, 2.75rem); line-height: 1.1; }
.gq-trust__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.gq-trust__list li {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 16px 18px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-muted);
}
.gq-trust__list .fa {
    width: 2.5rem; height: 2.5rem;
    display: grid; place-items: center;
    border-radius: 10px;
    background: var(--accent-tint);
    color: var(--accent-ink);
    font-size: 1.05rem;
}
.gq-trust__list b { color: var(--text); font-weight: 600; }

/* ── Closing CTA ── */
.gq-close__panel {
    text-align: center;
    padding: clamp(32px, 5vw, 64px) clamp(20px, 4vw, 48px);
    border-radius: 24px;
    background: linear-gradient(160deg, #10324a 0%, #0b1f30 60%, #071219 100%);
    color: #dfe7ee;
}
.gq-close__panel h2 { margin: 0 0 .75rem; color: #f4f7f5; font-size: clamp(1.75rem, 1.2rem + 1.9vw, 2.75rem); line-height: 1.1; }
.gq-close__panel p { margin: 0 auto 1.5rem; max-width: 36rem; font-size: 1.125rem; color: #c4d0da; }

/* ── Responsive ── */
@media (max-width: 1100px) {
    .gq-howto { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gq-fields, .gq-uses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
    .gq-hero__grid, .gq-code__grid, .gq-trust { grid-template-columns: minmax(0, 1fr); }
    .gq-lead { max-width: none; }
    .gq-learn__head { grid-template-columns: minmax(0, 1fr); align-items: start; }
    .gq-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .gq-hero { padding-top: 20px; }
    .gq-hero__panel, .gq-close__panel { border-radius: 18px; }
    .gq-fields, .gq-uses { grid-template-columns: minmax(0, 1fr); }
    .gq-term__body, .gq-codebox pre { font-size: .8125rem; padding: 14px; }
    .gq-codebox__tab { padding: 0 11px; font-size: .875rem; }
    .gq-codebox__copy span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
    /* One column of compact rows: thumbnail left, title right. */
    .gq-howto { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .gq-howto__card, .gq-howto__card:hover, .gq-howto__card:focus { flex-direction: row; align-items: stretch; }
    .gq-howto__thumb { flex: 0 0 42%; aspect-ratio: auto; min-height: 6.5rem; border-bottom: 0; border-right: 1px solid var(--surface-border-soft); }
    .gq-howto__dur { right: 6px; bottom: 6px; padding: 2px 8px; font-size: .75rem; }
    .gq-howto__meta { padding: 10px 12px; }
    .gq-howto__meta b { font-size: 1rem; }
    .gq-howto__go { font-size: .875rem; padding-top: 4px; }
    .gq-ctas > * { flex: 1 1 100%; }
    .gq-ctas .marketing-free-trial-btn,
    .gq-btn-ghost { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
    .gq-howto__card, .gq-tour__chapter, .gq-use { transition: none; }
    .gq-howto__card:hover, .gq-use:hover { transform: none; }
}

/* The shared gradient-text eyebrow is too faint on the dark page; use solid accent ink. */
html.yw-dark .gq-home .yw-eyebrow {
    background: none;
    -webkit-text-fill-color: currentColor;
    color: var(--accent-ink);
}
