/*
HeyIO public site overrides. Loaded after theme.css and dark-theme.css on the public layouts.
*/

/*
Stop sideways overflow on phones. AOS starts "fade-left" images 100px to the right until they
are scrolled into view, which made the page wider than the screen (about 444px on a 344px
Galaxy Z Fold cover display). Chrome then laid the page out at that width and zoomed in, and the
fixed mobile navbar (left:0; right:0) stretched with it, pushing the menu button and theme toggle
off the right edge. Below 992px the columns stack, so let them fade in without sliding.
*/
@media (max-width: 991.98px) {
  [data-aos=fade-left],
  [data-aos=fade-right] {
    transform: none;
  }
}

/*
Backstop for anything else that pokes out sideways. "clip" (with "hidden" as the fallback)
doesn't create a scroll container, so fixed/sticky elements keep working. .header-7 holds the
navbar and the homepage hero; it gets no "hidden" fallback because that would also clip it
vertically and could cut off the Services menu.
*/
#mainBody1 {
  overflow-x: hidden;
  overflow-x: clip;
}

.header-7 {
  overflow-x: clip;
}

/* ---------------------------------------------------------------------------
   Services menu (navbar). Built from ServiceCatalog in _NavMenu.cshtml.
   Phones/tablets: a stacked list inside the collapsed menu (tap "Services").
   Desktop: a two-column panel centred under the navbar, opened on hover,
   keyboard focus or click.
--------------------------------------------------------------------------- */
.services-dropdown {
  padding: 0;
  overflow: hidden;
}

.services-dropdown-heading {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
  margin: 0 0 0.5rem;
  padding: 0 0.75rem;
}

.services-dropdown-main,
.services-dropdown-side {
  padding: 0.75rem 0.5rem;
}

.services-dropdown .dropdown-item {
  border-radius: 0.375rem;
  padding: 0.45rem 0.75rem;
  white-space: normal;
}

.services-dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.services-dropdown-icon {
  flex: 0 0 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.services-dropdown-title {
  display: block;
  font-weight: 600;
}

.services-dropdown-blurb {
  display: block;
  font-size: 0.8125rem;
  color: var(--bs-secondary-color);
}

.services-dropdown .dropdown-item.active,
.services-dropdown .dropdown-item:active {
  color: inherit;
  background-color: rgba(var(--bs-primary-rgb), 0.12);
}

.services-dropdown-all {
  display: block;
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  color: rgb(var(--bs-primary-rgb));
  border-top: 1px solid var(--bs-border-color);
  background-color: var(--bs-tertiary-bg);
  text-decoration: none;
}

.services-dropdown-all:hover,
.services-dropdown-all:focus {
  color: rgb(var(--bs-primary-rgb));
  text-decoration: underline;
}

@media (max-width: 991.98px) {
  /* Room for the opened Services list; the theme caps the menu at 480px. */
  .navbar-collapse {
    max-height: calc(100vh - 70px);
  }

  .services-dropdown {
    border: 0;
    background: transparent;
  }

  .services-dropdown-main,
  .services-dropdown-side {
    padding: 0.25rem 0.5rem 0.5rem 1rem;
  }

  .services-dropdown-all {
    background: transparent;
    border-top: 0;
    padding: 0.25rem 1.75rem 0.75rem;
  }
}

@media (min-width: 992px) {
  /* Position the panel against the navbar, not the menu item, so it's centred on the page. */
  .navbar.topnav-menu .services-menu {
    position: static;
  }

  .navbar.topnav-menu .services-dropdown {
    width: 46rem;
    max-width: calc(100vw - 2rem);
    padding: 0;
  }

  .services-dropdown-main {
    padding: 1.25rem 0.75rem 1rem;
  }

  .services-dropdown-side {
    padding: 1.25rem 0.75rem 1rem;
    border-left: 1px solid var(--bs-border-color);
  }

  /* Keyboard users (focus) and clicks (.show) open it too, not just hover. */
  .navbar-nav .services-menu:focus-within .services-dropdown,
  .navbar-nav .services-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translate3d(-50%, 1px, 0);
  }
}

[data-bs-theme=dark] .services-dropdown {
  --bs-dropdown-bg: #24282c;
  --bs-dropdown-link-color: #dee2e6;
  --bs-dropdown-link-hover-color: #ffffff;
  --bs-dropdown-link-hover-bg: rgba(255, 255, 255, 0.06);
  --bs-dropdown-border-color: rgba(255, 255, 255, 0.1);
  background-color: #24282c;
  color: #dee2e6;
}

[data-bs-theme=dark] .services-dropdown-all {
  background-color: #1f2326;
  border-top-color: rgba(255, 255, 255, 0.1);
  color: #6ea832;
}

@media (max-width: 991.98px) {
  [data-bs-theme=dark] .services-dropdown,
  [data-bs-theme=dark] .services-dropdown-all {
    background: transparent;
  }
}

/* ---------------------------------------------------------------------------
   Services pages
--------------------------------------------------------------------------- */

/* Anchor targets clear the fixed navbar. */
.service-anchor {
  scroll-margin-top: 80px;
}

.service-intro {
  max-width: 40rem;
}

.service-breadcrumb {
  font-size: 0.875rem;
  color: #a8b5c8;
}

.service-breadcrumb a {
  color: #d5deea;
  text-decoration: none;
}

.service-breadcrumb a:hover,
.service-breadcrumb a:focus {
  color: #ffffff;
  text-decoration: underline;
}

.service-breadcrumb span {
  margin: 0 0.4rem;
}

.service-checklist li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.service-checklist li i {
  margin-top: 0.3rem;
}

.service-step {
  height: 100%;
}

.service-step-number {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #ffffff;
  background-color: rgb(var(--bs-primary-rgb));
}

a.service-link-card {
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

a.service-link-card:hover,
a.service-link-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 0.8rem 1.2rem rgba(52, 58, 64, 0.1) !important;
}

@media (prefers-reduced-motion: reduce) {
  a.service-link-card {
    transition: none;
  }

  a.service-link-card:hover,
  a.service-link-card:focus-visible {
    transform: none;
  }
}

.services-menu-chevron {
  font-size: 0.65em;
  margin-left: 0.25rem;
  vertical-align: 0.15em;
  transition: transform 0.2s ease;
}

.services-menu .dropdown-toggle[aria-expanded=true] .services-menu-chevron {
  transform: rotate(180deg);
}

.home-ai-promises .list-inline-item {
  margin: 0 0.75rem 0.5rem;
}

/* ---------------------------------------------------------------------------
   Site pictures (Views/Shared/_Visual.cshtml, drawn by scripts/heyio-visuals).
   Each comes in a light and a dark version; only the current theme's one shows,
   and a lazy picture that doesn't show isn't downloaded.
--------------------------------------------------------------------------- */
.site-visual {
  display: block;
}

.site-visual img {
  display: block;
  width: 100%;
  height: auto;
}

.site-visual-dark {
  display: none !important;
}

[data-bs-theme=dark] .site-visual-light {
  display: none !important;
}

[data-bs-theme=dark] .site-visual-dark {
  display: block !important;
}

/* ---------------------------------------------------------------------------
   Footer and closing bands. The footer is #212529 in both themes (darker than
   .bg-dark's #343a40). Its heading must not use .text-bg-dark: that paints a
   #343a40 box behind the text. Dark closing bands above it use the footer's
   colour too, so the two read as one block.
--------------------------------------------------------------------------- */
.site-footer {
  background-color: #212529 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* The company details line: small and quiet, still readable (#8a9099 on #212529 is about 4.8:1). */
.site-footer .footer-legal {
  font-size: 0.75rem;
  line-height: 1.6;
  color: #8a9099;
}

.site-cta-band {
  background-color: #212529 !important;
}

/* Homepage hero: the line above the heading says what we do and where. */
.hero-kicker {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  /* HeyIO green, dark enough to read on white (theme --bs-primary is a leftover blue). */
  color: #1c7f10;
  margin-bottom: 0.75rem;
}

[data-bs-theme=dark] .hero-kicker {
  color: #74e062;
}

/* ---------------------------------------------------------------------------
   AI app launch checklist (/ai-app-launch-checklist, wwwroot/js/launch-checklist.js).
   Priority is always written out ("Must fix before launch"), never shown by colour alone.
--------------------------------------------------------------------------- */
.lc-steps li {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin-bottom: 1rem;
  color: var(--bs-secondary-color);
}

.lc-steps strong {
  color: var(--bs-body-color);
}

.lc-step-number {
  flex: 0 0 2rem;
  height: 2rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  background: #1c7f10;
  color: #fff;
}

.lc-group {
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  padding: 1.25rem 1.25rem 0.5rem;
  margin-bottom: 1.25rem;
  min-width: 0;
}

/* Bootstrap floats legends (float: left; width: 100%), which keeps them off the fieldset's border. */
.lc-group-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.lc-group-title i {
  color: rgb(var(--bs-primary-rgb));
  width: 1.25rem;
  text-align: center;
}

.lc-item {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 0.85rem 0;
  border-top: 1px solid var(--bs-border-color);
}

.lc-item .lc-check {
  flex: 0 0 auto;
  width: 1.35rem;
  height: 1.35rem;
  margin-top: 0.1rem;
  cursor: pointer;
}

.lc-item-body {
  min-width: 0;
}

.lc-text {
  display: inline;
  font-weight: 600;
  cursor: pointer;
  margin-right: 0.4rem;
}

.lc-done .lc-text {
  color: var(--bs-secondary-color);
}

.lc-why {
  margin: 0.3rem 0 0;
  font-size: 0.9rem;
  color: var(--bs-secondary-color);
}

.lc-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
  vertical-align: 0.1em;
}

.lc-badge-must {
  background: #fde8e8;
  color: #9b1c1c;
}

.lc-badge-soon {
  background: #fff4dc;
  color: #7a4d00;
}

[data-bs-theme=dark] .lc-badge-must {
  background: rgba(248, 113, 113, 0.18);
  color: #fca5a5;
}

[data-bs-theme=dark] .lc-badge-soon {
  background: rgba(251, 191, 36, 0.16);
  color: #fcd34d;
}

.lc-skipped .lc-items {
  opacity: 0.45;
}

.lc-skip .form-check-label {
  font-size: 0.9rem;
}

.lc-fix-first {
  padding-left: 1.1rem;
}

.lc-fix-first li {
  margin-bottom: 0.35rem;
}

/* The theme makes links inline-block, which puts the list number beside the last line. */
.lc-fix-first a {
  display: inline;
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(var(--bs-primary-rgb), 0.6);
  text-underline-offset: 2px;
}

.lc-actions .btn-link {
  color: var(--bs-body-color);
  text-decoration: underline;
}

[data-bs-theme=dark] .lc-summary .progress {
  background-color: rgba(255, 255, 255, 0.12);
}

.lc-help-text {
  max-width: 40rem;
}

@media (min-width: 992px) {
  .lc-summary {
    position: sticky;
    top: 90px;
  }
}

@media (max-width: 991.98px) {
  .lc-summary {
    margin-bottom: 1.25rem;
  }
}

/* Print / save as PDF: just the checklist and the score, black on white. */
@media print {
  .header-7,
  .site-footer,
  #cookie-consent,
  .btn-back-to-top,
  .lc-intro,
  .lc-actions,
  .lc-email,
  .lc-help,
  .lc-faqs,
  .hero-4 .btn,
  .service-breadcrumb {
    display: none !important;
  }

  [data-aos] {
    opacity: 1 !important;
    transform: none !important;
  }

  /* Black on white whatever the theme. The hero and dark theme force white text with !important on
     two-class selectors, so the attribute is repeated here to outrank them. The script also switches
     to the light theme while printing. */
  html[data-bs-theme][data-bs-theme] body,
  html[data-bs-theme][data-bs-theme] body * {
    color: #000 !important;
  }

  html[data-bs-theme][data-bs-theme] body,
  html[data-bs-theme][data-bs-theme] section,
  html[data-bs-theme][data-bs-theme] .card,
  html[data-bs-theme][data-bs-theme] .lc-group {
    background: #fff !important;
  }

  .hero-tech-dark::before,
  .hero-tech-dark::after {
    display: none !important;
  }

  .hero-4 {
    padding: 0 0 1rem !important;
  }

  .section {
    padding: 0.5rem 0 !important;
  }

  .lc-summary {
    position: static;
    box-shadow: none !important;
    border: 1px solid #999 !important;
    margin-bottom: 1rem;
  }

  /* Score first on paper. */
  .lc-layout {
    flex-direction: column-reverse;
  }

  /* Sections may run onto the next page, but never split an item or leave a title at the bottom. */
  .lc-item {
    break-inside: avoid;
  }

  .lc-group-title,
  .lc-group > p {
    break-after: avoid;
  }

  .hero-4 .hero-title {
    font-size: 1.9rem !important;
  }

  .hero-4 .fs-17 {
    font-size: 0.95rem !important;
  }

  .lc-check,
  .progress-bar,
  .lc-badge {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .lc-print-note {
    display: block !important;
    text-align: center;
    font-size: 0.8rem;
    margin-top: 1rem;
  }

  @page {
    margin: 15mm;
  }
}

/* ---------------------------------------------------------------------------
   About: who's behind HeyIO. Initials, not a photo (the site's pictures are drawn).
--------------------------------------------------------------------------- */
.founder-body {
  display: flex;
  gap: 1.75rem;
  align-items: flex-start;
}

.founder-badge {
  flex: 0 0 auto;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, #1c7f10, #33c41e);
}

.founder-text {
  min-width: 0;
}

.founder-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

@media (max-width: 575.98px) {
  .founder-body {
    flex-direction: column;
    gap: 1rem;
  }

  .founder-badge {
    width: 64px;
    height: 64px;
    font-size: 1.5rem;
  }
}

/* ---------------------------------------------------------------------------------------------
   Blog (/blog, Views/Blog). Post bodies come from Markdown, so their elements are styled here
   rather than with theme classes. Nothing may be wider than a 344px phone: tables scroll inside
   their own box and long words (URLs) wrap.
   --------------------------------------------------------------------------------------------- */
.blog-hero {
  margin-bottom: 2.5rem;
}

.blog-meta {
  font-size: 0.875rem;
  color: #6c757d;
}

.blog-card {
  overflow: hidden;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.blog-card:hover,
.blog-card:focus {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1.5rem rgba(16, 24, 40, 0.08);
}

.blog-card-image {
  background: #f6f7f9;
  border-bottom: 1px solid rgba(16, 24, 40, 0.06);
}

.blog-body {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: #3b4350;
  overflow-wrap: anywhere;
}

.blog-body h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 2.5rem 0 1rem;
  line-height: 1.3;
}

.blog-body h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
}

.blog-body p,
.blog-body ul,
.blog-body ol {
  margin-bottom: 1.25rem;
}

.blog-body a {
  color: #1c7f10;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.blog-body blockquote {
  border-left: 4px solid #33c41e;
  padding: 0.25rem 0 0.25rem 1.25rem;
  margin: 1.5rem 0;
  color: #475467;
}

.blog-body pre {
  background: #172033;
  color: #f1f3f5;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.6;
}

.blog-body code {
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

.blog-body pre code {
  overflow-wrap: normal;
  white-space: pre;
}

.blog-table {
  overflow-x: auto;
  margin-bottom: 1.5rem;
  -webkit-overflow-scrolling: touch;
}

.blog-table table {
  margin-bottom: 0;
  min-width: 100%;
  font-size: 0.95rem;
}

.blog-table th,
.blog-table td {
  overflow-wrap: normal;
}

/* Listicle: the writer numbers the headings ("## 1. …"); a green bar marks each item. */
.blog-listicle h2 {
  border-left: 4px solid #33c41e;
  padding-left: 0.75rem;
}

/* Roundup: each story is a card-like block. */
.blog-roundup h2 {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(16, 24, 40, 0.08);
}

.blog-roundup h2:first-of-type {
  border-top: 0;
  padding-top: 0;
}

/* How-to: steps stand out. */
.blog-howto h2 {
  background: #f6f7f9;
  border-radius: 10px;
  padding: 0.75rem 1rem;
}

.blog-pullquote {
  border: 0 !important;
  margin: 2.5rem 0 !important;
  padding: 0 !important;
  font-size: 1.4rem;
  line-height: 1.5;
  font-weight: 600;
  color: #1c7f10 !important;
  text-align: center;
}

.blog-pullquote p::before {
  content: "\201C";
}

.blog-pullquote p::after {
  content: "\201D";
}

.blog-takeaways {
  background: #e7f7e3;
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
}

.blog-takeaways li {
  margin-bottom: 0.4rem;
}

.blog-figure {
  margin: 2rem 0;
}

.blog-sources {
  padding-left: 1.25rem;
  overflow-wrap: anywhere;
}

.blog-sources li {
  margin-bottom: 0.5rem;
}

.blog-review-bar {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: #fff3d6;
  border-bottom: 1px solid #f5d38a;
  font-size: 0.95rem;
}

.blog-review-bar form {
  margin: 0;
}

.blog-review-bar .form-control {
  min-width: 12rem;
}

.blog-review-notes {
  padding-left: 1.25rem;
  font-size: 0.875rem;
}

[data-bs-theme=dark] .blog-meta {
  color: #adb5bd;
}

[data-bs-theme=dark] .blog-card-image {
  background: #2b3035;
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

[data-bs-theme=dark] .blog-body {
  color: #ced4da;
}

[data-bs-theme=dark] .blog-body a {
  color: #74e062;
}

[data-bs-theme=dark] .blog-body blockquote {
  color: #c3c9d1;
}

[data-bs-theme=dark] .blog-howto h2 {
  background: #2b3035;
}

[data-bs-theme=dark] .blog-roundup h2 {
  border-top-color: rgba(255, 255, 255, 0.08);
}

[data-bs-theme=dark] .blog-pullquote {
  color: #74e062 !important;
}

[data-bs-theme=dark] .blog-takeaways {
  background: rgba(51, 196, 30, 0.15);
}

[data-bs-theme=dark] .blog-review-bar {
  background: #3d3112;
  border-bottom-color: #6b5520;
  color: #f1f3f5;
}

@media (max-width: 575.98px) {
  .blog-body {
    font-size: 1rem;
  }

  .blog-body h2 {
    font-size: 1.3rem;
  }

  .blog-pullquote {
    font-size: 1.2rem;
  }

  .blog-review-bar .form-control {
    min-width: 0;
  }
}
