/* =====================================================================
   Polish Layer — applies make-interfaces-feel-better principles globally
   Load AFTER odoo-shared.css. Modifies nothing in the base CSS.
   Source: github.com/boraoztunc/skills/make-interfaces-feel-better
   ===================================================================== */

/* ---------------------------------------------------------------------
   Principle 8 — Font smoothing
   --------------------------------------------------------------------- */
html, body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ---------------------------------------------------------------------
   Principle 10 — Text wrapping (no orphans, balanced headlines)
   --------------------------------------------------------------------- */
h1, h2, h3 {
  text-wrap: balance;
}

p, li {
  text-wrap: pretty;
}

/* Tighten H1 in hero for editorial control */
.hero h1 {
  letter-spacing: -0.02em;
  text-wrap: balance;
}

/* ---------------------------------------------------------------------
   Principle 9 — Tabular numbers (prevent layout shift on dynamic stats)
   --------------------------------------------------------------------- */
.vis-card .v,
.vis-row .v,
.hero-floating .metric,
.outcome-stat .num,
.outcome-stat .num *,
.comp-table td,
.pricing-table td.timeline,
.pricing-table td.investment,
.anchor-card .anchor-stats .v,
.step-meta,
.trigger-date {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ---------------------------------------------------------------------
   Principle 12 — Scale on press (tactile feedback)
   Principle 14 — Never `transition: all` (specify properties)
   --------------------------------------------------------------------- */
.btn,
.btn-outline,
button:not(.tabs-nav button) {
  transition-property: background-color, color, transform, box-shadow, scale;
  transition-duration: 200ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
  will-change: transform;
}

.btn:active,
.btn-outline:active,
button:active {
  scale: 0.96;
}

/* Re-apply hover lift with specific properties */
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(48, 177, 37, 0.25);
}

/* ---------------------------------------------------------------------
   Principle 3 — Shadows over borders (layered transparent shadows)
   --------------------------------------------------------------------- */
.problem-item {
  border-left: none;
  background: #fff;
  box-shadow:
    inset 4px 0 0 var(--accent),
    0 1px 2px rgba(65, 62, 62, 0.04),
    0 4px 12px rgba(65, 62, 62, 0.06);
  transition-property: transform, box-shadow;
  transition-duration: 200ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}
.problem-item:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 4px 0 0 var(--accent),
    0 4px 8px rgba(65, 62, 62, 0.06),
    0 12px 32px rgba(65, 62, 62, 0.10);
}

.faq-item {
  border: none;
  box-shadow:
    0 1px 2px rgba(65, 62, 62, 0.04),
    0 4px 12px rgba(65, 62, 62, 0.06);
  transition-property: box-shadow, transform;
  transition-duration: 200ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}
.faq-item:hover {
  box-shadow:
    0 1px 2px rgba(65, 62, 62, 0.04),
    0 8px 24px rgba(65, 62, 62, 0.10);
}
.faq-item[open] {
  box-shadow:
    0 1px 2px rgba(65, 62, 62, 0.06),
    0 12px 32px rgba(65, 62, 62, 0.12);
}

.block,
.why-card,
.trigger-card,
.testimonial-card,
.deliverable-card,
.license-card {
  border: none;
  box-shadow:
    0 1px 2px rgba(65, 62, 62, 0.04),
    0 4px 16px rgba(65, 62, 62, 0.06),
    0 16px 48px rgba(65, 62, 62, 0.04);
  transition-property: transform, box-shadow;
  transition-duration: 250ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
  will-change: transform;
}

.block:hover,
.why-card:hover,
.trigger-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 2px 4px rgba(65, 62, 62, 0.06),
    0 8px 24px rgba(65, 62, 62, 0.08),
    0 24px 64px rgba(65, 62, 62, 0.08);
}

/* ---------------------------------------------------------------------
   Principle 1 — Concentric border radius
   outer radius = inner radius + padding
   --------------------------------------------------------------------- */
/* .anchor-card has padding 48px + outer radius 20px → inner elements: 12px is OK as it's a nested card */
.anchor-card .anchor-quote {
  border-radius: 12px;  /* 20px outer - 8px context = sensible nested radius */
}

/* .tabs has radius 16px + padding 0 (nav has its own padding) → tab buttons stay square at top, panel is 16px-ε */
.tabs .tab-panel {
  border-radius: 0 0 16px 16px;
}

/* .block has radius 16px, padding 40px → inner pills should be 4px (existing tag radius) ✓ */
/* .why-card has radius 12px, padding 32px → inner items ≤ 8px ✓ */

/* ---------------------------------------------------------------------
   Principle 11 — Image outlines (subtle depth)
   --------------------------------------------------------------------- */
img:not(.no-outline) {
  outline: 1px solid rgba(65, 62, 62, 0.06);
  outline-offset: -1px;
  border-radius: 4px; /* default — components override */
}

.case-anchor img {
  outline: 1px solid rgba(65, 62, 62, 0.08);
}

/* ---------------------------------------------------------------------
   Principle 16 — Minimum 40×40 hit area
   --------------------------------------------------------------------- */
.nav-links a,
.faq-item summary,
.tabs-nav button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.nav-links a {
  position: relative;
  padding: 8px 4px; /* extends hit area without changing visual */
}

/* ---------------------------------------------------------------------
   Principle 15 — `will-change` only on transform/opacity/filter
   --------------------------------------------------------------------- */
/* Applied targeted above — no global will-change */

/* ---------------------------------------------------------------------
   Polish — focus states (a11y + craft)
   --------------------------------------------------------------------- */
.btn:focus-visible,
.btn-outline:focus-visible,
button:focus-visible,
.faq-item summary:focus-visible,
.nav-links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------------------------------------------------------------------
   Smooth scroll for in-page anchors
   --------------------------------------------------------------------- */
html {
  scroll-behavior: smooth;
}

@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;
    scroll-behavior: auto !important;
  }
}

/* ---------------------------------------------------------------------
   Selection styling (small craft detail)
   --------------------------------------------------------------------- */
::selection {
  background: var(--accent);
  color: #fff;
}

/* ---------------------------------------------------------------------
   Section break — softer transitions between sections
   --------------------------------------------------------------------- */
section + section {
  position: relative;
}

/* Make the dark .offer and .outcome-band feel like deliberate breaks */
.outcome-band,
.offer {
  position: relative;
}
.outcome-band::before,
.offer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 209, 104, 0.3) 50%,
    transparent 100%
  );
}
