/* Page sections. Ported from the concept, made full-bleed with inner containers. */

/* ---------- Page header (inner pages) ---------- */
.section--page-header { padding: calc(var(--section-y) * 0.6) 0 calc(var(--section-y) * 0.5); background: linear-gradient(170deg, #F7F8FA 0%, #EEF2F7 100%); overflow: hidden; }
.section--page-header::after {
  content: ''; position: absolute; right: -120px; top: -80px; width: 420px; height: 420px; pointer-events: none;
  background: radial-gradient(circle, rgba(91, 164, 201, 0.10), transparent 65%);
}
.section--page-header .section-title { font-size: clamp(2.4rem, 4.5vw, 4rem); letter-spacing: -0.04em; }
.section--page-header.section--dark { background: var(--navy-deep); }
.section--page-header .reveal { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.section--hero {
  min-height: min(calc(100vh - var(--header-h)), 860px); padding: 80px 0; display: flex; align-items: center;
  background: linear-gradient(170deg, #F7F8FA 0%, #EEF2F7 50%, #F7F8FA 100%); overflow: hidden;
}
.hex-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.hero-hex-banner { position: absolute; bottom: -10px; left: 0; width: 100%; height: auto; opacity: 0.06; pointer-events: none; z-index: 0; }
.hero__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; position: relative; z-index: 2; }
.hero--none .hero__grid, .hero--image .hero__grid:not(:has(.hero-visual)) { grid-template-columns: 1fr; }
.hero--none .hero-content { max-width: 820px; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 28px; padding: 6px 16px;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--navy);
  border: 1px solid rgba(27, 58, 92, 0.15); border-radius: 100px; background: rgba(27, 58, 92, 0.04);
}
.live-hex { width: 8px; height: 8px; background: var(--orange); animation: pulse-hex 2s ease infinite; }
@keyframes pulse-hex { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.hero-h1 {
  font-family: var(--font-display); font-size: clamp(3rem, 5.5vw, 5.5rem); font-weight: 700;
  line-height: 1.02; letter-spacing: -0.04em; margin-bottom: 28px; color: var(--navy-deep);
}
.hero-h1 .accent { color: var(--orange-deep); } /* large text: 3.6:1 on --bg */
.hero-h1 .line { display: block; overflow: hidden; }
.hero-h1 .line > span { display: inline-block; transform: translateY(110%); animation: slideUp 0.8s var(--ease-out) forwards; }
.hero-h1 .line:nth-child(2) > span { animation-delay: 0.1s; }
.hero-h1 .line:nth-child(3) > span { animation-delay: 0.2s; }
@keyframes slideUp { to { transform: translateY(0); } }
.hero-sub { font-size: 1.15rem; color: var(--muted); line-height: 1.7; max-width: 520px; margin-bottom: 40px; opacity: 0; animation: fadeIn 0.8s ease 0.5s forwards; }
@keyframes fadeIn { to { opacity: 1; } }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; opacity: 0; animation: fadeIn 0.8s ease 0.65s forwards; }
.hero-visual { position: relative; display: flex; justify-content: center; align-items: center; opacity: 0; animation: fadeIn 1s ease 0.4s forwards; }
.hero-visual--image img { border-radius: var(--radius-xl); box-shadow: var(--shadow-card); }
@media (prefers-reduced-motion: reduce) {
  .hero-h1 .line > span, .hero-sub, .hero-actions, .hero-visual { animation: none; opacity: 1; transform: none; }
  .live-hex { animation: none; }
}

/* Dashboard mock */
.dashboard-mock {
  width: 100%; max-width: 600px; background: #fff; border-radius: var(--radius-xl); overflow: hidden;
  box-shadow: 0 2px 4px rgba(15, 33, 55, 0.02), 0 20px 60px rgba(15, 33, 55, 0.1); border: 1px solid rgba(15, 33, 55, 0.06);
  transform: perspective(1000px) rotateY(-4deg) rotateX(2deg); transition: transform 0.6s ease;
}
.dash-topbar { display: flex; align-items: center; gap: 8px; padding: 14px 20px; background: var(--navy-deep); border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.dash-dot { width: 10px; height: 10px; border-radius: 50%; }
.dash-dot.r { background: var(--orange); } .dash-dot.y { background: var(--green); } .dash-dot.g { background: var(--teal); }
.dash-url { flex: 1; text-align: center; font-size: 0.72rem; color: rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.06); border-radius: 4px; padding: 4px 12px; margin: 0 40px 0 8px; border: 1px solid rgba(255, 255, 255, 0.06); }
.dash-body { padding: 24px; }
.dash-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.dash-title { font-weight: 700; font-size: 1rem; color: var(--navy); }
.dash-badge { display: flex; align-items: center; gap: 4px; font-size: 0.7rem; font-weight: 600; background: var(--green-12); color: var(--green-text); padding: 4px 10px; border-radius: 100px; }
.dash-badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--green-text); animation: pulse-hex 2s ease infinite; }
.dash-chart { display: flex; align-items: flex-end; gap: 8px; height: 120px; margin-bottom: 20px; padding: 0 4px; }
.chart-bar { flex: 1; border-radius: 6px 6px 2px 2px; position: relative; transform: scaleY(0); transform-origin: bottom; animation: growBar 1s var(--ease-out) forwards; }
.chart-bar::after { content: attr(data-val); position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 0.6rem; font-weight: 600; color: var(--muted); opacity: 0; transition: opacity var(--dur); }
.dashboard-mock:hover .chart-bar::after { opacity: 1; }
@keyframes growBar { to { transform: scaleY(1); } }
.chart-bar:nth-child(1) { height: 45%; background: rgba(91, 164, 201, 0.2); animation-delay: 0.8s; }
.chart-bar:nth-child(2) { height: 70%; background: rgba(27, 58, 92, 0.25); animation-delay: 0.9s; }
.chart-bar:nth-child(3) { height: 55%; background: rgba(141, 194, 111, 0.3); animation-delay: 1s; }
.chart-bar:nth-child(4) { height: 85%; background: rgba(232, 122, 62, 0.35); animation-delay: 1.1s; }
.chart-bar:nth-child(5) { height: 60%; background: rgba(91, 164, 201, 0.3); animation-delay: 1.2s; }
.chart-bar:nth-child(6) { height: 95%; background: var(--navy); animation-delay: 1.3s; }
.chart-bar:nth-child(7) { height: 75%; background: rgba(232, 122, 62, 0.5); animation-delay: 1.4s; }
.chart-bar:nth-child(8) { height: 50%; background: rgba(141, 194, 111, 0.25); animation-delay: 1.5s; }
.dash-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat-card { background: #F8FAFB; border-radius: 10px; padding: 14px; border: 1px solid rgba(15, 33, 55, 0.04); }
.stat-label { font-size: 0.65rem; color: var(--muted); font-weight: 500; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-val { font-size: 1.2rem; font-weight: 700; font-family: var(--font-display); color: var(--navy); }
.stat-change { font-size: 0.65rem; font-weight: 600; color: var(--green-text); margin-top: 2px; }
.float-card { position: absolute; background: #fff; border-radius: 12px; padding: 14px 18px; box-shadow: var(--shadow-soft); border: 1px solid rgba(15, 33, 55, 0.05); z-index: 10; animation: float 6s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.float-card.top-right { top: 20px; right: -20px; animation-delay: 1s; border-left: 3px solid var(--orange); }
.float-card.bottom-left { bottom: 30px; left: -30px; animation-delay: 2s; border-left: 3px solid var(--green); }
.float-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; margin-bottom: 6px; font-size: 0.85rem; }
.float-card.top-right .float-icon { background: var(--orange-10); }
.float-card.bottom-left .float-icon { background: var(--green-12); }
.float-label { font-size: 0.65rem; color: var(--muted); font-weight: 500; }
.float-val { font-size: 0.9rem; font-weight: 700; color: var(--navy); }
@media (prefers-reduced-motion: reduce) {
  .chart-bar { animation: none; transform: none; }
  .float-card, .dash-badge::before { animation: none; }
}

/* ---------- Marquee ---------- */
.section--marquee { padding: 40px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); overflow: hidden; background: #fff; }
.marquee-track { display: flex; width: max-content; animation: marquee 35s linear infinite; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.section--marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item { display: flex; align-items: center; gap: 12px; padding: 0 40px; font-family: var(--font-display); font-size: 0.95rem; font-weight: 500; color: var(--muted); white-space: nowrap; }
.m-hex { width: 8px; height: 8px; background: var(--navy); }
.marquee-item:nth-child(4n+2) .m-hex { background: var(--orange); }
.marquee-item:nth-child(4n+3) .m-hex { background: var(--teal); }
.marquee-item:nth-child(4n+4) .m-hex { background: var(--green); }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; row-gap: 12px; } }

/* ---------- Metrics ---------- */
.section--metrics { padding: 60px 0; overflow: hidden; }
.section--metrics::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; background-size: 60px 60px;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolygon points='30,2 55,17 55,43 30,58 5,43 5,17' fill='none' stroke='rgba(255,255,255,0.03)' stroke-width='1'/%3E%3C/svg%3E");
}
.metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; position: relative; z-index: 1; }
.metrics-grid:has(.metric:nth-child(3):last-child) { grid-template-columns: repeat(3, 1fr); }
.metrics-grid:has(.metric:nth-child(2):last-child) { grid-template-columns: repeat(2, 1fr); max-width: 720px; margin-inline: auto; }
.metric { text-align: center; }
.metric-num { font-family: var(--font-display); font-size: clamp(2.5rem, 4vw, 3.5rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1; margin-bottom: 8px; color: var(--orange-glow); }
.metric:nth-child(4n+2) .metric-num { color: var(--teal-light); }
.metric:nth-child(4n+3) .metric-num { color: var(--green); }
.metric-label { font-size: 0.85rem; color: rgba(247, 248, 250, 0.72); }

/* ---------- Steps ---------- */
.section--steps { overflow: hidden; }
.section--steps .glow { position: absolute; width: 600px; height: 600px; border-radius: 50%; top: -200px; right: -200px; pointer-events: none; background: radial-gradient(circle, rgba(232, 122, 62, 0.06), transparent 70%); }
.section--steps .glow-2 { position: absolute; width: 400px; height: 400px; border-radius: 50%; bottom: -100px; left: -100px; pointer-events: none; background: radial-gradient(circle, rgba(91, 164, 201, 0.05), transparent 70%); }
.hex-pattern-overlay {
  position: absolute; inset: 0; pointer-events: none; background-size: 60px 60px;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolygon points='30,2 55,17 55,43 30,58 5,43 5,17' fill='none' stroke='rgba(255,255,255,0.02)' stroke-width='1'/%3E%3C/svg%3E");
}
.section--steps .container { position: relative; z-index: 1; }
.how-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: -24px; }
.how-step { padding: 40px 32px; border-right: 1px solid var(--border-light); transition: background 0.4s ease; }
.how-step:last-child { border-right: 0; }
.how-step:hover { background: rgba(255, 255, 255, 0.03); }
.step-num { font-family: var(--font-display); font-size: 4rem; font-weight: 700; line-height: 1; margin-bottom: 24px; color: rgba(240, 145, 88, 0.45); }
.how-step:nth-child(4n+2) .step-num { color: rgba(141, 200, 232, 0.45); }
.how-step:nth-child(4n+3) .step-num { color: rgba(141, 194, 111, 0.45); }
.step-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 12px; color: var(--text-light); }
.step-desc { font-size: 0.88rem; color: rgba(247, 248, 250, 0.72); line-height: 1.65; }

/* ---------- Modules ---------- */
.modules-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.module-card {
  display: flex; gap: 24px; align-items: flex-start; padding: 32px; background: var(--bg); border-radius: var(--radius-lg);
  border: 1px solid rgba(15, 33, 55, 0.05); position: relative; overflow: hidden; text-decoration: none; color: inherit;
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}
.module-card::after { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 0; transition: height 0.4s ease; border-radius: 0 2px 2px 0; background: var(--orange); }
.module-card:nth-child(4n+2)::after { background: var(--teal); }
.module-card:nth-child(4n+3)::after { background: var(--green); }
.module-card:nth-child(4n+4)::after { background: var(--navy); }
.module-card:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(15, 33, 55, 0.08); border-color: rgba(27, 58, 92, 0.1); color: inherit; }
.module-card:hover::after { height: 100%; }
.module-num { font-family: var(--font-display); font-size: 2.5rem; font-weight: 700; line-height: 1; min-width: 50px; color: rgba(232, 122, 62, 0.2); }
.module-card:nth-child(4n+2) .module-num { color: rgba(91, 164, 201, 0.25); }
.module-card:nth-child(4n+3) .module-num { color: rgba(141, 194, 111, 0.25); }
.module-card:nth-child(4n+4) .module-num { color: rgba(27, 58, 92, 0.15); }
.module-info { flex: 1; }
.module-name { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; color: var(--navy-deep); }
.module-desc { font-size: 0.88rem; color: var(--muted); line-height: 1.65; }
.module-tag { display: inline-block; margin-top: 12px; font-size: 0.72rem; font-weight: 700; padding: 3px 10px; border-radius: 100px; background: rgba(232, 122, 62, 0.10); color: var(--orange-text); }
.module-card:nth-child(4n+2) .module-tag { background: rgba(91, 164, 201, 0.12); color: var(--teal-text); }
.module-card:nth-child(4n+3) .module-tag { background: rgba(141, 194, 111, 0.14); color: var(--green-text); }
.module-card:nth-child(4n+4) .module-tag { background: rgba(27, 58, 92, 0.06); color: var(--navy); }

/* ---------- Testimonial ---------- */
.section--testimonial { padding: 100px 0; background: linear-gradient(180deg, #fff 0%, var(--bg) 100%); overflow: hidden; }
.hex-bg-deco { position: absolute; color: var(--navy); opacity: 0.04; pointer-events: none; }
.hex-bg-deco.tl { top: -20px; left: -40px; width: 200px; height: 200px; }
.hex-bg-deco.br { bottom: -30px; right: -20px; width: 160px; height: 160px; }
.testimonial-card { max-width: 800px; margin: 0 auto; text-align: center; position: relative; z-index: 1; }
.testimonial-quote {
  font-family: var(--font-display); font-size: clamp(1.5rem, 2.5vw, 2rem); font-weight: 500; line-height: 1.5; letter-spacing: -0.02em;
  margin-bottom: 32px; color: var(--navy-deep); position: relative; padding-top: 24px;
}
.testimonial-quote::before { content: '\201C'; font-family: Georgia, serif; font-size: 6rem; font-weight: 700; line-height: 1; color: rgba(232, 122, 62, 0.22); position: absolute; top: -24px; left: 50%; transform: translateX(-50%); }
.testimonial-logo img { max-height: 40px; width: auto; margin: 0 auto 16px; }
.testimonial-author { font-size: 0.95rem; font-weight: 600; color: var(--navy); }
.testimonial-role { font-size: 0.85rem; color: var(--muted); margin-top: 4px; }

/* ---------- CTA ---------- */
.section--cta { text-align: center; overflow: hidden; }
.cta-bg { position: absolute; inset: 0; background: radial-gradient(circle at 25% 50%, rgba(232, 122, 62, 0.05) 0%, transparent 50%), radial-gradient(circle at 75% 50%, rgba(91, 164, 201, 0.05) 0%, transparent 50%); }
.cta-content { position: relative; z-index: 2; }
.cta-title { font-family: var(--font-display); font-size: clamp(2.5rem, 4.5vw, 4rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1.08; margin-bottom: 20px; color: var(--navy-deep); }
.cta-sub { font-size: 1.1rem; color: var(--muted); margin: 0 auto 40px; line-height: 1.7; max-width: 640px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }

/* ---------- JotForm ---------- */
.jotform__grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; align-items: start; }
.jotform--stacked .jotform__grid { grid-template-columns: 1fr; max-width: calc(var(--container-narrow) + var(--gutter) * 2); }
.jotform--stacked .section-header { max-width: none; text-align: center; margin-bottom: 40px; }
.jotform__intro { position: sticky; top: calc(var(--header-h) + 32px); }
.jotform--stacked .jotform__intro { position: static; }
.jotform__intro .section-header { margin-bottom: 32px; }
.jotform__aside { font-size: 0.98rem; }
.jotform__frame { background: #fff; border-radius: var(--radius-xl); border: 1px solid var(--border); box-shadow: var(--shadow-soft); padding: 12px; }
.jotform__frame iframe { width: 100%; border: 0; border-radius: var(--radius); }

/* ---------- Media + text ---------- */
.media-text__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.media-text--left .media-text__media { order: -1; }
.media-text__grid:not(:has(.media-text__media)) { grid-template-columns: 1fr; max-width: calc(820px + var(--gutter) * 2); }
.media-text__copy .section-header { margin-bottom: 24px; }
.media-text__copy .section-title { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.media-text__btn { margin-top: 32px; }
.media-text__media img { border-radius: var(--radius-xl); box-shadow: var(--shadow-card); width: 100%; }

/* ---------- Rich text / content ---------- */
.section--rich-text .section-header { margin-bottom: 40px; }
.section--content { padding-top: calc(var(--section-y) * 0.6); }
.section--page-header + .section--content, .section--page-header + .section--rich-text { padding-top: calc(var(--section-y) * 0.6); }

/* ---------- Latest posts ---------- */
.latest-posts__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; }
.latest-posts__head .section-header { margin-bottom: 48px; }
.latest-posts__btn { margin-bottom: 48px; flex: none; }
@media (max-width: 768px) {
  .latest-posts__head { flex-direction: column; align-items: flex-start; }
  .latest-posts__btn { margin: -24px 0 40px; }
}

/* ---------- Video ---------- */
.video-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.video-grid:has(.video-card:only-child) { grid-template-columns: 1fr; max-width: 960px; margin-inline: auto; }
.video-grid:has(.video-card:nth-child(3)) { grid-template-columns: repeat(3, 1fr); gap: 24px; }
.section--video + .section--testimonial { padding-top: 40px; }
.section--testimonial + .section--video { padding-top: 60px; }
.video-card__frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-xl); overflow: hidden; background: var(--navy-deep); box-shadow: var(--shadow-card); }
.video-card__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-card__title { margin-top: 16px; font-weight: 600; color: var(--navy-deep); }
@media (max-width: 768px) { .video-grid { grid-template-columns: 1fr; } }

/* Portrait or photo used as a card icon: larger, still hex-clipped */
.feature-icon:has(img) { width: 88px; height: 88px; background: var(--bg) !important; }
.feature-icon:has(img) img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Posts archive ---------- */
.section--posts { padding-top: calc(var(--section-y) * 0.6); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { max-width: 600px; margin-inline: auto; }
  .metrics-grid, .metrics-grid:has(.metric:nth-child(3):last-child) { grid-template-columns: repeat(2, 1fr); }
  .how-grid { grid-template-columns: repeat(2, 1fr); }
  .how-step:nth-child(2) { border-right: 0; }
  .how-step:nth-child(1), .how-step:nth-child(2) { border-bottom: 1px solid var(--border-light); }
  .modules-grid { grid-template-columns: 1fr; }
  .jotform__grid, .media-text__grid { grid-template-columns: 1fr; gap: 40px; }
  .jotform__intro { position: static; }
  .media-text--left .media-text__media { order: 0; }
}
@media (max-width: 768px) {
  .section--hero { min-height: 0; padding: 48px 0 64px; }
  .hero-h1 { font-size: clamp(2.5rem, 11vw, 3.5rem); }
  .how-grid { grid-template-columns: 1fr; }
  .how-step { border-right: 0 !important; border-bottom: 1px solid var(--border-light); padding: 32px 0; }
  .how-step:last-child { border-bottom: 0; }
  .section--metrics { padding: 40px 0; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .cta-actions { flex-direction: column; align-items: center; }
  .float-card { display: none; }
  .module-card { padding: 24px; gap: 16px; }
  .dashboard-mock { transform: none; }
}
