/* ==========================================================================
   YAK EXPRESS theme — base, header, footer, shared components.
   Widget-specific rules live in assets/css/widgets/*.css and build on the
   shared classes defined here (.yak-card, .yak-tile, .yak-btn, .yak-hero …).
   ========================================================================== */

/* ---------- Base ---------- */
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--surface-white);
  color: var(--text-body);
  font-family: var(--font-core);
  font-size: var(--body-size);
  line-height: var(--body-lh);
  -webkit-font-smoothing: antialiased;
  color-scheme: light;
  overflow-x: clip;
}
*, *::before, *::after { box-sizing: border-box; }
img, svg, video { max-width: 100%; height: auto; }
a { color: #3C74A8; text-decoration: none; }
a:hover { color: var(--ink-primary); text-decoration: underline; }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
h1, h2, h3, h4, h5, h6 { color: var(--ink-primary); font-weight: 700; line-height: 1.25; }
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details[open] .yak-chev { transform: rotate(180deg); }
.yak-tnum { font-variant-numeric: tabular-nums lining-nums; }

.material-symbols-rounded {
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  font-size: 24px;
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
  user-select: none;
  flex-shrink: 0;
}
.material-symbols-rounded.is-filled { font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24; }

.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px;
  overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important;
}
.yak-skip:focus {
  clip: auto; clip-path: none; height: auto; width: auto; margin: 0; left: 16px; top: 16px; z-index: 1000;
  padding: 10px 14px; border-radius: 12px; background: #fff; box-shadow: var(--shadow-s2); color: var(--ink-primary);
}

.yak-site { min-height: 100vh; display: flex; flex-direction: column; background: var(--surface-white); }
.yak-main { flex: 1; }
.yak-container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.yak-section { padding: clamp(56px, 7vw, 88px) 0; }
.yak-section--cloud { background: var(--surface-cloud); }
.yak-page { padding: clamp(48px, 6vw, 80px) 0; }

/* ---------- Animations (ported from the prototype) ---------- */
@keyframes yk-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes yk-ring {
  0% { box-shadow: 0 0 0 4px rgba(255,255,255,.9), 0 0 0 4px rgba(247,205,15,.55); }
  100% { box-shadow: 0 0 0 4px rgba(255,255,255,.9), 0 0 0 20px rgba(247,205,15,0); }
}
@keyframes yk-drift { 0%, 100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-4%,3%) scale(1.08); } }
@keyframes yakPulseOnce { 0% { box-shadow: 0 0 0 0 rgba(247,205,15,.5); } 100% { box-shadow: 0 0 0 12px rgba(247,205,15,0); } }

/* Scroll reveal: only hides elements when JS is running (html.yak-js) and never in the Elementor editor. */
.yak-js:not(.elementor-editor-active) .yak-reveal:not(.is-visible) { opacity: 0; transform: translateY(28px); }
.yak-reveal { transition: opacity 700ms cubic-bezier(.2,.7,.2,1) var(--yak-reveal-delay, 0ms), transform 900ms cubic-bezier(.2,.7,.2,1) var(--yak-reveal-delay, 0ms); }
.yak-reveal.is-visible { opacity: 1; transform: none; }
.elementor-editor-active .yak-reveal, body.elementor-editor-active .yak-reveal { opacity: 1 !important; transform: none !important; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .yak-js .yak-reveal:not(.is-visible) { opacity: 1; transform: none; }
  * { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}

/* ---------- Buttons (every state uses its gradient token) ---------- */
.yak-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border: 1px solid transparent; border-radius: 12px;
  font-family: var(--font-core); font-size: 15px; font-weight: 600; line-height: 1; white-space: nowrap;
  color: var(--ink-primary); cursor: pointer; text-decoration: none !important; -webkit-appearance: none; appearance: none;
  transition: background var(--duration-hover) var(--ease-standard), transform var(--duration-hover) var(--ease-out), box-shadow var(--duration-hover) var(--ease-standard), color var(--duration-hover) var(--ease-standard);
}
.yak-btn:hover { color: var(--ink-primary); }
.yak-btn--lg { height: 48px; font-size: 16px; }
.yak-btn--full { display: flex; width: 100%; }
.yak-btn .yak-icon { font-size: 20px; }
.yak-btn--primary { background: var(--gradient-button-primary); box-shadow: var(--shadow-cta), var(--shadow-inset); }
.yak-btn--primary:hover { background: var(--gradient-button-hover); transform: translateY(var(--hover-lift)); }
.yak-btn--primary:active { background: var(--gradient-button-pressed); box-shadow: var(--shadow-cta-pressed), var(--shadow-inset); transform: none; }
.yak-btn--secondary { background: var(--gradient-button-secondary); border-color: var(--border-secondary-btn); box-shadow: var(--shadow-s1), var(--shadow-inset); }
.yak-btn--secondary:hover { background: linear-gradient(180deg, #FFFDF3 0%, #FFF3D6 100%); transform: translateY(var(--hover-lift)); }
.yak-btn--secondary:active { background: linear-gradient(180deg, #FFF6DF 0%, #FBEBC6 100%); transform: none; }
.yak-btn--ghost { background: transparent; padding: 0 12px; }
.yak-btn--ghost:hover { background: var(--ghost-hover); }
.yak-btn--ghost:active { background: var(--ghost-press); }
.yak-btn--glass { background: var(--glass-fill); border: var(--glass-border); box-shadow: var(--shadow-s1), var(--glass-inset); backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur)); }
.yak-btn--glass:hover { background: rgba(255,255,255,.96); transform: translateY(var(--hover-lift)); }
.yak-btn--glass:active { background: rgba(255,255,255,.82); transform: none; }
.yak-btn--outline-light { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.2); color: #fff; }
.yak-btn--outline-light:hover { background: rgba(255,255,255,.12); color: #fff; }
.yak-btn:disabled, .yak-btn.is-disabled { background: var(--gradient-button-disabled); color: var(--text-disabled); box-shadow: none; cursor: not-allowed; transform: none; border-color: transparent; }

/* ---------- Form controls ---------- */
.yak-input, .yak-select, .yak-textarea {
  width: 100%; height: 44px; border-radius: 12px; border: 1px solid var(--border-default); background: #fff;
  box-shadow: var(--shadow-s1); padding: 0 14px; font: inherit; font-size: 15px; color: var(--ink-primary);
  outline-color: var(--focus-ring); transition: border-color var(--duration-hover) var(--ease-standard);
}
.yak-select { padding: 0 12px; }
.yak-textarea { height: auto; padding: 12px 14px; line-height: 1.55; resize: vertical; }
.yak-input::placeholder, .yak-textarea::placeholder { color: var(--ink-disabled); }
.yak-input.is-error, .yak-select.is-error, .yak-textarea.is-error { border-color: var(--status-error); }
.yak-input:disabled, .yak-select:disabled, .yak-textarea:disabled { background: var(--surface-mist); color: var(--text-disabled); box-shadow: none; }

/* ---------- Header ---------- */
.yak-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.88); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-default); box-shadow: var(--shadow-s1);
}
.yak-header__inner { height: 72px; display: flex; align-items: center; gap: 12px; }
.yak-logo { display: flex; align-items: center; padding: 6px 0; flex: 0 1 auto; min-width: 0; }
.yak-logo__img { display: block; width: auto; height: auto; max-height: 20px; max-width: 100%; }
@media (max-width: 480px) {
  .yak-header__mobile .yak-btn { padding: 0 14px; }
  .yak-logo__img { max-height: 18px; }
}
@media (min-width: 1000px) { .yak-header__inner { gap: 24px; } }
.yak-nav { flex: 1; display: none; justify-content: center; }
.yak-nav__list { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.yak-nav__list li { margin: 0; }
.yak-nav__list a {
  display: block; padding: 10px 14px; border-radius: 12px; font-size: 15px; font-weight: 500; color: var(--ink-primary);
  text-decoration: none; transition: background 140ms ease;
}
.yak-nav__list a:hover { background: var(--ghost-hover); text-decoration: none; color: var(--ink-primary); }
.yak-nav__list .current-menu-item > a,
.yak-nav__list .current_page_item > a,
.yak-nav__list .current-menu-ancestor > a,
.yak-nav__list .current-menu-parent > a {
  background: var(--gradient-button-primary); box-shadow: inset 0 1px 0 rgba(255,255,255,.72); font-weight: 600;
}
.yak-header__actions { display: none; gap: 8px; align-items: center; margin-left: auto; }
.yak-header__mobile { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.yak-menu-toggle {
  width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border-default);
  background: var(--gradient-button-secondary); display: grid; place-items: center; cursor: pointer; color: var(--ink-primary); padding: 0;
}
.yak-menu-toggle .yak-icon { grid-area: 1 / 1; }
.yak-menu-toggle__close, .yak-menu-toggle[aria-expanded="true"] .yak-menu-toggle__open { display: none; }
.yak-menu-toggle[aria-expanded="true"] .yak-menu-toggle__close { display: inline-block; }
.yak-mobile-menu { display: none; border-top: 1px solid var(--border-default); background: #fff; padding: 12px 0 20px; }
.yak-mobile-menu.is-open { display: block; }
.yak-nav__list--mobile { flex-direction: column; gap: 4px; }
.yak-nav__list--mobile a { padding: 14px 16px; font-size: 16px; }
.yak-mobile-menu__actions { margin-top: 8px; }
.yak-mobile-menu__actions:empty { display: none; }
@media (min-width: 1000px) {
  .yak-nav { display: flex; }
  .yak-header__actions { display: flex; }
  .yak-header__mobile { display: none; }
  .yak-mobile-menu { display: none !important; }
}

/* ---------- Footer ---------- */
.yak-footer { background: var(--surface-cloud); border-top: 1px solid var(--border-default); padding: 56px 0 0; }
.yak-footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 32px; }
.yak-footer__brand { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.yak-footer__brand .yak-logo { padding: 0; }
.yak-footer__tagline { font-size: 15px; font-weight: 600; }
.yak-footer__desc { font-size: 14px; line-height: 1.6; color: var(--ink-secondary); }
.yak-footer__col { display: flex; flex-direction: column; gap: 12px; }
.yak-footer__title { font-size: 14px; font-weight: 700; }
.yak-footer__link { align-self: flex-start; padding: 2px 0; font-size: 14px; color: var(--ink-secondary); }
.yak-footer__link:hover { color: var(--ink-primary); text-decoration: underline; }
.yak-footer__bottom { margin-top: 40px; padding: 20px 0 28px; border-top: 1px solid var(--border-default); font-size: 13px; color: var(--ink-secondary); }

/* ---------- Shared: headings, cards, tiles, grids, chips ---------- */
.yak-h2 { margin: 0; font-size: clamp(24px, 3vw, 32px); line-height: 1.25; font-weight: 700; text-wrap: balance; }
.yak-h3 { margin: 0; font-size: 21px; line-height: 1.3; font-weight: 700; }
.yak-lead { margin: 0; font-size: 17px; line-height: 1.6; color: var(--ink-secondary); text-wrap: pretty; }
.yak-lead--ink { color: var(--ink-primary); }

.yak-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--yak-min, 260px)), 1fr)); gap: var(--yak-gap, 20px); }

.yak-card {
  background: var(--gradient-surface-standard); border: 1px solid var(--surface-mist); border-radius: 16px; box-shadow: var(--shadow-s1);
  color: var(--ink-primary);
}
.yak-card--emphasis { background: var(--gradient-surface-emphasis); border-color: #F3EBCF; border-radius: 18px; box-shadow: var(--shadow-s2); }
.yak-card--status { background: var(--gradient-surface-status); }
.yak-card--white { background: #fff; }
.yak-card--hover { transition: box-shadow 140ms ease, transform 140ms ease; }
.yak-card--hover:hover { box-shadow: var(--shadow-s2); transform: translateY(-2px); text-decoration: none; }
/* A card that is both hoverable and reveal-animated keeps the slow reveal transition until it is visible. */
.yak-card--hover.yak-reveal:not(.is-visible) { transition: opacity 700ms cubic-bezier(.2,.7,.2,1) var(--yak-reveal-delay, 0ms), transform 900ms cubic-bezier(.2,.7,.2,1) var(--yak-reveal-delay, 0ms); }
.yak-card__title { font-size: 18px; font-weight: 600; line-height: 1.3; color: var(--ink-primary); margin: 0; }
.yak-card__text { font-size: 15px; line-height: 1.55; color: var(--ink-secondary); }
.yak-card__text a { font-weight: 600; }

.yak-tile {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; display: grid; place-items: center; color: var(--ink-primary);
  background: linear-gradient(145deg, #FFF7CF 0%, #FFE27A 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85), 0 4px 12px rgba(242,180,63,.22);
}
.yak-tile--primary { background: var(--gradient-button-primary); box-shadow: var(--shadow-inset); }
.yak-tile--round { width: 64px; height: 64px; border-radius: 50%; background: var(--surface-warm-white); box-shadow: none; }
.yak-tile--round .yak-icon { font-size: 32px; }
.yak-tile--lg { width: 48px; height: 48px; border-radius: 14px; }

.yak-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.yak-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 12px;
  background: var(--surface-warm-white); border: 1px solid #F3EBCF; font-size: 15px; font-weight: 500; color: var(--ink-primary);
}
.yak-chips--light { gap: 12px; }
a.yak-chip:hover { text-decoration: none; background: #FFF4D6; }
.yak-chips--dark .yak-chip {
  padding: 8px 14px; font-size: 14px; font-weight: 400; color: #E6EDF3;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16); transition: background 140ms ease, border-color 140ms ease;
}
.yak-chips--dark a.yak-chip:hover { background: rgba(247,205,15,.16); border-color: rgba(247,205,15,.5); color: #fff; }

.yak-note { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--ink-secondary); }
.yak-note .yak-icon { color: var(--support-blue); font-size: 20px; }
.yak-note--pending { padding: 14px 16px; border-radius: 12px; background: rgba(247,205,15,.20); border: 1px dashed var(--brand-yellow-depth); font-size: 14px; line-height: 1.55; color: var(--ink-primary); }
.yak-note--pending .yak-icon { color: var(--ink-primary); }

/* ---------- Dark hero base (shared by the Hero widget and plain-page heroes) ---------- */
.yak-hero {
  position: relative; overflow: hidden; color: #fff; background-color: #16212B;
  background-image:
    radial-gradient(ellipse 55% 70% at 85% 0%, rgba(247,205,15,.20) 0%, rgba(247,205,15,0) 60%),
    radial-gradient(ellipse 45% 60% at 0% 100%, rgba(79,143,203,.20) 0%, rgba(79,143,203,0) 70%),
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: auto, auto, 56px 56px, 56px 56px;
}
.yak-hero--page { padding: clamp(56px, 7vw, 96px) 0; }
.yak-hero__inner { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.yak-hero .yak-hero__title { margin: 0; color: #fff; font-size: clamp(30px, 4.2vw, 46px); line-height: 1.15; font-weight: 700; max-width: 860px; text-wrap: balance; }
.yak-hero__highlight { background: linear-gradient(90deg, #FFE27A 0%, #F7CD0F 50%, #F2A83A 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.yak-hero__lead { margin: 0; font-size: 18px; line-height: 1.65; color: #B9C6D2; max-width: 820px; text-wrap: pretty; }
.yak-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.yak-hero .yak-chips { margin-top: 8px; }

/* ---------- Plain pages / posts ---------- */
.yak-prose { max-width: 760px; font-size: 17px; line-height: 1.7; }
.yak-prose > * { margin-top: 0; }
.yak-prose > * + * { margin-top: 1em; }
.yak-prose h2 { font-size: clamp(22px, 2.6vw, 28px); margin-top: 2em; }
.yak-prose h3 { font-size: 21px; margin-top: 1.6em; }
.yak-prose h4 { font-size: 18px; }
.yak-prose img { border-radius: 16px; }
.yak-prose figure { margin-left: 0; margin-right: 0; }
.yak-prose blockquote { margin: 1.5em 0; padding: 16px 20px; border-left: 3px solid var(--brand-yellow); background: var(--surface-warm-white); border-radius: 0 12px 12px 0; }
.yak-prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.yak-prose th, .yak-prose td { padding: 12px 16px; border-bottom: 1px solid var(--border-default); text-align: left; vertical-align: top; }
.yak-prose th { font-size: 13px; font-weight: 600; color: var(--ink-secondary); background: var(--surface-cloud); }
.yak-prose code { font-size: .92em; padding: 2px 6px; border-radius: 6px; background: var(--surface-mist); }
.yak-prose pre { padding: 16px 20px; border-radius: 12px; background: var(--surface-mist); overflow: auto; }
.yak-prose .wp-block-button__link { display: inline-flex; align-items: center; height: 44px; padding: 0 20px; border-radius: 12px; background: var(--gradient-button-primary); color: var(--ink-primary); font-weight: 600; box-shadow: var(--shadow-cta), var(--shadow-inset); }
.yak-entry__thumb { margin: 0 0 24px; }
.yak-entry__thumb img { width: 100%; border-radius: 18px; box-shadow: var(--shadow-s2); }
.yak-entry__meta { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-secondary); margin-bottom: 16px; }
.yak-entry__meta .yak-icon { color: var(--brand-yellow); }
.yak-page-links { margin-top: 24px; font-weight: 600; }
.yak-post-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border-default); font-weight: 600; }
.yak-post-nav__next { margin-left: auto; text-align: right; }

.yak-post-grid { --yak-gap: 24px; }
.yak-post-card { display: flex; flex-direction: column; overflow: hidden; border-radius: 20px; }
.yak-post-card__thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.yak-post-card__body { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 8px; }
.yak-post-card__body .yak-entry__meta { margin: 0; }
.yak-post-card__body .yak-card__title a { color: inherit; }
.yak-post-card__more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; margin-top: 4px; }
.yak-pagination { margin-top: 40px; }
.yak-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.yak-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 12px; border-radius: 12px; background: var(--gradient-button-secondary); border: 1px solid var(--border-secondary-btn); box-shadow: var(--shadow-s1), var(--shadow-inset); font-weight: 600; color: var(--ink-primary); }
.yak-pagination .page-numbers.current { background: var(--gradient-button-primary); border-color: transparent; box-shadow: var(--shadow-cta), var(--shadow-inset); }
.yak-pagination .page-numbers.dots { background: none; border: none; box-shadow: none; }
.yak-empty { padding: 48px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.yak-empty__icon { color: var(--ink-disabled); }
.yak-empty__text { margin: 0; color: var(--ink-secondary); }
.yak-search { display: flex; gap: 10px; max-width: 560px; }
.yak-search__field { position: relative; flex: 1; }
.yak-search__icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-secondary); }
.yak-search__input { padding-left: 44px; }
.yak-search-box { margin-bottom: 32px; }

/* Comments (minimal) */
.comment-list { list-style: none; padding: 0; }
.comment-list .comment { padding: 16px 0; border-bottom: 1px solid var(--border-default); }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea { width: 100%; border-radius: 12px; border: 1px solid var(--border-default); padding: 10px 14px; font: inherit; }
.comment-form .submit { display: inline-flex; align-items: center; height: 44px; padding: 0 20px; border: none; border-radius: 12px; background: var(--gradient-button-primary); font: inherit; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-cta), var(--shadow-inset); }

/* ---------- Elementor integration ---------- */
.elementor-widget-container > .yak-hero { width: 100%; }
.e-con.yak-full-bleed { --padding-top: 0; --padding-bottom: 0; --padding-left: 0; --padding-right: 0; }
.elementor .yak-btn { text-decoration: none; }
.elementor-widget-yak-hero, .elementor-widget-yak-hero > .elementor-widget-container { width: 100%; }
