/* SIYAYASAN - Shared styles (Aligned with jakubkrehel/skills: better-interface, better-ui, better-typography, better-colors) */

html {
  scroll-behavior: smooth !important;
  scroll-padding-top: 5.5rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-overflow-scrolling: touch;
}

/* ======================================================== */
/* 1. TYPOGRAPHY (better-typography)                        */
/* ======================================================== */
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
  letter-spacing: -0.018em;
  overflow-wrap: break-word;
}

p, .prose p, .lead {
  text-wrap: pretty;
  overflow-wrap: break-word;
}

/* Justified text: clean word distribution & left-aligned trailing line */
.text-justify {
  text-align: justify;
  text-justify: inter-word;
  text-align-last: left;
}

/* Tabular figures for data, numbers, stats, and prices */
.tabular-nums, [data-stat], .stat-value, .currency-value, time {
  font-variant-numeric: tabular-nums;
}

html, body {
  overflow-x: hidden;
  max-width: 100%;
}

/* Badges and tags: no awkward wrap on desktop, graceful wrap on mobile */
.badge, [class*="rounded-full"][class*="text-xs"], [class*="rounded-full"][class*="text-["] {
  white-space: nowrap;
}

@media (max-width: 640px) {
  .badge, [class*="rounded-full"][class*="text-xs"], [class*="rounded-full"][class*="text-["] {
    white-space: normal !important;
  }
}

/* ======================================================== */
/* 2. TACTILE PRESS & INTERRUPTIBLE MOTION (better-ui)      */
/* ======================================================== */
/* Buttons & interactive pills tactile scale on press: exactly scale(0.96) */
button,
a[role="button"],
.btn,
[class*="active:scale"] {
  transition-property: color, background-color, border-color, opacity, box-shadow, transform;
  transition-duration: 150ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

button:active:not(:disabled),
a[role="button"]:active,
.btn:active:not(:disabled),
[class*="active:scale"]:active {
  transform: scale(0.96) !important;
}

/* Optical alignment for button icons */
button i, .btn i, a i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Symmetrical & professional optical alignment for arrow icons */
button i[class*="arrow"],
a i[class*="arrow"],
.btn i[class*="arrow"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  vertical-align: middle;
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Micro smooth nudge on hover for right-pointing arrows */
button:hover i[class*="arrow-right"],
a:hover i[class*="arrow-right"] {
  transform: translateX(2px);
}

button:hover i[class*="arrow-left"],
a:hover i[class*="arrow-left"] {
  transform: translateX(-2px);
}

/* Image subtle 1px outline for crisp depth (better-ui) */
img.has-edge-outline,
.card-media img {
  outline: 1px solid rgba(0, 0, 0, 0.06);
  outline-offset: -1px;
}

/* ======================================================== */
/* 3. MODERN VIEW TRANSITIONS & ZERO-SHIFT HEADER           */
/* ======================================================== */
/* Sticky pinned navigation across all pages */
#site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  margin: 0;
  padding: 0;
  min-height: 64px;
}
@media (min-width: 640px) {
  #site-header {
    min-height: 80px;
  }
}

/* Header stays rock-solid pinned in place during navigation */
#site-header, nav.sticky {
  transform: translateZ(0);
}

/* ======================================================== */
/* 4. SURFACES & SHADOW ELEVATION (better-ui)               */
/* ======================================================== */
.siy-elevation-1 {
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.04), 0 1px 2px -1px rgb(0 0 0 / 0.03);
}
.siy-elevation-2 {
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.04);
}
.siy-elevation-3 {
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.04), 0 4px 6px -4px rgb(0 0 0 / 0.02);
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #F8FAFC; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: #94A3B8; }

/* ======================================================== */
/* 5. MODERN FLOATING DROPDOWN CARD & ACCORDION (DESIGN-SYNC) */
/* ======================================================== */
.siy-nav-dropdown {
  position: relative;
}
.siy-nav-chevron {
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-block;
}
.siy-nav-dropdown:hover .siy-nav-chevron,
.siy-nav-dropdown.is-open .siy-nav-chevron {
  transform: rotate(180deg);
}
.siy-dropdown-menu {
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 180ms ease, transform 180ms cubic-bezier(0.16, 1, 0.3, 1), visibility 180ms;
  pointer-events: none;
}
.siy-nav-dropdown:hover .siy-dropdown-menu,
.siy-nav-dropdown.is-open .siy-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.siy-nav-dropdown .siy-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 12px;
}

/* Accessibility - focus styles (better-accessibility & better-colors) */
*:focus-visible {
  outline: 2px solid #0369A1 !important;
  outline-offset: 2px !important;
}

/* Line clamp utilities */
.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #0369A1;
  color: white;
  padding: 8px 16px;
  font-weight: 600;
  border-radius: 0 0 8px 0;
  z-index: 100;
  transition: top 150ms ease-out;
}
.skip-link:focus {
  top: 0;
}

/* Print styles */
@media print {
  .no-print { display: none !important; }
  body { font-size: 11pt; color: #000; background: white; }
  .card, .border, .shadow { border: 1px solid #ddd !important; box-shadow: none !important; }
  a { color: #000; text-decoration: underline; }
  .print-break { page-break-after: always; }
}


/* ======================================================== */
/* 5. SCROLL REVEAL & COMFORTABLE SMOOTH SCROLLING          */
/* ======================================================== */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.blur-reveal {
  opacity: 0;
  filter: blur(8px);
  transform: translateY(28px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1), filter 1s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, filter, transform;
}

.blur-reveal.active {
  opacity: 1;
  filter: blur(0px);
  transform: translateY(0);
}

.delay-75  { transition-delay: 75ms; }
.delay-100 { transition-delay: 100ms; }
.delay-150 { transition-delay: 150ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }
  .reveal, .blur-reveal {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
}
