/* iRestDC — component & layout styles. Loaded after tokens.css. */

.container { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--gutter); }

.section { padding: var(--section-py-desk) 0; position: relative; }
@media (max-width: 720px) { .section { padding: var(--section-py-mob) 0; } }
.section--alt  { background: var(--bg-alt); }
.section--tint { background: var(--bg-tint); }
.section--dark { background: var(--ink-900); color: var(--fg-on-dark); }

/* ============================ BUTTONS =================================== */
.btn {
  font-family: var(--font-body);
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--dur-fast) var(--ease-out);
  white-space: nowrap;
  line-height: 1;
}
.btn--sm { padding: 10px 16px; font-size: 13px; }
.btn--md { padding: 14px 22px; font-size: 14px; }
.btn--lg { padding: 18px 28px; font-size: 16px; }

.btn--primary {
  background: var(--grad-accent);
  color: #fff;
  box-shadow: var(--shadow-cta);
}
.btn--primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: var(--shadow-cta-hover);
}
.btn--primary:active { transform: translateY(0); filter: brightness(0.96); }

.btn--secondary {
  background: #fff;
  color: var(--ink-900);
  border-color: var(--hairline-strong);
}
.btn--secondary:hover {
  border-color: var(--ink-900);
  background: var(--bg-alt);
}
.section--dark .btn--secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.22);
}
.section--dark .btn--secondary:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.6);
}

.btn--ghost {
  background: transparent;
  color: var(--ink-900);
}
.btn--ghost:hover { background: var(--bg-alt); }

.btn .ico { transition: transform var(--dur-fast) var(--ease-out); }
.btn:hover .ico { transform: translateX(2px); }
[dir="rtl"] .btn:hover .ico { transform: translateX(-2px); }

/* ============================ BADGES / PILLS ============================ */
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 8px;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 600; color: var(--ink-900);
  box-shadow: var(--shadow-xs);
}
.badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--pink-500);
  box-shadow: 0 0 0 4px rgba(225,29,116,0.18);
}
.badge-soft {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: var(--pink-100);
  color: var(--pink-700);
  border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.02em;
}

/* ============================ CARDS ===================================== */
.card {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-xl);
  padding: 28px;
  transition: transform var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--pink-200);
}

/* feature icon square */
.feat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--pink-100);
  color: var(--pink-600);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  transition: transform var(--dur-base) var(--ease-out);
}
.card:hover .feat-icon {
  background: var(--pink-500);
  color: #fff;
  transform: scale(1.05) rotate(-3deg);
}

/* ============================ INPUTS ==================================== */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 13px; font-weight: 600; color: var(--ink-700); }
.input, .select, .textarea {
  font-family: inherit; font-size: 15px;
  padding: 14px 16px;
  background: #fff;
  border: 1.5px solid var(--hairline-strong);
  border-radius: var(--radius-lg);
  color: var(--ink-900);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
  width: 100%;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--pink-500);
  box-shadow: 0 0 0 4px rgba(225,29,116,0.12);
}
.input::placeholder { color: var(--ink-300); }
.textarea { min-height: 110px; resize: vertical; font-family: inherit; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px;
}
[dir="rtl"] .select {
  background-position: left 14px center;
  padding-right: 16px; padding-left: 40px;
}

/* ============================ STEP CONNECTOR ============================ */
.step-circle {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 2px solid var(--pink-500);
  background: var(--pink-50);
  color: var(--pink-600);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  position: relative;
  box-shadow: var(--shadow-pink-halo);
}

/* ============================ FOOTER ==================================== */
.footer { background: var(--ink-900); color: var(--fg-on-dark); padding: 72px 0 28px; }
.footer a { color: rgba(255,255,255,0.7); text-decoration: none; transition: color var(--dur-fast); }
.footer a:hover { color: #fff; }
.footer-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: rgba(255,255,255,0.5); margin-bottom: 16px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }

/* ============================ ACCESSIBILITY WIDGET ====================== */
.a11y-widget {
  position: fixed;
  bottom: 24px;
  inset-inline-end: 24px;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: #2563EB;
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 10px 30px -8px rgba(37, 99, 235, 0.55);
  z-index: 50;
  transition: transform var(--dur-fast) var(--ease-out);
}
.a11y-widget:hover { transform: scale(1.06); }
.a11y-widget .ribbon {
  position: absolute;
  inset-inline-end: calc(100% + 10px);
  top: 50%; transform: translateY(-50%);
  background: #1E293B;
  color: #fff;
  font-size: 11px; font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur-fast);
}
.a11y-widget:hover .ribbon { opacity: 1; }

/* ============================ HEADER ==================================== */
.appheader {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--hairline);
}
.appheader-inner {
  height: var(--nav-h);
  display: flex; align-items: center;
  gap: 20px;
}
.appnav { display: inline-flex; gap: 6px; }
.appnav a {
  font-size: 14px; font-weight: 500; color: var(--ink-700);
  padding: 8px 14px; border-radius: 8px;
  text-decoration: none;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.appnav a:hover { background: var(--bg-alt); color: var(--ink-900); }

.locale-pills {
  display: inline-flex;
  background: var(--bg-alt);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
}
.locale-pills button {
  background: transparent; border: none; cursor: pointer;
  font-family: inherit;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.06em;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  color: var(--ink-500);
  transition: all var(--dur-fast);
}
.locale-pills button:hover { color: var(--ink-900); }
.locale-pills button.is-active {
  background: #fff;
  color: var(--ink-900);
  box-shadow: var(--shadow-xs);
}

/* Mobile header collapse — below 900px the layout has 5 inline children
 * (logo, nav, locale-pills, sign-in, CTA) all on one row. Below this width
 * we progressively shed weight: nav anchor links → sign-in link → CTA size
 * → tighter gaps. The locale-pills always stay (it's the only language
 * affordance), and the logo always stays. */
@media (max-width: 900px) {
  .appheader-inner { gap: 12px; }
  .appheader-inner > nav.appnav,
  .appheader-inner a.appnav { display: none; }
}
@media (max-width: 560px) {
  .appheader-inner { gap: 8px; padding-inline: 0; }
  .container { padding: 0 16px; }
  /* The contact CTA shrinks to icon+short label so it doesn't push the
   * locale-pills off-screen on phones. */
  .appheader .btn--md { padding: 9px 12px; font-size: 12px; gap: 5px; }
  .appheader .btn--md .ico svg { width: 13px; height: 13px; }
  .locale-pills { padding: 2px; }
  .locale-pills button { padding: 4px 7px; font-size: 11px; }
  /* Logo: shrink the penguin SVG + wordmark to free header space for the
   * locale-pills + CTA. Penguin keeps its proportions via the SVG's intrinsic
   * aspect ratio; wordmark is a <span> with inline font-size that we override. */
  .applogo { gap: 6px !important; }
  .applogo > svg:first-of-type { width: 30px !important; height: auto !important; }
  .applogo > span { font-size: 18px !important; }
}
/* Very narrow phones: drop the wordmark entirely, keep just the penguin glyph
 * (still tappable + recognizable). */
@media (max-width: 380px) {
  .applogo > span { display: none !important; }
}

/* ============================ HERO ====================================== */
.hero {
  position: relative;
  background: var(--grad-hero-tint);
  padding: 84px 0 96px;
  overflow: hidden;
}
@media (max-width: 720px) { .hero { padding: 56px 0 64px; } }
.hero::before {
  content: ""; position: absolute; pointer-events: none;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(225,29,116,0.05) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 30%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 30%, #000 30%, transparent 80%);
  opacity: 0.7;
}
.hero-inner { position: relative; text-align: center; }
.hero h1 {
  font-size: clamp(2.2rem, 5vw + 1rem, 4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink-900);
  margin: 24px auto 22px;
  max-width: 16ch;
}
.hero .sub {
  font-size: clamp(1rem, 1.1vw + 0.6rem, 1.25rem);
  color: var(--ink-700);
  max-width: 56ch;
  margin: 0 auto 36px;
  line-height: 1.55;
}
.hero-ctas { display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-bottom: 32px; }
.hero-proof { display: inline-flex; align-items: center; gap: 14px; padding: 8px 16px 8px 12px; background: rgba(255,255,255,0.7); border: 1px solid var(--hairline); border-radius: var(--radius-pill); }
.hero-proof .stars { display: inline-flex; color: var(--warning-500); gap: 1px; }

/* ============================ HERO ART ================================== */
.hero-art {
  margin: 56px auto 0;
  max-width: 880px;
  width: 100%;             /* never exceed parent container at any width */
  position: relative;
}
.hero-art .browser {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.hero-art .browser-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline);
  background: var(--bg-alt);
}
.hero-art .browser-dot { width: 11px; height: 11px; border-radius: 50%; background: #FED7D7; }
.hero-art .browser-dot:nth-child(2) { background: #FEEBC8; }
.hero-art .browser-dot:nth-child(3) { background: #C6F6D5; }
.hero-art .browser-url {
  margin-inline-start: 12px;
  padding: 4px 12px;
  font-size: 12px;
  color: var(--ink-500);
  background: #fff;
  border-radius: var(--radius-pill);
  border: 1px solid var(--hairline);
  /* Truncate when the URL is wider than the bar (happens on phones). */
  min-width: 0; flex-shrink: 1;
  max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ── Mobile collapse for the hero-art browser mockup ─────────────────────
 *
 * The mockup has inline styles (the demo content is dynamic — translated
 * strings + icon names — so it lives in the Blade template, not here).
 * What we DO own is the framing: the browser frame + the inner flex row
 * that on desktop is `sidebar | product-grid`. On mobile we need to:
 *   (1) stack column-wise so the sidebar appears above the grid (or below
 *       — we put it below by reversing flex-direction),
 *   (2) collapse the 3-column product grid to 2 columns,
 *   (3) drop the visual border between sidebar and grid,
 *   (4) hide the floating "Order verified" receipt entirely (it sticks 28px
 *       past the right edge by design and looks broken when scaled down),
 *   (5) tighten internal padding.
 *
 * The deeply-nested inline styles target the immediate children of
 * `.hero-art .browser` and we target them with `>` so we don't accidentally
 * touch other flex/grid descendants. */
@media (max-width: 720px) {
  .hero-art { margin-top: 40px; }
  .hero-art .browser > div { padding: 16px !important; }
  .hero-art .browser > div[style*="display:flex"][style*="gap:24px"],
  .hero-art .browser > div[style*="display: flex"][style*="gap: 24px"] {
    flex-direction: column !important;
    gap: 14px !important;
  }
  /* Sidebar: drop its fixed 260px width, kill the dividing border + padding. */
  .hero-art .browser > div > div[style*="flex:0 0 260px"],
  .hero-art .browser > div > div[style*="flex: 0 0 260px"] {
    flex: 1 1 auto !important;
    border-inline-end: 0 !important;
    padding-inline-end: 0 !important;
    border-bottom: 1px solid var(--hairline);
    padding-bottom: 14px;
  }
  /* Product grid: 3 cols → 2 cols. */
  .hero-art .browser > div > div[style*="grid-template-columns:repeat(3, 1fr)"],
  .hero-art .browser > div > div[style*="grid-template-columns: repeat(3, 1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  /* Cart bar: allow wrap so the CTA pill can drop below the summary. */
  .hero-art .browser > div[style*="border-top"] {
    flex-wrap: wrap !important;
    padding: 12px 14px !important;
  }
  /* Floating "Order verified" receipt — anchored 28px past the edge,
   * collides with viewport on small screens. Hide it on phones. */
  .hero-art > div[aria-hidden][style*="position:absolute"],
  .hero-art > div[aria-hidden][style*="position: absolute"] {
    display: none !important;
  }
}

/* ── Tighten the browser even further at very narrow widths ─────────── */
@media (max-width: 420px) {
  .hero-art .browser-bar { padding: 10px 12px; gap: 6px; }
  .hero-art .browser-url { font-size: 11px; padding: 3px 10px; }
  /* Hide the "live" indicator at the far end — frees up bar space. */
  .hero-art .browser-bar > span[style*="margin-inline-start:auto"],
  .hero-art .browser-bar > span[style*="margin-inline-start: auto"] { display: none; }
}

/* ============================ SECTION HEADER ============================ */
.s-head { text-align: center; margin-bottom: 56px; }
.s-head .eyebrow { display: block; margin-bottom: 12px; }
.s-head h2 { max-width: 22ch; margin: 0 auto; }
.s-head .sub { color: var(--ink-500); max-width: 50ch; margin: 16px auto 0; font-size: 17px; }

/* ============================ PRICING =================================== */
.pricing-grid {
  display: grid; grid-template-columns: 1fr 1.06fr 1fr;
  gap: 16px;
  align-items: stretch;
  max-width: 1080px;
  margin: 0 auto;
}
@media (max-width: 980px) { .pricing-grid { grid-template-columns: 1fr; max-width: 460px; } }
.plan {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-2xl);
  padding: 32px 28px;
  display: flex; flex-direction: column;
}
.plan--featured {
  border: 2px solid var(--pink-500);
  box-shadow: var(--shadow-md), 0 0 0 6px rgba(225,29,116,0.06);
  position: relative;
  transform: translateY(-4px);
}
@media (max-width: 980px) { .plan--featured { transform: none; } }
.plan-badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--grad-accent);
  color: #fff;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: var(--shadow-cta);
  white-space: nowrap;
}
.plan-price { display: flex; align-items: baseline; gap: 6px; margin: 16px 0 18px; }
.plan-price .num { font-family: var(--font-display); font-size: 48px; font-weight: 800; letter-spacing: -0.04em; color: var(--ink-900); }
.plan-price .per { font-size: 14px; color: var(--ink-500); }
.plan-features { list-style: none; padding: 0; margin: 16px 0 28px; display: flex; flex-direction: column; gap: 12px; }
.plan-features li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--ink-700); }
.plan-features svg { color: var(--success-500); flex-shrink: 0; margin-top: 2px; }
.plan--featured .plan-features svg { color: var(--pink-500); }

/* ============================ CONTACT =================================== */
.contact-card {
  background: #fff;
  border-radius: var(--radius-2xl);
  padding: 40px;
  max-width: 720px;
  margin: 0 auto;
  box-shadow: 0 24px 60px -16px rgba(0,0,0,0.35);
}
@media (max-width: 720px) { .contact-card { padding: 28px 22px; } }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-grid .span2 { grid-column: 1 / -1; }
@media (max-width: 560px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-grid .span2 { grid-column: auto; }
  /* On phones the consent line + submit button compete for one row and the
   * submit ends up half-width. Make it full-width so it's actually tappable. */
  .contact-grid .span2 > .btn { width: 100%; justify-content: center; }
  .contact-grid .span2 > span { max-width: none; }
}

/* ============================ USE CASE CHIPS ============================ */
.usecase-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.usecase-chip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  font-size: 15px; font-weight: 600;
  color: var(--ink-900);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
}
.usecase-chip:hover {
  background: var(--pink-50);
  border-color: var(--pink-300);
  color: var(--pink-700);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.usecase-chip svg { color: var(--pink-500); }

/* ============================ HOW-IT-WORKS ============================== */
.how-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
}
@media (max-width: 720px) { .how-grid { grid-template-columns: 1fr; gap: 28px; } }
.how-step { text-align: center; padding: 0 16px; position: relative; }
.how-step h3 { margin-bottom: 10px; }
.how-step p { color: var(--ink-700); font-size: 15px; }
.how-line {
  position: absolute;
  top: 28px;
  left: 18%; right: 18%;
  height: 2px;
  background-image: linear-gradient(90deg, var(--pink-300) 50%, transparent 50%);
  background-size: 12px 2px;
  background-repeat: repeat-x;
  pointer-events: none;
  opacity: 0.7;
}
@media (max-width: 720px) { .how-line { display: none; } }

/* ============================ MISC ====================================== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 980px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: 1fr; } }
.feature-grid h3 { font-size: 17px; margin-bottom: 8px; }
.feature-grid p  { font-size: 14px; color: var(--ink-500); }

/* RTL helpers */
[dir="rtl"] .step-arrow svg { transform: scaleX(-1); }
