/* ====== Theme tokens (mirrors source: orange accent + light/dark sections) ====== */
:root {
  --accent: #ff5c33;
  --accent-hover: #eb623c;
  --accent-glow: rgba(255, 92, 51, 0.25);
  --accent-glow-strong: rgba(255, 92, 51, 0.35);
  --ink: #111111;
  --ink-soft: #2b2b2b;
  --muted: #8a8a8a;
  --line: #e8e8e8;
  --bg: #ffffff;
  --bg-muted: #f0f0f0;
  --bg-dark: #111111;
  --bg-dark-soft: #1c1c1c;
  --bg-darker: #050505;
  --on-dark: #e0e0e0;
  --on-dark-muted: rgba(255, 255, 255, 0.7);
  --on-dark-faint: rgba(255, 255, 255, 0.5);
  --on-dark-line: rgba(255, 255, 255, 0.12);
  --radius: 6px;
  --radius-lg: 10px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.08);
  --container: 1180px;
  --container-narrow: 860px;
  --bp-lg: 980px;
  --bp-md: 960px;
  --bp-sm: 720px;
  --bp-xs: 480px;
  --transition: 0.25s ease;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }
ul { list-style: none; padding: 0; margin: 0; }

h1, h2, h3, h4 {
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 0.5em;
  line-height: 1.25;
}

p { margin: 0 0 1em; }

/* ====== Layout ====== */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding: 100px 0;
}
.section--muted { background: var(--bg-muted); }
.section--dark {
  background: var(--bg-dark);
  color: var(--on-dark);
}
.section--dark .section__title { color: #fff; }

.section__head {
  max-width: 1000px;
  margin: 0 auto 80px;
  text-align: center;
}
.section__title {
  font-size: 36px;
  margin-bottom: 32px;
}
.section__title--center { text-align: center; }
.section__descr {
  font-size: 18px;
  color: var(--ink-soft);
  margin-bottom: 18px;
}
.section__descr:last-child { margin-bottom: 0; }

/* ====== Header ====== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0);
  transition: background var(--transition), box-shadow var(--transition);
}
.header.is-scrolled {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(8px);
  box-shadow: var(--shadow-sm);
}
.header__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.header__logo {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.header__logo:hover { color: var(--ink); }
.header__nav {
  margin-left: auto;
}
.header__nav ul {
  display: flex;
  gap: 28px;
}
.header__nav a {
  font-weight: 600;
  color: var(--ink);
  font-size: 15px;
  position: relative;
}
.header__nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -6px;
  height: 2px;
  background: var(--accent);
  transition: right var(--transition);
}
.header__nav a:hover::after { right: 0; }
.header__cta { white-space: nowrap; }
.header__burger {
  display: none;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 0;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin-left: auto;
}
.header__burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: transform var(--transition), opacity var(--transition);
}
.header__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.header__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.header__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.header__mobile {
  display: none;
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid var(--line);
}
.header__mobile ul {
  display: flex;
  flex-direction: column;
  padding: 16px 24px;
}
.header__mobile a {
  display: block;
  padding: 12px 0;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.header__mobile li:last-child a { border-bottom: 0; }

/* ====== Buttons ====== */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  cursor: pointer;
  border: 0;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition), color var(--transition);
  text-align: center;
}
.btn--sm { padding: 10px 20px; font-size: 14px; }
.btn--accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px var(--accent-glow);
}
.btn--accent:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px var(--accent-glow-strong);
}
.btn--accent:active { transform: translateY(0); }

/* ====== Hero ====== */
.hero {
  padding: 200px 0 100px;
  text-align: center;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(255, 92, 51, 0.07), transparent 70%),
    #fff;
}
.hero__title {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.1;
  margin-bottom: 24px;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.hero__subtitle {
  font-size: clamp(18px, 2vw, 28px);
  color: var(--muted);
  font-weight: 400;
  margin: 0;
}

/* ====== Lead text ====== */
.lead {
  font-size: 19px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin-bottom: 20px;
}
.lead:last-child { margin-bottom: 0; }

/* ====== Product cards ====== */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}
.card__media {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg-muted);
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.card:hover .card__media img { transform: scale(1.05); }
.card__body {
  padding: 28px 26px 20px;
  flex: 1;
}
.card__title {
  font-size: 19px;
  line-height: 1.35;
  margin-bottom: 14px;
}
.card__title a { color: var(--ink); }
.card__title a:hover { color: var(--accent); }
.card__text {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-bottom: 12px;
}
.card__text:last-child { margin-bottom: 0; }
.card__action {
  padding: 0 26px 26px;
}

/* ====== Carousel ====== */
.carousel {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  user-select: none;
}
.carousel__viewport {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-md);
}
.carousel__track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
  will-change: transform;
}
.carousel__slide {
  flex: 0 0 100%;
  min-width: 0;
}
.carousel__slide img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  border: 0;
  font-size: 18px;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: background var(--transition), transform var(--transition);
  z-index: 2;
}
.carousel__arrow:hover {
  background: var(--accent);
  color: #fff;
}
.carousel__arrow--prev { left: -24px; }
.carousel__arrow--next { right: -24px; }
.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}
.carousel__dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 50%;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.carousel__dots button:hover { background: var(--accent-hover); }
.carousel__dots button.is-active {
  background: var(--accent);
  transform: scale(1.4);
}

/* ====== Reviews carousel ====== */
.carousel--reviews .carousel__slide {
  padding: 50px 40px;
  background: #fff;
  text-align: center;
}
.review {
  max-width: 720px;
  margin: 0 auto;
}
.review__photo {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 20px;
  border: 4px solid #fff;
  box-shadow: var(--shadow-md);
}
.review__photo img { width: 100%; height: 100%; object-fit: cover; }
.review__name {
  font-size: 18px;
  margin-bottom: 12px;
  color: var(--ink);
}
.review__text {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-soft);
  font-style: italic;
}

/* ====== Features ====== */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.features__item {
  background: #fff;
  padding: 32px 28px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.features__item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.features__item h3 {
  font-size: 17px;
  color: var(--ink);
  margin-bottom: 12px;
  position: relative;
  padding-left: 22px;
}
.features__item h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
}
.features__item p {
  margin: 0;
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* ====== Contacts ====== */
.contacts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 32px;
  margin: 0 auto 36px;
  max-width: 640px;
}
.contacts__item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 20px;
  background: var(--bg-dark-soft);
  border-radius: var(--radius);
  border: 1px solid var(--on-dark-line);
}
.contacts__label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--on-dark-faint);
}
.contacts__value {
  color: #fff;
  font-size: 17px;
  font-weight: 600;
}
.contacts__value:hover { color: var(--accent); }
.contacts__hint {
  text-align: center;
  font-size: 18px;
  margin-bottom: 24px;
  color: var(--on-dark-muted);
}

/* ====== Contact form ====== */
.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  max-width: 640px;
  margin: 0 auto;
}
.contact-form__group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.contact-form__group--full { grid-column: 1 / -1; }
.contact-form__group label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.04em;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--on-dark-line);
  border-radius: var(--radius);
  background: var(--bg-dark-soft);
  color: #fff;
  font: inherit;
  resize: vertical;
  transition: border-color var(--transition), background var(--transition);
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--on-dark-faint); }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #232323;
}
.contact-form__action {
  display: flex;
  align-items: center;
  gap: 16px;
}
.contact-form__status {
  font-size: 14px;
  color: var(--on-dark-muted);
}
.contact-form__status.is-success { color: #7ee787; }
.contact-form__status.is-error { color: #ff9a8a; }

/* ====== Footer ====== */
.footer {
  background: var(--bg-darker);
  color: var(--on-dark-muted);
  padding: 28px 0;
  font-size: 14px;
  text-align: center;
}
.footer p { margin: 4px 0; }
.footer a { color: rgba(255, 255, 255, 0.85); }
.footer a:hover { color: var(--accent); }

/* ====== Responsive ======
   Three tiers (mirroring Tilda's 980 / 640 / 480 system):
     1) ≤980  — header detaches, burger takes over, grids collapse to 1 column,
                section spacing tightens
     2) ≤640  — small phones: touch targets grow, headings shrink further
     3) ≤480  — extremely narrow: button widths and hero copy clamp tighter
   The 960px breakpoint used elsewhere is treated as 980 for consistency. */

@media (max-width: 980px) {
  /* Header: detach + mobile menu */
  .header { position: static; }
  .header__inner { padding: 16px 20px; }
  .header__nav,
  .header__cta { display: none; }
  .header__burger { display: flex; }
  .header.is-menu-open .header__mobile { display: block; }

  /* Hero */
  .hero { padding: 80px 0 60px; }

  /* Section spacing */
  .section { padding: 60px 0; }
  .section__head { margin-bottom: 40px; }

  /* Grids: 3 columns → 1 column, matching t853__container_mobile-grid */
  .cards { grid-template-columns: 1fr; gap: 28px; }
  .features { grid-template-columns: 1fr; gap: 16px; }

  /* Typography */
  .section__title { font-size: 30px; margin-bottom: 24px; }
  .section__title--center { margin-bottom: 32px; }
  .hero__title { font-size: 34px; }
  .hero__subtitle { font-size: 18px; }
  .lead { font-size: 17px; }

  /* Contacts / form */
  .contacts { grid-template-columns: 1fr; gap: 12px; max-width: 100%; }
  .contact-form { grid-template-columns: 1fr; }

  /* Carousel arrows tuck inside on tablet */
  .carousel__arrow--prev { left: 8px; }
  .carousel__arrow--next { right: 8px; }
  .carousel__arrow {
    width: 42px;
    height: 42px;
    font-size: 16px;
  }
  .carousel--reviews .carousel__slide { padding: 36px 22px; }
}

@media (max-width: 720px) {
  .header__inner { padding: 14px 16px; }
  .header__logo { font-size: 18px; }

  .hero { padding: 60px 0 50px; }
  .hero__title { font-size: 28px; }
  .hero__subtitle { font-size: 16px; }

  .section { padding: 50px 0; }
  .section__title { font-size: 24px; }
  .section__head { margin-bottom: 30px; }

  .card__body { padding: 22px 20px 16px; }
  .card__action { padding: 0 20px 22px; }
  .card__title { font-size: 17px; }
  .card__text { font-size: 14px; }

  .features__item { padding: 24px 20px; }

  .carousel__arrow {
    width: 38px;
    height: 38px;
    font-size: 15px;
  }
  .carousel--reviews .carousel__slide { padding: 28px 18px; }
  .review__photo { width: 90px; height: 90px; }
  .review__text { font-size: 15px; }

  .btn { padding: 12px 22px; }
  .btn--sm { padding: 10px 18px; font-size: 14px; }

  .contact-form__action { flex-direction: column; align-items: stretch; }
  .contact-form__status { text-align: center; }
}

@media (max-width: 480px) {
  .header__logo { font-size: 16px; }
  .hero__title { font-size: 24px; }
  .hero__subtitle { font-size: 15px; }
  .section__title { font-size: 22px; }
  .lead { font-size: 16px; }
}
