/**
 * assets/css/fit-screen.css -- layout and look of the home-page hero: parent strip, headline + FREE flyer, the
 * "iDN69 decision-making assistance" panel, and the Quick estimate card (basic estimate + warning + big button).
 *
 * PURPOSE
 *   1. Bigger text and a wider card on laptop/desktop; calm 2 x 2 figure tiles; the "Not enough for precise
 *      decision-making" warning and a large, glowing "Get my detailed estimate" button.
 *   2. Keeping the whole hero on one screen: rules trim spacing and drop the least important details as the window gets
 *      SHORTER; assets/js/fit-screen.js then scales what is left (--fit, floor 0.72). A window that is still too short
 *      scrolls. Phones and tablets cannot show the card on one screen: headline and main button come first (flex order).
 *   Loaded after theme.css on purpose: it only overrides sizes, order and visibility, never behaviour.
 *   The old "other providers" advert, the basic-estimate box and the "Click here" pill are gone, along with their rules.
 */

/* ---------- Scale-to-fit hook (value set by fit-screen.js) ---------- */
@media (min-width: 941px) { .hero-inner { zoom: var(--fit, 1); } }

/* ---------- Parent strip above the header (32px tall; --hero-offset counts it) ---------- */
:root { --hero-offset: 99px; }                                /* header 67px + strip 32px */
body:has(#demoBar) { --hero-offset: 148px; }
.parent-strip { position: relative; z-index: 120; display: flex; align-items: center; justify-content: center; gap: 12px; height: 32px; padding: 0 12px; font-size: 13.5px; line-height: 1; color: rgba(255, 255, 255, .9);
  background: #060f2b; border-bottom: 1px solid rgba(255, 255, 255, .08); white-space: nowrap; }          /* overflow stays visible: the logos grow past the strip on hover */
.ps-logo { position: relative; display: block; width: 26px; height: 26px; line-height: 0; }
.ps-logo img { width: 26px; height: 26px; border-radius: 50%; transform-origin: 50% 0; transition: transform .18s ease, box-shadow .18s ease; }
.ps-logo:hover, .ps-logo:focus-visible { z-index: 2; }
.ps-logo:hover img, .ps-logo:focus-visible img { transform: scale(2.9); box-shadow: 0 8px 22px rgba(0, 0, 0, .65); }   /* about 75px: the artwork is readable */
.ps-logo:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 50%; }
.ps-text { font-weight: 600; letter-spacing: .01em; }
@media (prefers-reduced-motion: reduce) { .ps-logo img { transition: none; } }

/* ---------- Common ---------- */
.ql-field[hidden] { display: none; }                         /* facility chooser hidden; quicklook.js and the funnel still read it */
.hero h1 { background: linear-gradient(100deg, #fff 35%, #ffd76a 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }

/* ---------- FREE flyer beside the headline (gold starburst, tilted, slow pulse) ---------- */
.ad-headline { display: flex; align-items: flex-start; gap: 6px; margin: 0 0 14px; }
.ad-headline h1 { margin: 0; }
.ad-flyer { position: relative; flex: none; width: 140px; height: 140px; margin: -4px 0 0 16px; display: grid; place-content: center; text-align: center; transform: rotate(-10deg);
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .55)); animation: ad-flyer-pulse 2.6s ease-in-out infinite; }
.ad-flyer::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 35% 30%, #ffe9a0 0%, #ffc53d 45%, #f5961a 100%);
  clip-path: polygon(50.0% 0.0%, 55.4% 9.4%, 62.9% 1.7%, 65.7% 12.1%, 75.0% 6.7%, 75.0% 17.5%, 85.4% 14.6%, 82.5% 25.0%, 93.3% 25.0%, 87.9% 34.3%, 98.3% 37.1%, 90.6% 44.6%, 100.0% 50.0%, 90.6% 55.4%, 98.3% 62.9%, 87.9% 65.7%, 93.3% 75.0%, 82.5% 75.0%, 85.4% 85.4%, 75.0% 82.5%, 75.0% 93.3%, 65.7% 87.9%, 62.9% 98.3%, 55.4% 90.6%, 50.0% 100.0%, 44.6% 90.6%, 37.1% 98.3%, 34.3% 87.9%, 25.0% 93.3%, 25.0% 82.5%, 14.6% 85.4%, 17.5% 75.0%, 6.7% 75.0%, 12.1% 65.7%, 1.7% 62.9%, 9.4% 55.4%, 0.0% 50.0%, 9.4% 44.6%, 1.7% 37.1%, 12.1% 34.3%, 6.7% 25.0%, 17.5% 25.0%, 14.6% 14.6%, 25.0% 17.5%, 25.0% 6.7%, 34.3% 12.1%, 37.1% 1.7%, 44.6% 9.4%); }
.ad-flyer b, .ad-flyer small { position: relative; color: #7a1f00; line-height: 1; }
.ad-flyer b { margin-top: -6px; font-family: var(--font-display); font-size: 42px; font-weight: 900; letter-spacing: .02em; text-transform: uppercase; text-shadow: 0 1px 0 rgba(255, 255, 255, .55); }
.ad-flyer small { max-width: 56%; margin: 4px auto 0; font-size: 9px; font-weight: 800; letter-spacing: .02em; line-height: 1.1; text-transform: uppercase; }
@keyframes ad-flyer-pulse { 0%, 100% { transform: rotate(-10deg) scale(1); } 50% { transform: rotate(-10deg) scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .ad-flyer, .ql .btn-primary { animation: none; } }

/* ---------- The hub: iDN69 split in two (1 models | disc | 2 user categories) ---------- */
.hub { max-width: 640px; margin: 0 0 16px; padding: 14px 14px 10px; border-radius: 18px; background: radial-gradient(110% 100% at 50% 40%, #1b3a7e, #0a1b45 75%); border: 1.5px solid rgba(245, 166, 35, .55); box-shadow: 0 24px 50px -22px rgba(0, 0, 0, .85); }
.hub-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 124px minmax(0, 1fr); grid-template-areas: "models core users" "cap cap cap"; column-gap: 44px; align-items: start; }
.hub-models { grid-area: models; }
.hub-core { grid-area: core; align-self: center; padding-top: 30px; }
.hub-users { grid-area: users; }
.hub-lines { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; pointer-events: none; }
.hub-line { stroke-width: 3; stroke-linecap: round; opacity: .95; transition: opacity .2s; }
.hub-line.is-dim { opacity: .15; }

.hub-chip { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 5px 14px 5px 5px; border-radius: 999px; font-size: 16px; font-weight: 800; letter-spacing: 0; line-height: 1.15; }   /* level 1 heading */
.hub-chip b { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; font-size: 15px; letter-spacing: 0; color: #0a1b45; background: #fff; }
.hub-chip1 { color: #3a1500; background: #ffc53d; }
.hub-chip2 { color: #06204a; background: #6fc4ff; }

.hub-nodes { display: grid; gap: 10px; }
.hn { --c1: #fff; --c2: #ddd; position: relative; display: flex; align-items: center; gap: 8px; width: 100%; margin: 0; padding: 6px 10px 6px 6px; border: 0; border-radius: 14px; font: 700 14.5px/1.2 var(--font-body, Inter, sans-serif);   /* level 2 */ text-align: left; color: #fff; cursor: pointer;
  background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .7), inset 0 0 0 1.5px rgba(255, 255, 255, .35); transition: opacity .2s, transform .15s, filter .2s; }
.hn i { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; font-style: normal; font-size: 16px; background: rgba(255, 255, 255, .93); }
.hn:hover { transform: translateY(-1px); }
.hn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.hn.is-on { transform: scale(1.04); box-shadow: 0 0 0 3px #fff, 0 12px 24px -8px rgba(0, 0, 0, .8); }
.hn.is-dim { opacity: .32; filter: saturate(.5); }
.hn-ppa { --c1: #ffa23a; --c2: #ff7a14; color: #3a1500; }
.hn-epc { --c1: #ffe07a; --c2: #ffc53d; color: #3a1500; }
.hn-sm { --c1: #fff0b3; --c2: #ffd978; color: #3a1500; font-size: 12.5px; font-weight: 600;   /* level 3 */  padding: 5px 9px 5px 5px; }
.hn-sm i { width: 24px; height: 24px; font-size: 13px; }
.hn-owner { --c1: #2f6df0; --c2: #1b4fd1; }
.hn-dev { --c1: #0c8576; --c2: #0a6d62; }
.hn-bank { --c1: #a6ec9c; --c2: #69d36c; color: #1b3a10; }
.hn-epcom { --c1: #7a5af0; --c2: #5a3fc9; }
.hub-sub { display: grid; gap: 6px; margin: -2px 0 0 16px; padding: 4px 0 0 12px; border-left: 3px solid #ffd36b; }   /* rail under EPC */
.hub-sub .hn { position: relative; }
.hub-sub .hn::before { content: ''; position: absolute; left: -15px; top: 50%; width: 12px; border-top: 3px solid #ffd36b; }

.hub-disc { width: 124px; height: 124px; display: grid; place-content: center; text-align: center; border: 0; padding: 0; margin: 0; cursor: pointer; font: inherit; border-radius: 50%; color: #0a1b45; position: relative; transition: transform .15s;
  background: conic-gradient(from 0deg, #6fc4ff 0 180deg, #ffb92e 180deg 360deg); box-shadow: 0 0 0 6px rgba(255, 255, 255, .12), 0 0 0 14px rgba(255, 255, 255, .06), 0 14px 30px -8px #000; }
.hub-disc:hover { transform: scale(1.05); }
.hub-disc:focus-visible { outline: 3px solid #fff; outline-offset: 6px; }
.hub-disc::before { content: ''; position: absolute; left: 50%; top: 9px; bottom: 9px; width: 3px; margin-left: -1.5px; border-radius: 3px; background: #fff; opacity: .9; }   /* the split */
.hub-disc b { position: relative; font-family: var(--font-display); font-size: 24px; font-weight: 800; text-shadow: 0 0 12px rgba(255, 255, 255, .9); }
.hub-disc small { position: relative; max-width: 100px; margin: 0 auto; font-size: 9.5px; font-weight: 800; letter-spacing: .04em; line-height: 1.15; text-transform: uppercase; text-shadow: 0 0 8px rgba(255, 255, 255, .9); }
.hero .hub p.hub-cap { grid-area: cap; min-height: 2.9em; margin: 12px 4px 0; text-align: center; font-size: 13px; line-height: 1.4; font-weight: 600; color: rgba(255, 255, 255, .88); }

/* phone: no lines; disc on top, then the two groups stacked */
@media (max-width: 600px) {
  .hub-grid { grid-template-columns: 1fr; grid-template-areas: "core" "models" "users" "cap"; row-gap: 16px; }
  .hub-core { padding-top: 0; justify-self: center; }
  .hub-lines { display: none; }
}
@media (prefers-reduced-motion: reduce) { .hn, .hub-line, .hub-disc { transition: none; } }

/* Under the buttons, tall windows only: the notes that used to crowd the card */
.ad-info { display: none; max-width: 640px; margin: 0 0 16px; padding: 14px 18px 12px; border-radius: 12px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); }
.ad-info h3 { margin: 0 0 8px; font-family: var(--font-display); font-size: 15px; color: #fff; }
.ad-info ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.ad-info li { position: relative; padding-left: 18px; font-size: 14px; line-height: 1.45; color: rgba(255, 255, 255, .82); }
.ad-info li::before { content: '\2022'; position: absolute; left: 3px; top: 0; color: var(--gold); font-weight: 900; }

/* ---------- Quick estimate card: warning + big button ---------- */
.ql-warn { display: flex; align-items: center; gap: 12px; margin: 14px 0 0; padding: 11px 14px; border-radius: 14px; border: 2px solid #f04438; background: linear-gradient(135deg, #fff1ee, #ffded6); }
.ql-warn-ic { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; font-family: var(--font-display); font-size: 24px; font-weight: 900; color: #fff; background: #e5484d; }
.hero .ql p.ql-warn-h { margin: 0; font-family: var(--font-display); font-size: 22px; font-weight: 900; line-height: 1.15; color: #b42318; }
.hero .ql p.ql-warn-p { margin: 3px 0 0; font-size: 14.5px; font-weight: 600; line-height: 1.35; color: #5b1a12; }
.ql .ql-actions { margin-top: 12px; }
.ql .btn-primary { font-size: 19px; font-weight: 800; padding: 16px 20px; animation: ql-cta-glow 2.4s ease-in-out infinite; }
.ql .btn-primary::after { content: ' \2192'; }
@keyframes ql-cta-glow { 0%, 100% { box-shadow: 0 8px 18px -8px rgba(250, 122, 10, .8); } 50% { box-shadow: 0 0 0 5px rgba(250, 122, 10, .28), 0 10px 22px -6px rgba(250, 122, 10, .95); } }
.hero .ql p.ql-note { margin: 8px 0 0; font-size: 11.5px; line-height: 1.35; color: #5f6b85; }

/* ---------- Desktop / laptop (two columns from 941px) ---------- */
@media (min-width: 941px) {
  .hero-inner { max-width: 1360px; grid-template-columns: minmax(0, 1fr) clamp(440px, 42vw, 600px); gap: 48px; }
  .hero h1 { font-size: clamp(28px, 3.1vw, 46px); }
  .ad-cta { font-size: 18px; padding: 15px 28px; }
  .ad-sample { font-size: 16px; }
  .ql { padding: 22px 26px 18px; }
  .ql h2 { font-size: 21px; line-height: 1.2; }
  .ql-lbl { font-size: 16px; }
  .ql-bill-out { font-size: 30px; }
  .ql select, .ql input[type="text"], .ql input[type="number"], .ql input[type="tel"] { font-size: 16px; }
  /* figures: four tiles, 2 x 2, label above the number */
  .ql-out { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; padding-top: 14px; }
  .ql-out .ql-stat { display: flex; flex-direction: column; padding: 11px 14px 12px; border-radius: 12px; background: #f3f6fc; border: 1px solid #e2e8f4; }
  .ql-out .ql-stat span { order: -1; margin: 0 0 4px; font-size: 13px; font-weight: 600; }
  .ql-out .ql-stat b { font-size: 27px; }
  .ql-out .ql-stat.ql-wide { grid-column: auto; }
  .ql-out .ql-hero-stat { order: 1; }
  .ql-out .ql-net { order: 2; background: #e9f7f0; border-color: #bfe5d1; }
  .ql-out .ql-stat:nth-of-type(n):not(.ql-wide) { order: 3; }
  .ql-out .ql-eg, .ql-out .ql-bars, .ql-out .ql-life { grid-column: 1 / -1; order: 4; }
  .ql-out .ql-eg { order: 0; }
}
@media (min-width: 941px) and (min-height: 941px) {            /* tall: notes move to the left panel */
  .ad-info { display: block; }
  .hero-note { display: none; }                              /* its sentence is the last bullet of the panel */
  .hero .ql .ql-out p.ql-eg, .hero .ql.ql-example .ql-out p.ql-eg { display: none; }
}
@media (min-width: 941px) {                                    /* the "Example figures" hint keeps its space once hidden, so moving the slider never changes the card height (that made the fit script rescale the page) */
  .hero .ql p.ql-eg { display: block; visibility: hidden; }
  .hero .ql.ql-example p.ql-eg { visibility: visible; }
}
@media (min-width: 941px) and (max-height: 940px) {            /* below this the side panel is dropped so the scale-down stays small */
  .ad-flyer { width: 128px; height: 128px; }
  .ad-flyer b { font-size: 36px; }
  .ad-headline { margin-bottom: 10px; }
}
@media (min-width: 941px) and (max-height: 1080px) {           /* the full card (about 1,200px) only fits above this */
  .hero-inner { padding-top: 18px; padding-bottom: 20px; gap: 44px; }
  .hero-content { padding-top: 0; }
  .hero-note { font-size: 12.5px; line-height: 1.45; margin: 0 0 8px; }
  .hero-trust { display: none; }
  .ql { padding: 16px 20px 14px; }
  .ql-sub, .ql-micro, .ql-eg, .ql-life, .ql-bars, .ql-teaser { display: none; }
  .ql h2 { font-size: 19px; }
  .ql-bill-out { font-size: 26px; }
  .ql-out .ql-stat b { font-size: 24px; }
  .ql-head { margin-bottom: 8px; }
  .ql-field { margin-bottom: 10px; }
  .ql-bill { display: grid; grid-template-columns: minmax(0, 1fr) 112px; column-gap: 12px; align-items: center; }   /* box beside the slider */
  .ql-bill-top { grid-column: 1 / -1; margin-bottom: 4px; }
  .ql-bill-exact { margin: 0; }
  .ql-bill-exact label { display: none; }
  .ql-bill-exact input { width: 100%; }
  .ql-out { margin-top: 6px; padding-top: 10px; }
  .ql-mail { margin-top: 8px; padding-top: 6px; }
  .ql-warn { margin-top: 10px; padding: 9px 12px; }
  .hero .ql p.ql-warn-h { font-size: 19px; }
  .hero .ql p.ql-warn-p { font-size: 13.5px; }
  .ql .btn-primary { font-size: 18px; padding: 13px 18px; }
}
@media (min-width: 941px) and (max-height: 800px) {
  .hub { padding: 10px 12px 6px; }
  .hub-chip { margin-bottom: 6px; font-size: 11px; }
  .hub-nodes { gap: 6px; }
  .hn { padding-top: 4px; padding-bottom: 4px; font-size: 13px; }
  .hn i { width: 26px; height: 26px; font-size: 14px; }
  .hub-sub .hn { font-size: 12px; }
  .hub-disc { width: 104px; height: 104px; }
  .hub-core { padding-top: 24px; }
  .hub-disc b { font-size: 21px; }
  .hero .hub p.hub-cap { min-height: 2.6em; margin-top: 6px; font-size: 12px; }
  .hero-note { display: none; }
  .ql-badge { display: none; }
  .ql-head { margin-bottom: 6px; }
  .ql-field { margin-bottom: 7px; }
  .ad-flyer { width: 106px; height: 106px; margin-top: 0; }
  .ad-flyer b { font-size: 29px; }
  .ad-flyer small { font-size: 8.5px; }
  .ql-out { gap: 8px; margin-top: 8px; padding-top: 10px; }
  .ql-out .ql-stat { padding: 6px 12px 7px; }
  .ql-out .ql-stat span { margin-bottom: 1px; font-size: 12px; }
  .ql-out .ql-stat b { font-size: 21px; }
  .ql .ql-actions { margin-top: 8px; }
}
@media (min-width: 941px) and (max-height: 700px) {
  .ql { padding: 12px 18px 10px; }
  .ql h2 { font-size: 17px; }
  .ql-bill-out { font-size: 22px; }
  .ql select, .ql input[type="text"] { padding-top: 7px; padding-bottom: 7px; }
  .hero .ql p.ql-warn-p { display: none; }                   /* keep the loud line, drop the explanation */
  .hero .ql p.ql-note { font-size: 10.5px; margin-top: 5px; }
  .ql .btn-primary { padding-top: 10px; padding-bottom: 10px; }
  .ql-out .ql-stat b { font-size: 19px; }
}

/* ---------- Tablet and phone: one column, order = headline, main button, sample, panel, notes ---------- */
@media (max-width: 940px) {
  .hero-inner { padding-top: 22px; }
  .hero-inner { align-items: stretch; }                  /* left column takes the card's height */
  .hero-content { display: flex; flex-direction: column; }
  .ad-headline { order: 0; }
  .ad-actions { order: 1; }
  .hub { order: 3; }
  .hero-note { order: 4; }
  .hero-trust { order: 5; }
  .hero-skip { order: 6; align-self: flex-start; }
  .hero h1 { font-size: clamp(28px, 6vw, 44px); }
}
@media (max-width: 600px) {
  .hero h1 { font-size: clamp(26px, 8vw, 36px); }
  .ad-flyer { width: 104px; height: 104px; margin-left: 4px; }
  .ad-flyer b { font-size: 30px; }
  .ad-actions .ad-cta { flex: 1 1 100%; text-align: center; }
  .hero-trust { display: none; }
  .parent-strip { font-size: 12.5px; gap: 8px; }
}

/* ---------- Left column fills the height of the card: the hub grows into the free space, boxes spread out evenly ---------- */
.ad-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; margin: 0 0 16px; }
.ad-actions .ad-cta, .ad-actions .ad-sample { margin: 0; }
@media (min-width: 941px) {
  .hero-inner { align-items: stretch; }                  /* left column takes the card's height */
  .hero-content { display: flex; flex-direction: column; }
  .hub { flex: 1 1 auto; display: flex; flex-direction: column; max-height: 600px; padding: 16px 16px 12px; }
  .hub-grid { flex: 1 1 auto; grid-template-rows: minmax(0, 1fr) auto; align-items: stretch; }
  .hub-col { display: flex; flex-direction: column; }
  .hub-nodes { flex: 1 1 auto; align-content: space-evenly; gap: 6px; }        /* spare height becomes even air between boxes */
  .hub-core { align-self: center; padding-top: 0; }
  .hn { padding-top: 7px; padding-bottom: 7px; }
  .hub-chip { margin-bottom: 10px; font-size: 12.5px; letter-spacing: .02em; text-transform: none; }
  .hub .hub-cap { margin-top: 10px; }
  .hero-skip { align-self: flex-start; }
}
