/*
 * css/front.css - the front page at "/" (includes/public_home.php) and the four guide pages (how-to-play.php, gangs-and-turf.php,
 * casino-games.php, city-map.php). Phase C, 0.30.0. Loaded after css/landing.css (the chrome and the shared ld- components)
 * and css/public.css; everything here is scoped under #ld and prefixed fr-. Reuse the ld- components first.
 * Text over pictures sits on a dark fade, and every text colour here clears 4.5:1 (measured on the rendered page).
 */

/* ---- the hero: art A3 edge to edge, the headline on a dark fade on the left ---- */
#ld .fr-hero { --fr-copy: 540px; position: relative; isolation: isolate; display: flex; align-items: center; min-height: clamp(480px, 44vw, 640px); overflow: hidden; border-bottom: 1px solid var(--line); background: var(--ink); }
#ld .fr-hero-art { position: absolute; inset: 0; z-index: -2; }
#ld .fr-hero-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 68% 50%; }
/* the fade: nearly solid ink behind the words, clear by the time it reaches the tower and the walker. Its stops follow the text
   column in pixels (--fr-te: where the words end: the centred 1060px column's left edge + 20px padding + the copy's width, --fr-copy), so the
   words sit on the dark part at every width from 701px up, not only on a wide screen. Contrast measured on the rendered page. */
#ld .fr-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  --fr-te: calc(max(0px, (100% - 1060px) / 2) + 20px + var(--fr-copy));
  background:
    linear-gradient(90deg, rgba(15,16,18,.95) 0, rgba(15,16,18,.9) calc(var(--fr-te) * .55), rgba(15,16,18,.72) var(--fr-te), rgba(15,16,18,.25) calc(var(--fr-te) + 140px), rgba(15,16,18,0) calc(var(--fr-te) + 320px)),
    linear-gradient(180deg, rgba(15,16,18,0) 72%, rgba(15,16,18,.85) 100%);
}
#ld .fr-hero-in { width: 100%; max-width: 1060px; margin: 0 auto; padding: 48px 20px; }
#ld .fr-hero-copy { max-width: var(--fr-copy); }
#ld .fr-hero h1 { margin: 0 0 14px; font: 600 54px/1.02 var(--head); letter-spacing: .5px; text-transform: uppercase; color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,.6); }
#ld .fr-hero h1 small { display: block; margin-bottom: 10px; font: 600 15px/1.2 var(--head); letter-spacing: 2.6px; color: var(--teal-hi); text-shadow: none; }
#ld .fr-hero h1 span {
  color: var(--amber-hi);
  background: linear-gradient(90deg, var(--amber-hi), #ffd27a); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
#ld .fr-hero .ld-lead { color: #d6d1c9; font-size: 17.5px; }
#ld .fr-hero .ld-ctas { margin: 24px 0 16px; }
#ld .fr-hero .ld-chips { margin-top: 14px; color: #c9c4bc; }

/* ---- "what is this", three short lines ---- */
#ld .fr-short { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 28px; }
#ld .fr-short p { padding-left: 14px; border-left: 3px solid var(--teal); color: var(--muted); font-size: 15.5px; line-height: 1.55; }
#ld .fr-short p:nth-child(2) { border-left-color: var(--purple); }
#ld .fr-short p:nth-child(3) { border-left-color: var(--amber-hi); }
#ld .fr-short b { display: block; margin-bottom: 4px; color: #fff; font-weight: 600; }

/* ---- the eight cards and the guide cards: 3:2 pictures, the whole card a link where there's a guide ---- */
#ld .fr-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#ld .fr-cards .ld-art, #ld .fr-guides .ld-art { aspect-ratio: 3 / 2; }
#ld .fr-cards .ld-card-body, #ld .fr-guides .ld-card-body { display: flex; flex-direction: column; }
#ld .fr-cards .ld-card-body b, #ld .fr-guides .ld-card-body b { margin-top: auto; padding-top: 10px; font-size: 14px; }
#ld .fr-cards .ld-card-link:hover h3, #ld .fr-guides .ld-card-link:hover h3 { color: var(--amber-hi); }
#ld .fr-cards .ld-card-link:focus-visible, #ld .fr-guides .ld-card-link:focus-visible { outline: 2px solid var(--teal-hi); outline-offset: 2px; }
#ld .fr-guides { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---- screenshots ---- */
#ld .fr-shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
#ld .fr-shot { margin: 0; }
#ld .fr-shot picture { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--ink); box-shadow: 0 10px 26px rgba(0,0,0,.45); }
#ld .fr-shot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 11; object-fit: cover; object-position: 50% 45%; }   /* a little below the game header every shot shares */
#ld .fr-shot figcaption { margin-top: 10px; color: var(--muted); font-size: 14px; line-height: 1.5; }
#ld .fr-shot figcaption b { display: block; color: #fff; font: 600 15px/1.3 var(--head); letter-spacing: 1px; text-transform: uppercase; }

/* ---- a day in the life ---- */
#ld .fr-day { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 28px 44px; align-items: center; }
#ld .fr-day .ld-steps { margin-bottom: 8px; }

/* =====================================================================================================
 * The guide pages: a short hero, an "on this page" list, then long-form sections with pictures and
 * fact boxes, and the "More guides" row before the call to action.
 * ===================================================================================================== */
#ld .fr-crumbs { margin-bottom: 10px; color: var(--muted); font-size: 13.5px; }
#ld .fr-crumbs a { color: var(--wire); }
#ld .fr-crumbs a:hover { text-decoration: underline; }
#ld .fr-toc { margin: 18px 0 0; padding: 14px 18px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.02); }
#ld .fr-toc b { display: block; margin-bottom: 6px; color: var(--amber-hi); font: 600 12px var(--head); letter-spacing: 2.2px; text-transform: uppercase; }
#ld .fr-toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 28px; color: var(--muted); font-size: 14.5px; }
#ld .fr-toc li { margin: 3px 0; break-inside: avoid; }
#ld .fr-toc a { color: var(--wire); }
#ld .fr-toc a:hover { text-decoration: underline; }

#ld .fr-guide { max-width: 1060px; margin: 0 auto; padding: 0 20px; }
#ld .fr-sec { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px 40px; align-items: start; padding: 36px 0; border-top: 1px solid var(--line); scroll-margin-top: 12px; }
#ld .fr-sec:first-child { border-top: 0; }
#ld .fr-sec-wide { grid-template-columns: minmax(0, 1fr); }
#ld .fr-sec h2 { margin-bottom: 12px; font: 600 27px/1.12 var(--head); letter-spacing: .8px; text-transform: uppercase; color: #fff; }
#ld .fr-sec h3 { margin: 18px 0 6px; font: 600 18px/1.25 var(--head); letter-spacing: .8px; text-transform: uppercase; color: #fff; }
#ld .fr-prose p, #ld .fr-prose li { color: #d0cbc3; font-size: 16px; line-height: 1.65; }
#ld .fr-prose p + p { margin-top: 12px; }
#ld .fr-prose ul, #ld .fr-prose ol { margin: 10px 0 0; padding-left: 22px; }
#ld .fr-prose li { margin: 5px 0; }
#ld .fr-prose b, #ld .fr-prose strong { color: #fff; font-weight: 600; }
#ld .fr-prose a { color: var(--wire); }
#ld .fr-prose a:hover { text-decoration: underline; }
#ld .fr-side { display: grid; gap: 16px; }
#ld .fr-side .ld-media img { aspect-ratio: auto; }
#ld .fr-side figcaption, #ld .fr-wide-media figcaption { padding: 10px 12px; color: var(--muted); font-size: 13.5px; line-height: 1.45; border-top: 1px solid var(--line); }

/* a box of facts: label and value rows */
#ld .fr-facts { padding: 16px 18px; border: 1px solid var(--line); border-top: 3px solid var(--c, var(--teal)); border-radius: 8px; background: var(--steel); }
#ld .fr-facts h3 { margin: 0 0 10px; font-size: 15px; letter-spacing: 1.6px; color: var(--c, var(--teal-hi)); }
#ld .fr-facts dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 7px 14px; margin: 0; font-size: 14.5px; }
#ld .fr-facts dt { color: var(--muted); }
#ld .fr-facts dd { margin: 0; color: var(--text); text-align: right; font-weight: 600; }
#ld .fr-facts p { margin-top: 10px; color: var(--muted); font-size: 13.5px; }
#ld .fr-c-purple { --c: var(--purple); }
#ld .fr-c-amber { --c: var(--amber-hi); }
#ld .fr-c-magenta { --c: var(--magenta); }
#ld .fr-ranks { margin: 0; padding-left: 26px; columns: 2; column-gap: 22px; color: var(--text); font-size: 14.5px; }
#ld .fr-ranks li { margin: 3px 0; break-inside: avoid; }
#ld .fr-ranks li::marker { color: var(--muted); }

/* a table (the casino games, the districts) */
#ld .fr-table-wrap { overflow-x: auto; margin-top: 14px; border: 1px solid var(--line); border-radius: 8px; }
#ld .fr-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
#ld .fr-table th, #ld .fr-table td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
#ld .fr-table tr:last-child td { border-bottom: 0; }
#ld .fr-table th { color: var(--amber-hi); background: #121214; font: 600 12.5px var(--head); letter-spacing: 1.4px; text-transform: uppercase; }
#ld .fr-table td { color: #d0cbc3; }
#ld .fr-table td b { color: #fff; font-weight: 600; }
#ld .fr-tag { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 700; letter-spacing: .3px; white-space: nowrap; }
#ld .fr-tag-open { color: #cfe8cc; background: rgba(95,174,90,.16); border: 1px solid rgba(95,174,90,.5); }
#ld .fr-tag-soon { color: #ffd9a0; background: rgba(220,129,0,.12); border: 1px solid rgba(220,129,0,.45); }

/* the districts on the city map guide */
#ld .fr-districts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
#ld .fr-district { padding: 16px 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--steel); scroll-margin-top: 12px; }
#ld .fr-district h3 { margin: 0; font: 600 19px/1.2 var(--head); letter-spacing: 1px; text-transform: uppercase; color: #fff; }
#ld .fr-district-line { margin: 4px 0 10px; color: var(--teal-hi); font-size: 14px; }
#ld .fr-district ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
#ld .fr-district li { color: #d0cbc3; font-size: 14.5px; line-height: 1.5; }
#ld .fr-district li b { color: #fff; font-weight: 600; }
#ld .fr-doors { color: var(--muted); }

/* a picture across the whole column (the map) */
#ld .fr-wide-media { margin: 18px 0 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--steel); box-shadow: 0 10px 30px rgba(0,0,0,.45); }
#ld .fr-wide-media img { display: block; width: 100%; height: auto; }

/* ---- tablets ---- */
@media (max-width: 1000px) {
  #ld .fr-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #ld .fr-shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  #ld .fr-hero { --fr-copy: 470px; }
}
@media (max-width: 900px) {
  #ld .fr-hero h1 { font-size: 44px; }
  #ld .fr-short { grid-template-columns: minmax(0, 1fr); }
  #ld .fr-day { grid-template-columns: minmax(0, 1fr); }
  #ld .fr-sec { grid-template-columns: minmax(0, 1fr); }
  #ld .fr-guides { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---- phones: the picture on top (the tower and the walker), the words under it on ink ---- */
@media (max-width: 700px) {
  #ld .fr-hero { display: block; min-height: 0; }
  #ld .fr-hero-art { position: relative; inset: auto; z-index: 0; }
  #ld .fr-hero-art img { height: auto; aspect-ratio: 4 / 3; }
  #ld .fr-hero::before { inset: 0 0 auto 0; height: calc(100vw * 3 / 4); z-index: 1; background: linear-gradient(180deg, rgba(15,16,18,0) 50%, rgba(15,16,18,.96) 90%, rgba(15,16,18,1) 100%); }
  #ld .fr-hero-in { position: relative; z-index: 2; margin-top: -30px; padding: 0 16px 30px; }
  #ld .fr-hero-copy { max-width: none; }
  #ld .fr-hero h1 { font-size: 36px; }
  #ld .fr-hero .ld-lead { font-size: 16px; }
}
@media (max-width: 600px) {
  #ld .fr-cards, #ld .fr-shots, #ld .fr-guides { grid-template-columns: minmax(0, 1fr); }
  #ld .fr-shot img { aspect-ratio: 9 / 13; }
  #ld .fr-guide { padding: 0 16px; }
  #ld .fr-sec { padding: 26px 0; }
  #ld .fr-sec h2 { font-size: 23px; }
  #ld .fr-prose p, #ld .fr-prose li { font-size: 15.5px; }
  #ld .fr-toc ol { columns: 1; }
  #ld .fr-districts { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 380px) {
  #ld .fr-hero h1 { font-size: 31px; }
}
