/* Home page v2 (Apple-style): big type, full-bleed sections, bento grid, Black Friday. Linked after site.css and ceiling.css.
   Everything is scoped under .h2-body. Black Friday blocks react to the dates on #h2 (assets/js/home2.js). 360 px safe. */
.h2-body { --h2-ink: #0B1224; --h2-night: #050B1A; --h2-blue: #2252CC; --h2-sky: #7EA0FF; --h2-bf: #FFB454; --h2-soft: #F5F7FB; --h2-line: #E2E5EA; }
.h2-body main#h2 { overflow-x: clip; }
.h2-body .container { max-width: 1180px; }

/* ---------- Black Friday bar ---------- */
.h2-bar { background: #050B1A; color: #fff; }
.h2-bar a { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 10px var(--gutter); color: inherit; font-size: 13.5px; line-height: 1.35; text-align: center; flex-wrap: wrap; }
.h2-bar-tag { padding: 3px 10px; border-radius: 100px; background: var(--h2-bf); color: #231400; font: 700 11px 'IBM Plex Mono', monospace; letter-spacing: 0.08em; text-transform: uppercase; }
.h2-bar-go { color: var(--h2-bf); font-weight: 600; }
.h2-bar:hover .h2-bar-go { text-decoration: underline; }
html.bf-after .h2-bar, html.bf-after [data-bf-section] { display: none; }

/* ---------- Typography helpers ---------- */
.h2-eyebrow { margin: 0 0 18px; font: 600 12.5px 'IBM Plex Mono', monospace; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.7); }
.h2-eyebrow--blue { color: var(--h2-blue); }
.h2-head { max-width: 860px; margin: 0 auto clamp(40px, 6vw, 72px); text-align: center; }
.h2-head h2 { margin: 0 0 20px; font-family: 'Sora', sans-serif; font-weight: 700; font-size: clamp(36px, 6.4vw, 72px); line-height: 1.04; letter-spacing: -0.03em; text-wrap: balance; }
.h2-head h2 span { color: var(--h2-blue); }
.h2-head p { margin: 0 auto; max-width: 680px; font-size: clamp(17px, 2.1vw, 21px); line-height: 1.5; color: var(--text-muted); text-wrap: pretty; }
.h2-head--light h2 { color: #fff; }
.h2-head--light h2 span { color: var(--h2-sky); }
.h2-head--light p { color: rgba(255, 255, 255, 0.78); }
.h2-sec { padding: clamp(72px, 11vw, 150px) 0; background: var(--bg); }
.h2-sec--soft { background: var(--h2-soft); }
.h2-sec--dark { background: radial-gradient(900px 500px at 50% -10%, rgba(74, 120, 255, 0.35), transparent 60%), var(--h2-night); color: #fff; }
html[data-theme="dark"] .h2-sec--soft { background: #12171E; }

/* ---------- Buttons ---------- */
.h2-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.h2-cta--center { justify-content: center; }
.h2-cta--tight { margin-top: 18px; align-items: center; }
.h2-btn { display: inline-flex; align-items: center; justify-content: center; padding: 15px 28px; border-radius: 100px; border: 1px solid transparent; font: 600 16px 'Work Sans', sans-serif; line-height: 1.1; cursor: pointer; text-decoration: none; transition: transform .2s ease, background .2s ease, box-shadow .2s ease; }
.h2-btn:hover { transform: translateY(-2px); }
.h2-btn--bf { background: var(--h2-bf); color: #231400; box-shadow: 0 14px 34px -14px rgba(255, 180, 84, 0.9); }
.h2-btn--bf:hover { background: #FFC574; color: #231400; }
.h2-btn--glass { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.3); color: #fff; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.h2-btn--glass:hover { background: rgba(255, 255, 255, 0.2); color: #fff; }
.h2-btn--white { background: #fff; color: #0B1224; }
.h2-btn--white:hover { background: #EAF0FF; color: #0B1224; }
.h2-btn--blue { background: var(--h2-blue); color: #fff; box-shadow: 0 14px 34px -14px rgba(34, 82, 204, 0.9); }
.h2-btn--blue:hover { background: #1B46B0; color: #fff; }
.h2-btn--ghost { border-color: rgba(255, 255, 255, 0.4); color: #fff; }
.h2-btn--ghost:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.h2-link-light { color: rgba(255, 255, 255, 0.85); font-weight: 600; font-size: 15px; }

/* ---------- Hero ---------- */
.h2-hero { position: relative; overflow: hidden; isolation: isolate; color: #fff; text-align: center; padding: clamp(64px, 10vw, 128px) 0 0; background: linear-gradient(180deg, #050B1A 0%, #0A1A4A 55%, #153A99 100%); }
.h2-hero-glow { position: absolute; left: 50%; top: 38%; width: min(1100px, 130%); aspect-ratio: 1; transform: translate(-50%, -30%); background: radial-gradient(circle, rgba(74, 120, 255, 0.55) 0%, rgba(74, 120, 255, 0) 62%); z-index: -1; pointer-events: none; }
.h2-hero-in { position: relative; z-index: 2; }
.h2-hero h1 { margin: 0 auto 22px; max-width: 980px; font-family: 'Sora', sans-serif; font-weight: 700; font-size: clamp(40px, 8.2vw, 96px); line-height: 1.02; letter-spacing: -0.035em; text-wrap: balance; }
.h2-sub { margin: 0 auto; max-width: 720px; font-size: clamp(17px, 2.2vw, 22px); line-height: 1.5; color: rgba(255, 255, 255, 0.82); text-wrap: pretty; }
.h2-hero .h2-cta { justify-content: center; margin-top: 34px; }
.h2-hero-note { margin: 22px 0 0; font: 500 12.5px 'IBM Plex Mono', monospace; letter-spacing: 0.04em; color: rgba(255, 255, 255, 0.6); }
.h2-stage { position: relative; z-index: 1; height: clamp(300px, 44vw, 560px); margin: clamp(40px, 6vw, 72px) auto 0; max-width: 1100px; }
.h2-stage img { position: absolute; bottom: 0; width: clamp(160px, 27vw, 330px); height: auto; border-radius: 26px 26px 0 0; box-shadow: 0 -30px 80px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.12); }
.h2-stage::after { content: ''; position: absolute; left: -50vw; right: -50vw; bottom: 0; height: 38%; background: linear-gradient(180deg, rgba(5, 8, 15, 0), #05080F); z-index: 3; pointer-events: none; }
.h2-stage-a { left: 50%; transform: translate(-128%, 7%) rotate(-5deg); }
.h2-stage-b { left: 50%; transform: translate(-50%, 0); z-index: 2; width: clamp(190px, 31vw, 380px) !important; }
.h2-stage-c { left: 50%; transform: translate(28%, 7%) rotate(5deg); }
@media (prefers-reduced-motion: no-preference) {
  .h2-stage img { animation: h2-rise 1.1s cubic-bezier(.2, .8, .2, 1) both; }
  .h2-stage-b { animation-delay: .05s; } .h2-stage-a, .h2-stage-c { animation-delay: .2s; }
  @keyframes h2-rise { from { opacity: 0; margin-bottom: -60px; } to { opacity: 1; margin-bottom: 0; } }
}

/* ---------- Black Friday section ---------- */
.h2-bf { position: relative; overflow: hidden; background: radial-gradient(800px 420px at 20% 0%, rgba(255, 180, 84, 0.22), transparent 60%), radial-gradient(900px 500px at 90% 100%, rgba(74, 120, 255, 0.3), transparent 60%), #05080F; color: #fff; padding: clamp(72px, 10vw, 130px) 0; }
.h2-bf-head { text-align: center; max-width: 860px; margin: 0 auto clamp(36px, 5vw, 64px); }
.h2-bf-tag { display: inline-block; margin-bottom: 20px; padding: 6px 14px; border-radius: 100px; border: 1px solid rgba(255, 180, 84, 0.5); color: var(--h2-bf); font: 600 12px 'IBM Plex Mono', monospace; letter-spacing: 0.1em; text-transform: uppercase; }
.h2-bf-head h1, .h2-bf-head h2 { margin: 0 0 20px; font-family: 'Sora', sans-serif; font-weight: 700; font-size: clamp(34px, 6vw, 68px); line-height: 1.06; letter-spacing: -0.03em; text-wrap: balance; }
.h2-bf-big { background: linear-gradient(90deg, #FFD08A, #FF9A3C); -webkit-background-clip: text; background-clip: text; color: transparent; }
.h2-bf-head > p { margin: 0 auto; max-width: 600px; font-size: clamp(17px, 2vw, 20px); line-height: 1.5; color: rgba(255, 255, 255, 0.78); }
.h2-count { display: flex; justify-content: center; gap: clamp(8px, 2vw, 16px); margin-top: 32px; }
.h2-count > div { min-width: clamp(64px, 14vw, 92px); padding: 14px 8px 10px; border-radius: 18px; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.14); }
.h2-count b { display: block; font: 700 clamp(28px, 6vw, 44px) 'Sora', sans-serif; font-variant-numeric: tabular-nums; line-height: 1.1; }
.h2-count span { font: 500 11px 'IBM Plex Mono', monospace; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.6); }
.h2-count-note { margin: 14px auto 0 !important; text-align: center; font: 500 12.5px 'IBM Plex Mono', monospace; color: rgba(255, 255, 255, 0.55) !important; }
html:not(.bf-live) .h2-count { opacity: 0.55; }
.h2-bf-cards { display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px; }
.h2-bf-card { position: relative; overflow: hidden; border-radius: 30px; border: 1px solid rgba(255, 255, 255, 0.14); background: linear-gradient(160deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03)); min-height: 420px; }
.h2-bf-card-in { position: relative; z-index: 2; padding: clamp(26px, 4vw, 46px); max-width: 520px; }
.h2-bf-card h3 { margin: 14px 0 12px; font: 700 clamp(26px, 3.6vw, 40px) 'Sora', sans-serif; letter-spacing: -0.02em; line-height: 1.1; }
.h2-bf-card p { margin: 0 0 14px; font-size: 16px; line-height: 1.55; color: rgba(255, 255, 255, 0.8); }
.h2-bf-card ul { margin: 0 0 24px; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 14.5px; color: rgba(255, 255, 255, 0.85); }
.h2-bf-card li { display: flex; gap: 10px; } .h2-bf-card li::before { content: '✓'; color: var(--h2-bf); font-weight: 700; }
.h2-bf-pill { display: inline-block; padding: 5px 14px; border-radius: 100px; background: var(--h2-bf); color: #231400; font: 700 14px 'IBM Plex Mono', monospace; }
.h2-bf-card--books { display: flex; flex-direction: column; }
.h2-bf-books { position: relative; z-index: 1; height: clamp(150px, 20vw, 230px); margin-top: auto; pointer-events: none; }
.h2-bf-books img { position: absolute; left: 50%; bottom: -14%; width: clamp(96px, 14vw, 170px); height: auto; transform: translateX(calc(-50% + var(--i) * 38%)) rotate(calc(var(--i) * 3deg)); filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.55)); }
.h2-code { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 0; padding: 12px 14px; border-radius: 16px; background: rgba(0, 0, 0, 0.35); border: 1px dashed rgba(255, 180, 84, 0.6); }
.h2-code span { font: 500 11px 'IBM Plex Mono', monospace; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.6); }
.h2-code b { font: 700 clamp(17px, 2.6vw, 22px) 'IBM Plex Mono', monospace; letter-spacing: 0.06em; color: var(--h2-bf); }
.h2-copy { margin-left: auto; padding: 8px 16px; border-radius: 100px; border: 1px solid rgba(255, 255, 255, 0.35); background: transparent; color: #fff; font: 600 13px 'Work Sans', sans-serif; cursor: pointer; }
.h2-copy:hover { background: rgba(255, 255, 255, 0.14); }

/* ---------- Apps bento ---------- */
.h2-bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }
.h2-tile { position: relative; overflow: hidden; display: flex; flex-direction: column; grid-column: span 2; border-radius: 28px; background: var(--h2-soft); border: 1px solid var(--h2-line); transition: transform .3s ease, box-shadow .3s ease; }
html[data-theme="dark"] .h2-tile { background: #12171E; border-color: #232B36; }
.h2-tile:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -34px rgba(11, 18, 36, 0.5); }
.h2-tile--big { grid-column: span 3; }
.h2-tile-media { display: block; overflow: hidden; aspect-ratio: 4 / 3; background: #0B1224; }
.h2-tile-media img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; transition: transform .8s ease; }
.h2-tile:hover .h2-tile-media img { transform: scale(1.05); }
.h2-tile-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.h2-tile-name { display: inline-flex; align-items: center; gap: 8px; font: 600 12.5px 'IBM Plex Mono', monospace; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.h2-tile-name img { border-radius: 7px; }
.h2-tile h3 { margin: 0; font: 700 clamp(20px, 2.4vw, 26px) 'Sora', sans-serif; letter-spacing: -0.02em; line-height: 1.18; }
.h2-tile p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--text-muted); }
.h2-links { display: flex; gap: 18px; margin-top: auto; padding-top: 10px; font-weight: 600; font-size: 15px; }
.h2-links a { color: var(--h2-blue); }
html[data-theme="dark"] .h2-links a { color: var(--h2-sky); }

/* ---------- Academy ---------- */
.h2-stats { list-style: none; margin: 0 auto clamp(40px, 6vw, 64px); padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; max-width: 900px; }
.h2-stats li { padding: 26px 12px; text-align: center; border-radius: 24px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12); }
.h2-stats b { display: block; font: 700 clamp(34px, 6vw, 60px) 'Sora', sans-serif; letter-spacing: -0.03em; line-height: 1; color: #fff; }
.h2-stats span { display: block; margin-top: 8px; font-size: 14px; color: rgba(255, 255, 255, 0.7); }
.h2-plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 900px; margin: 0 auto; }
.h2-plan { position: relative; padding: clamp(26px, 4vw, 40px); border-radius: 30px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.14); display: flex; flex-direction: column; color: #fff; }
.h2-plan--hl { background: linear-gradient(160deg, #2D5FE0, #173A99); border-color: rgba(255, 255, 255, 0.3); box-shadow: 0 40px 80px -40px rgba(34, 82, 204, 0.9); }
.h2-plan-badge { position: absolute; top: 18px; right: 18px; padding: 4px 12px; border-radius: 100px; background: #fff; color: var(--h2-blue); font: 700 11px 'IBM Plex Mono', monospace; letter-spacing: 0.06em; text-transform: uppercase; }
.h2-plan h3 { margin: 0; font: 700 28px 'Sora', sans-serif; }
.h2-plan-sub { margin: 4px 0 18px; color: rgba(255, 255, 255, 0.75); font-size: 15px; }
.h2-plan-price { margin: 0; display: flex; align-items: baseline; gap: 6px; }
.h2-plan-price b { font: 700 clamp(38px, 5vw, 52px) 'Sora', sans-serif; letter-spacing: -0.03em; }
.h2-plan-price span { color: rgba(255, 255, 255, 0.75); }
.h2-plan-alt { margin: 6px 0 20px; font-size: 13.5px; color: rgba(255, 255, 255, 0.7); }
.h2-plan ul { margin: 0 0 26px; padding: 0; list-style: none; display: grid; gap: 10px; font-size: 15px; flex: 1; }
.h2-plan li { display: flex; gap: 10px; } .h2-plan li::before { content: '✓'; color: var(--h2-sky); font-weight: 700; }
.h2-plan--hl li::before { color: #fff; }
.h2-fine { max-width: 760px; margin: 32px auto 0; text-align: center; font-size: 13.5px; line-height: 1.55; color: rgba(255, 255, 255, 0.6); }

/* ---------- Flight duo, why ---------- */
.h2-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 980px; margin: 0 auto; }
.h2-duo-card { display: flex; flex-direction: column; gap: 10px; padding: clamp(26px, 4vw, 40px); border-radius: 30px; background: var(--bg); border: 1px solid var(--h2-line); color: var(--text); transition: transform .3s ease, box-shadow .3s ease; }
html[data-theme="dark"] .h2-duo-card { background: #171D25; border-color: #2A323D; }
.h2-duo-card:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -36px rgba(11, 18, 36, 0.45); color: var(--text); }
.h2-duo-ico img { border-radius: 14px; }
.h2-duo-card h3 { margin: 6px 0 0; font: 700 28px 'Sora', sans-serif; letter-spacing: -0.02em; }
.h2-duo-card p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--text-muted); }
.h2-duo-go { margin-top: 8px; font-weight: 600; color: var(--h2-blue); }
.h2-why { background: var(--bg); }
.h2-why-grid { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; max-width: 1000px; }
.h2-why-grid li { padding: 28px; border-radius: 24px; border: 1px solid var(--h2-line); display: flex; flex-direction: column; gap: 8px; }
.h2-why-grid b { font: 700 20px 'Sora', sans-serif; letter-spacing: -0.01em; }
.h2-why-grid span { font-size: 15px; line-height: 1.55; color: var(--text-muted); }

/* ---------- Final call ---------- */
.h2-final { text-align: center; color: #fff; padding: clamp(80px, 12vw, 150px) 0; background: radial-gradient(800px 420px at 50% 0%, rgba(255, 180, 84, 0.25), transparent 60%), #05080F; }
.h2-final h2 { margin: 0 0 18px; font: 700 clamp(36px, 7vw, 80px) 'Sora', sans-serif; line-height: 1.04; letter-spacing: -0.035em; text-wrap: balance; }
.h2-final p { margin: 0 auto; max-width: 620px; font-size: clamp(17px, 2vw, 21px); color: rgba(255, 255, 255, 0.78); }

/* ---------- Scroll reveal ---------- */
.h2-js [data-rv] { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.h2-js [data-rv].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .h2-js [data-rv] { opacity: 1; transform: none; transition: none; } .h2-stage img { animation: none; } }

/* The generated blocks (books, news) keep their markup: spacing only */
.h2-body .shop-home { padding-top: clamp(40px, 6vw, 80px); }

@media (max-width: 960px) {
  .h2-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h2-tile, .h2-tile--big { grid-column: span 1; }
  .h2-bf-cards { grid-template-columns: minmax(0, 1fr); }
  .h2-why-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .h2-bento { grid-template-columns: minmax(0, 1fr); }
  .h2-plans, .h2-duo { grid-template-columns: minmax(0, 1fr); }
  .h2-stats { gap: 8px; } .h2-stats li { padding: 18px 6px; border-radius: 18px; }
  .h2-bf-books { opacity: 0.35; width: 80%; }
  .h2-cta .h2-btn { flex: 1 1 100%; }
  .h2-stage img { border-radius: 18px 18px 0 0; }
  .h2-bar a { font-size: 12.5px; }
}

/* ---------- /blackfriday/ page ---------- */
.h2-bf--page { padding-top: clamp(96px, 12vw, 160px); }
.h2-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; max-width: 1080px; margin: 0 auto; }
.h2-step { padding: 28px; border-radius: 26px; background: var(--h2-soft); border: 1px solid var(--h2-line); }
html[data-theme="dark"] .h2-step { background: #12171E; border-color: #232B36; }
.h2-step b { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--h2-blue); color: #fff; font: 700 17px 'Sora', sans-serif; }
.h2-step h3 { margin: 18px 0 8px; font: 700 22px 'Sora', sans-serif; letter-spacing: -0.02em; }
.h2-step p { margin: 0; font-size: 15.5px; line-height: 1.55; color: var(--text-muted); }
.h2-step code, .h2-cond code { padding: 2px 7px; border-radius: 7px; background: rgba(34, 82, 204, 0.1); color: var(--h2-blue); font: 600 0.92em 'IBM Plex Mono', monospace; }
.h2-cond { max-width: 820px; margin: 0 auto; padding: clamp(24px, 4vw, 44px); border-radius: 28px; background: var(--bg); border: 1px solid var(--h2-line); }
html[data-theme="dark"] .h2-cond { background: #0E1217; border-color: #232B36; }
.h2-cond dl { margin: 0; }
.h2-cond dt { margin: 26px 0 6px; font: 600 12.5px 'IBM Plex Mono', monospace; letter-spacing: 0.1em; text-transform: uppercase; color: var(--h2-blue); }
.h2-cond dt:first-child { margin-top: 0; }
.h2-cond dd { margin: 0; font-size: 16px; line-height: 1.6; color: var(--text); }
@media (max-width: 860px) { .h2-steps { grid-template-columns: 1fr; } }
