/* ==========================================================================
   IT WEBHUT — Typography & UI polish
   Fonts: Outfit (headings / display) + Hind (body / UI)
   Loaded LAST in layouts/itwh.blade.php so it wins over theme + page styles.
   ========================================================================== */

/* ---------- 1. Font tokens (every theme variable points to the 2 brand fonts) */
:root {
  --itwh-font-head: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --itwh-font-body: "Hind", system-ui, -apple-system, "Segoe UI", sans-serif;

  --font_teko: var(--itwh-font-head);
  --font_kanit: var(--itwh-font-head);
  --font_mona: var(--itwh-font-head);
  --font_playfair: var(--itwh-font-head);
  --font_instrument: var(--itwh-font-body);
  --font_inter: var(--itwh-font-body);
  --misiom-font: var(--itwh-font-body);
  --ch-display: var(--itwh-font-head);
  --ch-body: var(--itwh-font-body);
  --ref-font: var(--itwh-font-body);

  --itwh-ease: cubic-bezier(.22, .61, .36, 1);
  --itwh-radius: 14px;
}

/* ---------- 2. Base text rendering */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html,
body {
  /* clip (not hidden) so position:sticky + GSAP ScrollSmoother keep working */
  overflow-x: clip;
}

body {
  font-family: var(--itwh-font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

p,
li,
label,
input,
select,
textarea,
button,
.btn,
blockquote,
figcaption,
td,
th {
  font-family: var(--itwh-font-body);
}

p {
  line-height: 1.7;
  text-wrap: pretty;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
[class*="__title"],
[class*="-title"],
.section-top__subtitle,
.sec-title__tagline,
.hero-agency__title,
.counter,
.odometer {
  font-family: var(--itwh-font-head);
}

h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
  overflow-wrap: break-word;
  letter-spacing: -0.015em;
}

/* Section headings — one consistent, fluid scale (desktop 52px → mobile 30px) */
.sec-title__title,
.section-top__title,
.itwh-contact-heading {
  font-size: clamp(30px, 2.2vw + 18px, 52px);
  line-height: 1.12;
}

.hero-agency__title {
  line-height: 0.98;
}

/* Hind sits a touch high in buttons; balance it */
.btn-main-primary .text,
.btn,
button {
  line-height: 1.2;
}

/* ---------- 3. Images — never stretch, never leave broken boxes */
img {
  max-width: 100%;
  height: auto;
}

img.itwh-img-fallback {
  object-fit: cover;
  background: rgba(127, 127, 127, .08);
}

/* ---------- 4. Alignment / overflow fixes */
.hero-product-brand,
.hero-product-brand__info {
  min-width: 0;
}
.hero-product-brand__info {
  overflow-wrap: anywhere;
}

@media (max-width: 991.98px) {
  .about-one__row.row {
    --bs-gutter-x: 1.5rem;
  }

  .container,
  .container-fluid {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
}

/* Horizontal chip/tab strips scroll smoothly on touch */
.solutions__sidebar-nav,
.portfolio-filter__tabs,
.contact__chips-inline {
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.solutions__sidebar-nav::-webkit-scrollbar,
.portfolio-filter__tabs::-webkit-scrollbar,
.contact__chips-inline::-webkit-scrollbar {
  display: none;
}
.solutions__sidebar-item {
  scroll-snap-align: start;
}

/* ---------- 5. Smooth interactions */
a,
button,
.btn,
.btn-main-primary,
.contact__chip,
.contact__card,
.portfolio-filter__card,
.solutions__sidebar-item,
.footer1__form button {
  transition:
    color .25s var(--itwh-ease),
    background-color .25s var(--itwh-ease),
    border-color .25s var(--itwh-ease),
    box-shadow .3s var(--itwh-ease),
    opacity .25s var(--itwh-ease),
    transform .3s var(--itwh-ease);
}

.portfolio-filter__img img,
.project-list__thumb img,
.blog-card img {
  transition: transform .6s var(--itwh-ease);
}
.portfolio-filter__card:hover .portfolio-filter__img img {
  transform: scale(1.04);
}

.btn-main-primary:active,
.contact__chip:active {
  transform: scale(.98);
}

/* Visible, consistent keyboard focus */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
.contact__chip:focus-visible {
  outline: 2px solid #8b7bff;
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- 6. Forms — clean inline status instead of browser alerts */
.contact__chip {
  cursor: pointer;
  user-select: none;
}

.itwh-form-status {
  display: none;
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 10px;
  font-family: var(--itwh-font-body);
  font-size: 15px;
  line-height: 1.5;
  text-align: left;
}
.itwh-form-status.is-visible { display: block; animation: itwhFadeUp .35s var(--itwh-ease); }
.itwh-form-status.is-error {
  color: #ffb4b4;
  background: rgba(255, 77, 77, .12);
  border: 1px solid rgba(255, 77, 77, .35);
}
.itwh-form-status.is-success {
  color: #b9f5cf;
  background: rgba(46, 204, 113, .12);
  border: 1px solid rgba(46, 204, 113, .35);
}
/* Light backgrounds (inner pages / careers modal) */
.bg-white .itwh-form-status.is-error,
.itwh-light .itwh-form-status.is-error { color: #b42318; }
.bg-white .itwh-form-status.is-success,
.itwh-light .itwh-form-status.is-success { color: #067647; }

.itwh-field-invalid,
input.itwh-field-invalid,
textarea.itwh-field-invalid {
  border-color: rgba(255, 77, 77, .7) !important;
}

button[disabled],
.btn-main-primary[disabled] {
  cursor: progress;
  opacity: .75;
}

/* Keep the 16px minimum so iOS doesn't zoom into inputs */
@media (max-width: 767.98px) {
  input,
  select,
  textarea {
    font-size: 16px !important;
  }
}

@keyframes itwhFadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- 7. Respect reduced-motion users */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
