/* SERob Presale — official palette (SPEC §3, orange per DECISIONS 2026-10-21). Mobile first.
 * Orange buttons use dark text: #15171A on #EA774C ≈ 6.2:1. White on #EA774C is ≈ 2.9:1 and is not allowed.
 * Orange is never used for small text or as the only focus indicator on white (≈ 2.9:1): use dark text with an
 * orange underline/border instead. */
:root {
  --sp-orange: #EA774C;
  --sp-green: #1D7F47;
  --sp-red: #B8342A;
  --sp-dark: #15171A;
  --sp-gray: #5B6169;
  --sp-bg-soft: #F6F5F2;
  --sp-radius: 16px;
}

/* ---------- buttons (landing, product pages, cards) ---------- */
.sp-btn,
a.sp-btn,
.wp-block-button__link.sp-apply-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--sp-orange);
  color: var(--sp-dark) !important;
  font-weight: 800;
  font-size: 17px;
  line-height: 1.2;
  text-decoration: none !important;
  cursor: pointer;
}
.sp-btn:hover,
.sp-btn:focus-visible { background: var(--sp-dark); color: var(--sp-orange) !important; }
.sp-btn:focus-visible { outline: 3px solid var(--sp-dark); outline-offset: 2px; }
.sp-btn[disabled] { opacity: .6; cursor: wait; }
.sp-btn-secondary { background: transparent; border: 2px solid var(--sp-dark); }
.sp-btn-secondary:hover { background: var(--sp-dark); }

.sp-single-apply { margin: 20px 0; }
.sp-single-note { margin: 12px 0 4px; color: var(--sp-gray); }
.sp-single-delivery { margin: 4px 0; color: var(--sp-dark); }
.sp-apply-wrap { text-align: center; }

.sp-notice { border-left: 4px solid var(--sp-orange); }
.sp-notice-error { border-left-color: var(--sp-red); }
.sp-delivery-line { margin: 16px 0; }

/* ---------- application form ---------- */
.sp-form { max-width: 640px; margin: 0 auto; text-align: left; }
.sp-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.sp-field { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 6px; }
.sp-half { grid-column: auto; }
.sp-field label { font-weight: 700; color: var(--sp-dark); font-size: 16px; }
.sp-field input[type="text"],
.sp-field input[type="tel"],
.sp-field input[type="email"],
.sp-field input[type="number"],
.sp-field select,
.sp-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1.5px solid #c9ccd1;
  border-radius: 10px;
  background: #fff;
  color: var(--sp-dark);
  font-size: 16px; /* prevents zoom on iOS */
  box-sizing: border-box;
}
.sp-field input:focus,
.sp-field select:focus,
.sp-field textarea:focus { outline: none; border-color: var(--sp-dark); box-shadow: 0 0 0 3px rgba(234, 119, 76, .35); }
.sp-field [aria-invalid="true"] { border-color: var(--sp-red); }
.sp-field-error { margin: 0; color: var(--sp-red); font-size: 14px; }
.sp-field .sp-hint { font-weight: 400; color: var(--sp-gray); }
.sp-field[hidden] { display: none; }
.sp-check { flex-direction: row; align-items: flex-start; gap: 10px; }
.sp-check input { width: 22px; height: 22px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--sp-dark); }
.sp-check label { font-weight: 400; }
.sp-check a { color: var(--sp-dark); text-decoration: underline; text-decoration-color: var(--sp-orange); text-underline-offset: 3px; }
.sp-optional { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; border: 1px solid #e3e3df; border-radius: 12px; padding: 12px 14px; }
.sp-optional > summary { grid-column: 1 / -1; cursor: pointer; font-weight: 700; color: var(--sp-gray); min-height: 32px; display: flex; align-items: center; }
.sp-optional:not([open]) { display: block; }
.sp-form .sp-btn { width: 100%; margin-top: 18px; }
.sp-form-status p { margin: 0 0 16px; padding: 14px 16px; border-radius: 12px; font-weight: 700; }
.sp-ok { background: #EDF7F1; color: var(--sp-green); border: 1.5px solid var(--sp-green); }
.sp-err { background: #FCEDEC; color: var(--sp-red); border: 1.5px solid var(--sp-red); }
.sp-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 520px) {
  .sp-fields, .sp-optional { grid-template-columns: 1fr; }
}

/* ---------- landing page ---------- */
.sp-landing { color: var(--sp-dark); font-family: inherit; }
.sp-landing * { box-sizing: border-box; }
.sp-landing picture { display: block; }
.sp-wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.sp-landing a { color: inherit; }
.sp-landing h3 { font-weight: 700; }
.sp-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; }
.sp-brand { font-size: 26px; font-weight: 800; text-decoration: none; }
.sp-nav-links { display: none; gap: 18px; }
.sp-nav-links a { text-decoration: none; }
.sp-nav-links a:hover { text-decoration: underline; text-decoration-color: var(--sp-orange); }
.sp-nav .sp-btn { min-height: 40px; padding: 8px 16px; font-size: 15px; }

.sp-hero { background: var(--sp-bg-soft); border-radius: 24px; padding: 28px 18px 32px; display: grid; gap: 20px; align-items: center; }
.sp-kicker { letter-spacing: .18em; font-weight: 700; font-size: 13px; color: var(--sp-gray); margin: 0; }
.sp-hero h1 { font-size: clamp(32px, 7.5vw, 64px); line-height: 1.05; margin: 10px 0 14px; }
.sp-hero p { font-size: 18px; line-height: 1.55; margin: 0 0 14px; }
.sp-hero .sp-btn { width: 100%; font-size: 18px; }
.sp-hero-note { font-size: 15px !important; color: var(--sp-gray); margin-top: 12px !important; }
.sp-hero-media img { width: 100%; height: auto; display: block; }
/* SITE-HERO1 (DECISIONS 2026-10-30): on phones the robot photo comes first; desktop keeps text left, photo right. */
.sp-hero-media { order: -1; }
.sp-hero-media img { border-radius: 16px; }
.sp-hero-offer { font-size: 15px !important; font-weight: 600; margin: 12px 0 6px !important; }
.sp-hero-links { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 15px !important; margin: 0 0 6px !important; }
.sp-hero-links a { text-decoration: underline; text-decoration-color: var(--sp-orange); text-underline-offset: 3px; }

.sp-section { padding: 48px 0 8px; }
.sp-section h2 { font-size: clamp(28px, 5vw, 44px); line-height: 1.1; margin: 0 0 12px; }
.sp-lead { font-size: 18px; color: var(--sp-gray); margin: 0 0 20px; line-height: 1.55; }
.sp-strong-line { font-weight: 800; font-size: 19px; border-left: 4px solid var(--sp-orange); padding: 6px 0 6px 14px; margin: 18px 0 0; }

.sp-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: sp; }
.sp-steps li { background: var(--sp-bg-soft); border-radius: var(--sp-radius); padding: 18px 18px 18px 64px; position: relative; counter-increment: sp; }
.sp-steps li::before { content: counter(sp); position: absolute; left: 18px; top: 16px; width: 32px; height: 32px; border-radius: 50%; background: var(--sp-orange); color: var(--sp-dark); font-weight: 800; display: flex; align-items: center; justify-content: center; }
.sp-steps h3 { font-size: 19px; margin: 4px 0 6px; }
.sp-steps p { margin: 0 0 6px; color: var(--sp-gray); line-height: 1.55; }

.sp-three { display: grid; gap: 14px; }
.sp-three > div { border: 1.5px solid #e3e3df; border-radius: var(--sp-radius); padding: 18px; }
.sp-three h3 { margin: 0 0 6px; font-size: 21px; }
.sp-three h3::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--sp-orange); margin-right: 10px; vertical-align: middle; }
.sp-three p { margin: 0; color: var(--sp-gray); line-height: 1.55; }

.sp-explorer { display: grid; gap: 18px; align-items: center; }
.sp-explorer img { width: 100%; height: auto; border-radius: var(--sp-radius); background: #fff; }
.sp-explorer p { font-size: 17px; line-height: 1.6; }
.sp-explorer .sp-subtitle { margin: -6px 0 14px; font-size: 20px; font-style: italic; color: var(--sp-gray); }

.sp-kits { display: grid; gap: 16px; }
.sp-card { background: var(--sp-bg-soft); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; position: relative; }
.sp-card.is-featured { background: #FDF1EA; border: 2px solid var(--sp-orange); }
.sp-card img { width: 100%; height: 240px; object-fit: contain; background: #fff; border-radius: 14px; margin-bottom: 16px; }
.sp-card h3 { font-size: 24px; margin: 0 0 6px; }
.sp-price { font-size: 30px; font-weight: 800; margin: 0 0 10px; }
.sp-card p { line-height: 1.55; margin: 0 0 16px; }
.sp-card .sp-btn { margin-top: auto; }
.sp-card-link { font-size: 15px; margin-top: 10px; text-align: center; }
.sp-badge { position: absolute; top: 28px; left: 28px; background: var(--sp-dark); color: #fff; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 800; }
.sp-kits-note { font-weight: 700; margin: 18px 0; }
.sp-coming { margin-top: 16px; border: 2px solid var(--sp-dark); border-radius: 20px; padding: 18px; display: grid; gap: 16px; align-items: center; }
.sp-coming img { width: 100%; height: auto; object-fit: contain; background: #fff; border-radius: 14px; }
.sp-coming-badge { display: inline-block; background: var(--sp-dark); color: #fff; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 800; letter-spacing: .12em; }
.sp-coming h3 { font-size: 26px; margin: 10px 0 8px; }

.sp-gift { background: #FDF1EA; border-radius: 20px; padding: 22px; }
.sp-gift h2 { font-size: clamp(24px, 4vw, 34px); }

.sp-trust { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.sp-trust li { padding: 14px 16px 14px 44px; background: var(--sp-bg-soft); border-radius: 12px; position: relative; line-height: 1.5; }
.sp-trust li::before { content: "✓"; position: absolute; left: 16px; top: 13px; color: var(--sp-green); font-weight: 800; }

.sp-faq details { border-bottom: 1px solid #e3e3df; }
.sp-faq summary { cursor: pointer; list-style: none; padding: 16px 36px 16px 0; font-weight: 700; font-size: 18px; position: relative; min-height: 48px; }
.sp-faq summary::-webkit-details-marker { display: none; }
.sp-faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 24px; color: var(--sp-dark); }
.sp-faq details[open] summary::after { content: "–"; }
.sp-faq summary:focus-visible { outline: 3px solid var(--sp-dark); outline-offset: 2px; }
.sp-faq details p { margin: 0 0 16px; color: var(--sp-gray); line-height: 1.6; }

.sp-apply { background: var(--sp-bg-soft); border-radius: 24px; padding: 28px 16px; margin-top: 48px; scroll-margin-top: 16px; }
.sp-apply h2 { text-align: center; }
.sp-apply-note { text-align: center; color: var(--sp-gray); margin: 16px 0 0; }

.sp-footer { border-top: 1px solid #d6d6d2; margin-top: 48px; padding: 28px 0; display: grid; gap: 18px; font-size: 15px; line-height: 1.6; }
.sp-footer nav { display: grid; gap: 6px; }

@media (min-width: 800px) {
  .sp-wrap { padding: 0 24px; }
  .sp-nav-links { display: flex; }
  .sp-hero { grid-template-columns: 1.05fr .95fr; padding: 56px 44px; gap: 34px; }
  .sp-hero-media { order: 0; align-self: start; }
  .sp-hero-media img { border-radius: 20px; }
  .sp-hero .sp-btn { width: auto; }
  .sp-section { padding-top: 72px; }
  .sp-steps, .sp-three, .sp-kits { grid-template-columns: repeat(3, 1fr); }
  .sp-explorer { grid-template-columns: 1fr 1fr; gap: 36px; }
  .sp-card img { height: 280px; }
  .sp-coming { grid-template-columns: .9fr 1.1fr; padding: 24px; }
  .sp-apply { padding: 48px 32px; }
  .sp-footer { grid-template-columns: 1.4fr 1fr; }
  .sp-footer nav { text-align: right; }
}

/* SERob header/footer on WooCommerce pages (replaces the theme template parts) */
.sp-shell .sp-nav { border-bottom: 1px solid #e3e3df; }
.sp-shell .sp-footer { margin-top: 32px; }
/* Mobile overflow fixes on theme/WooCommerce pages */
.wc-block-catalog-sorting, .woocommerce-ordering, .woocommerce-ordering select.orderby { max-width: 100%; }
.serob-legal-main .wp-block-post-content.alignfull { margin-left: 0 !important; margin-right: 0 !important; max-width: 100%; }
@media (max-width: 600px) {
  :has(> .wc-block-catalog-sorting) { flex-wrap: wrap; }
  .wc-block-catalog-sorting { flex: 1 1 100%; }
  .woocommerce-ordering select.orderby { width: 100%; }
}

/* Explorer: controller specs and Starter Kit contents */
.sp-specs { display: grid; gap: 14px; margin-top: 22px; }
.sp-specs > div { border: 1.5px solid #e3e3df; border-radius: var(--sp-radius); padding: 18px; }
.sp-specs h3 { margin: 0 0 10px; font-size: 20px; }
.sp-specs ul { margin: 0; padding-left: 20px; line-height: 1.7; }
.sp-specs li::marker { color: var(--sp-orange); }
.sp-specs-note { margin: 10px 0 0; color: var(--sp-gray); font-size: 15px; }
@media (min-width: 800px) { .sp-specs { grid-template-columns: 1fr 1fr; } }
/* SITE-WS2: Telegram channel line in the footer (secondary, not a call to action) */
.sp-footer-telegram { margin: 10px 0 0; font-size: 15px; }
.sp-footer-telegram a, .sp-telegram-line a { text-decoration: underline; text-decoration-color: var(--sp-orange); text-underline-offset: 3px; }
.sp-age-line { font-weight: 600; }
/* TOP1: «back to top» button (shown by presale.js with .sp-top-on; never over a call to action) */
.sp-top { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 50; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 50%; background: var(--sp-orange); color: var(--sp-dark); font: 700 22px/44px system-ui, sans-serif; text-align: center;
  cursor: pointer; box-shadow: 0 2px 8px rgba(21, 23, 26, .25); visibility: hidden; opacity: 0; pointer-events: none; transition: opacity .2s; }
.sp-top.sp-top-on { visibility: visible; opacity: 1; pointer-events: auto; }
.sp-top:focus-visible { outline: 3px solid var(--sp-dark); outline-offset: 2px; }
@media (max-width: 799px) { body:has(:is(input, textarea, select):focus) .sp-top { visibility: hidden; opacity: 0; pointer-events: none; } }
@media (prefers-reduced-motion: reduce) { .sp-top { transition: none; } }
