/*
 * WordPress-only styles.
 *
 * assets/css/main.css is the untouched Tailwind build from the Next.js export.
 * Anything WordPress renders that Next.js never did belongs here instead, so
 * main.css can be replaced wholesale by a fresh build without losing edits.
 */

/* ---------------------------------------------------------------- admin bar */

/* The header is position:fixed; the admin bar would otherwise cover it. */
body.admin-bar .site-header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}

/* ------------------------------------------------------- accessibility */

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  position: absolute !important;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  clip: auto !important;
  clip-path: none;
  height: auto;
  width: auto;
  display: block;
  top: 5px;
  left: 5px;
  z-index: 100000;
  padding: 15px 23px 14px;
  background-color: #fff;
  border-radius: 4px;
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
  color: #5932ee;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: normal;
  text-decoration: none;
}

.skip-link:focus {
  outline: 2px solid #5932ee;
  outline-offset: 2px;
}

/* --------------------------------------------------------- WP core markup */

/* Caption / alignment classes emitted by the classic editor. */
.wp-caption {
  max-width: 100%;
  margin-bottom: 1.5rem;
}

.wp-caption img {
  display: block;
  margin: 0 auto;
}

.wp-caption-text {
  margin-top: 0.5rem;
  color: #6b7280;
  font-size: 0.875rem;
  text-align: center;
}

.alignleft {
  float: left;
  margin: 0 1.5rem 1rem 0;
}

.alignright {
  float: right;
  margin: 0 0 1rem 1.5rem;
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.alignwide,
.alignfull {
  max-width: 100%;
}

.sticky .entry-title::after {
  content: "★";
  margin-left: 0.5rem;
  color: #5932ee;
}

/* Post content reuses the blog prose ruleset from the Next.js globals. */
.entry-content {
  /* .blog-ctn in main.css carries the typography; this only guards overflow. */
  overflow-wrap: break-word;
}

.entry-content img,
.blog-ctn img {
  max-width: 100%;
  height: auto;
}

/* Wide content must scroll inside itself rather than the page body. */
.entry-content table,
.blog-ctn table,
.entry-content pre,
.blog-ctn pre {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

/* ------------------------------------------------------------ mobile nav
 * The drawer is closed by default and slides in when app.js adds .is-open.
 * These rules live here rather than relying on Tailwind utilities because the
 * compiled build was tree-shaken against the React source and never saw them.
 */

.obt-mobile-nav {
  transform: translateX(100%);
  visibility: hidden;
  transition:
    transform 0.35s ease-in-out,
    visibility 0s linear 0.35s;
}

.obt-mobile-nav.is-open {
  transform: translateX(0);
  visibility: visible;
  transition:
    transform 0.35s ease-in-out,
    visibility 0s;
}

/* Chevron flips when its submenu is expanded. */
[data-mobile-submenu-toggle].is-open svg {
  transform: rotate(180deg);
}

/* -------------------------------------------------------------- accordion
 * Open-state styling for the FAQ chevron, which framer-motion handled in the
 * React source by animating rotation and swapping the pill colours.
 */

[data-accordion-item].is-open .obt-faq-chevron {
  transform: rotate(180deg);
  background-color: #5932ee;
  color: #fff;
}

/* ------------------------------------------------------- show-more grids
 * Overflow cards are present in the HTML (so they are crawlable and work
 * without JS) but hidden until the grid is expanded.
 */

[data-industry-boxes] .obt-extra-card {
  display: none;
}

[data-industry-boxes].is-expanded .obt-extra-card {
  display: block;
}

.no-js [data-industry-boxes] .obt-extra-card {
  display: block;
}

.no-js [data-industry-toggle] {
  display: none;
}

/* ---------------------------------------------------- horizontal scroller
 * Replaces the scroll-linked x-transform in ProcessSlider. Wide content
 * scrolls inside its own container so the page body never scrolls sideways.
 */

.obt-hscroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 1rem;
}

.obt-hscroll > * > * {
  scroll-snap-align: start;
}

.obt-hscroll::-webkit-scrollbar {
  height: 6px;
  background: transparent;
}

.obt-hscroll::-webkit-scrollbar-thumb {
  background: rgba(89, 50, 238, 0.3);
  border-radius: 3px;
}

/* ------------------------------------------------------------------- tabs
 * The technology-stack category buttons. React swapped Tailwind classes on the
 * active item; here the state lives in a class the CSS styles.
 */

.obt-tab.is-active {
  color: #fff;
  background-image: linear-gradient(to bottom right, #5932ee, transparent);
}

/* ----------------------------------------------------------------- modal */

.obt-modal[hidden] {
  display: none;
}

/* ------------------------------------------------------- header scroll state
 * Mirrors the framer-motion marginBottom animation on the utility bar.
 */

.site-header.is-top-hidden .top-head {
  margin-bottom: -47px;
}

@media (min-width: 1280px) {
  .site-header.is-top-hidden .top-head {
    margin-bottom: -58px;
  }
}

/* ------------------------------------------------------------ pagination */

.obt-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 9999px;
  color: #242424;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.3s ease-in-out;
}

.obt-pagination .page-numbers:hover,
.obt-pagination .page-numbers.current {
  background-color: #5932ee;
  border-color: #5932ee;
  color: #fff;
}

/* ---------------------------------------------------- motion preferences */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------- reveal-on-scroll
 * Replaces the framer-motion entrance animations from the React source.
 * Elements opt in with data-reveal; assets/js/app.js adds .is-revealed.
 */

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.6s ease-out,
    transform 0.6s ease-out;
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* Never hide content when JS fails or motion is reduced. */
.no-js [data-reveal] {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* ----------------------------------------------------------------- marquee
 * CSS replacement for react-fast-marquee.
 */

.obt-marquee {
  display: flex;
  overflow: hidden;
  user-select: none;
}

.obt-marquee__track {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: var(--obt-marquee-gap, 2rem);
  min-width: 100%;
  padding-right: var(--obt-marquee-gap, 2rem);
  animation: obt-marquee-scroll var(--obt-marquee-duration, 30s) linear infinite;
}

.obt-marquee:hover .obt-marquee__track {
  animation-play-state: paused;
}

@keyframes obt-marquee-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .obt-marquee__track {
    animation: none;
  }
}

/* --------------------------------------------------- Tailwind utility gap fill
 *
 * main.css is the compiled Tailwind build from the Next.js export, so it only
 * contains classes the React source actually used. The templates here emit a
 * handful of utilities that source never did — mostly around the inline SVG
 * icons that replaced react-icons, and the button tooltip's named group. Those
 * classes had no rule behind them, so icons rendered unsized and hover states
 * did nothing.
 *
 * Each rule below reproduces exactly what Tailwind would have generated.
 */

/* Inline SVG icons: react-icons sized glyphs to 1em and inherited currentColor. */
.w-\[1em\]  { width: 1em; }
.h-\[1em\]  { height: 1em; }
.fill-current { fill: currentColor; }
.fill-none    { fill: none; }

/* Named group, used by the button tooltip so it does not react to outer groups. */
.group\/btn:hover .group-hover\/btn\:opacity-100 { opacity: 1; }
.group\/btn:hover .group-hover\/btn\:translate-y-0 {
  --tw-translate-y: 0;
  translate: var(--tw-translate-x, 0) 0;
}

/* Spacing / sizing */
.py-1\.5   { padding-block: calc(var(--spacing) * 1.5); }
.pl-7      { padding-left: calc(var(--spacing) * 7); }
.max-w-8xl { max-width: 88rem; }
.leading-snug { --tw-leading: 1.375; line-height: 1.375; }
.last\:mb-0:last-child { margin-bottom: 0; }

@media (min-width: 64rem) {
  .lg\:p-8 { padding: calc(var(--spacing) * 8); }
}

@media (min-width: 80rem) {
  .xl\:py-32 { padding-block: calc(var(--spacing) * 32); }
  .xl\:gap-20 { gap: calc(var(--spacing) * 20); }
}

/* Layering: the contact modal sits above the fixed header. */
.z-70 { z-index: 70; }
.z-80 { z-index: 80; }
.bg-black\/60 { background-color: color-mix(in oklab, #000 60%, transparent); }

/* Transitions */
.duration-400 { --tw-duration: 400ms; transition-duration: 400ms; }
.transition-\[margin\] {
  transition-property: margin;
  transition-timing-function: var(--tw-ease, ease);
  transition-duration: var(--tw-duration, 0s);
}

/* Form states */
.placeholder\:text-gray-400::placeholder { color: var(--color-gray-400); }
.disabled\:opacity-70:disabled { opacity: 0.7; }
.divide-gray-100 > :not(:last-child) { border-color: var(--color-gray-100); }

@media (hover: hover) {
  .hover\:shadow-lg:hover {
    --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, #0000001a),
                 0 4px 6px -4px var(--tw-shadow-color, #0000001a);
    box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000),
                var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
  }
}
