/*
Theme Name: Apple Convert Theme
Theme URI: https://viborseti.ru/
Author: ViborSeti Team
Author URI: https://viborseti.ru/
Description: Conversion-focused one-screen WordPress theme with Apple-inspired visual style and animated main widget.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: apple-convert-theme
*/

:root {
  --bg-main: #f4f7fd;
  --bg-soft: #ecf2fb;
  --bg-card: rgba(255, 255, 255, 0.82);
  --line: rgba(102, 127, 174, 0.2);
  --text-main: #1c2533;
  --text-muted: #5f6f86;
  --text-input: #a4afc1;
  --accent: #2b9dff;
  --accent-strong: #0d88ed;
  --accent-soft: #d5ecff;
  --success: #21b86d;
  --radius-xl: 36px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --shadow-xl: 0 30px 90px rgba(38, 79, 148, 0.2);
  --shadow-md: 0 18px 46px rgba(53, 91, 153, 0.14);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "SF Pro Display", "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  color: var(--text-main);
  background: linear-gradient(168deg, #f7faff 0%, #f1f6ff 42%, #e8f1ff 100%);
}

body.is-loading {
  overflow: hidden;
}

.landing-shell {
  position: relative;
  min-height: 100vh;
}

.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: block;
  background: linear-gradient(155deg, #f7fbff 0%, #edf4ff 58%, #e8f0ff 100%);
  transition: opacity 0.52s ease, visibility 0.52s ease;
}

.preloader.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.preloader-core {
  display: none;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.ambient::before {
  content: "";
  position: absolute;
  inset: -10%;
  background-image:
    radial-gradient(circle at 16% 26%, rgba(152, 205, 255, 0.48) 0%, rgba(152, 205, 255, 0) 40%),
    radial-gradient(circle at 84% 24%, rgba(133, 226, 205, 0.3) 0%, rgba(133, 226, 205, 0) 35%),
    radial-gradient(circle at 74% 84%, rgba(170, 194, 255, 0.34) 0%, rgba(170, 194, 255, 0) 35%);
  animation: drift 20s ease-in-out infinite alternate;
}

.ambient-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(0.2px);
}

.ambient-orb.orb-a {
  width: 360px;
  height: 360px;
  left: -120px;
  top: 10%;
  background: radial-gradient(circle, rgba(103, 175, 255, 0.3) 0%, rgba(103, 175, 255, 0) 70%);
  animation: float-a 15s ease-in-out infinite;
}

.ambient-orb.orb-b {
  width: 290px;
  height: 290px;
  right: -90px;
  top: 44%;
  background: radial-gradient(circle, rgba(112, 216, 191, 0.26) 0%, rgba(112, 216, 191, 0) 74%);
  animation: float-b 17s ease-in-out infinite;
}

.ambient-orb.orb-c {
  width: 240px;
  height: 240px;
  left: 48%;
  bottom: -90px;
  background: radial-gradient(circle, rgba(130, 172, 255, 0.3) 0%, rgba(130, 172, 255, 0) 73%);
  animation: float-c 16s ease-in-out infinite;
}

.landing-main {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(14px, 2vw, 32px) clamp(18px, 4.2vw, 54px) clamp(40px, 5vw, 72px);
  min-height: 100vh;
}

.hero {
  display: grid;
  gap: 14px;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.hero-title {
  margin: 0;
  font-size: clamp(2.05rem, 5.7vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.032em;
  text-wrap: balance;
}

.hero-subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.52;
  max-width: 740px;
  margin-inline: auto;
  text-wrap: pretty;
}

.widget-stage {
  margin-top: clamp(16px, 2.7vh, 36px);
  display: grid;
  place-items: center;
  min-height: clamp(340px, 43vh, 460px);
}

.search-widget {
  width: min(1040px, 100%);
  margin-inline: auto;
  display: grid;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(102, 143, 211, 0.28);
  border-radius: var(--radius-xl);
  padding: clamp(20px, 3vw, 34px);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96) 0%, rgba(239, 247, 255, 0.94) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-xl);
  transform: perspective(1600px) translateY(175px) scale(0.64);
  transform-origin: 50% 60%;
  opacity: 0;
  filter: blur(10px);
  transition: transform 0.78s cubic-bezier(0.22, 0.98, 0.28, 0.99), box-shadow 0.35s ease, border-color 0.35s ease, opacity 0.72s ease, filter 0.72s ease;
}

body.is-ready .search-widget {
  transform: perspective(1600px) translateY(0) scale(1);
  opacity: 1;
  filter: blur(0);
}

.search-widget:hover,
.search-widget:focus-visible {
  border-color: rgba(71, 154, 244, 0.62);
  box-shadow: 0 36px 95px rgba(43, 94, 173, 0.26), 0 0 0 1px rgba(139, 194, 248, 0.68) inset;
}

.search-widget:focus-visible {
  outline: none;
}

.widget-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  font-size: 0.93rem;
  color: #52627b;
}

.widget-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.widget-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 6px rgba(33, 184, 109, 0.2);
  animation: pulse-dot 2.1s ease-in-out infinite;
}

.widget-hint {
  color: #6f7e95;
}

.widget-line {
  display: flex;
  align-items: center;
  gap: 14px;
}

.widget-input {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(107, 140, 196, 0.28);
  border-radius: var(--radius-md);
  padding: 18px 18px;
  background: linear-gradient(160deg, rgba(242, 248, 255, 0.95) 0%, rgba(252, 254, 255, 0.95) 100%);
}

.widget-input svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  color: #566b87;
}

.widget-prefix {
  color: #495a72;
  white-space: nowrap;
  font-size: 1rem;
}

.typed-address {
  font-size: 1.07rem;
  color: var(--text-input);
  letter-spacing: 0.01em;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.typing-caret {
  width: 1px;
  height: 20px;
  background: rgba(65, 84, 111, 0.74);
  animation: caret 1s step-end infinite;
}

.widget-button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  min-height: 58px;
  min-width: clamp(150px, 17vw, 188px);
  padding: 0 22px;
  font-size: 1.04rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: linear-gradient(160deg, #7dccff 0%, #2b9dff 100%);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(36, 140, 223, 0.34);
  animation: pulse-button 2.1s ease-in-out infinite;
}

.widget-note {
  margin: 0;
  color: #60708a;
  font-size: 0.92rem;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.58s ease, transform 0.58s ease;
}

body.is-ui-visible .reveal {
  opacity: 1;
  transform: translateY(0);
}

.insights,
.promo-section,
.site-footer-note {
  margin-top: clamp(46px, 7.8vh, 92px);
}

.insights {
  display: grid;
  gap: 14px;
}

.insights h2,
.promo-section h2 {
  margin: 0;
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  letter-spacing: -0.02em;
}

.insight-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.insight-card {
  border: 1px solid rgba(109, 143, 201, 0.24);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--shadow-md);
  padding: 20px;
}

.insight-card svg {
  width: 22px;
  height: 22px;
  color: #4d9ef0;
}

.insight-card h3 {
  margin: 12px 0 8px;
  font-size: 1.08rem;
}

.insight-card p {
  margin: 0;
  color: #607089;
  line-height: 1.55;
  font-size: 0.95rem;
}

.promo-section {
  display: grid;
  gap: 12px;
}

.promo-subtitle {
  margin: 0;
  color: #5f6f86;
  font-size: 0.95rem;
}

.promo-carousel {
  overflow: hidden;
  border: 1px solid rgba(110, 142, 196, 0.24);
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.84) 0%, rgba(238, 245, 255, 0.86) 100%);
  padding: 14px;
  box-shadow: var(--shadow-md);
}

.promo-track {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: promo-scroll 56s linear infinite;
}

.promo-carousel:hover .promo-track {
  animation-play-state: paused;
}

.promo-carousel:focus-within .promo-track {
  animation-play-state: paused;
}

.promo-card {
  flex: 0 0 clamp(220px, 72vw, 292px);
  border: 1px solid rgba(110, 142, 196, 0.26);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.95);
  padding: 14px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-height: 196px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

.promo-card:hover,
.promo-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(49, 155, 239, 0.5);
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(58, 110, 185, 0.2);
  outline: none;
}

.promo-logo-wrap {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border: 1px solid rgba(118, 147, 196, 0.22);
  border-radius: 12px;
  padding: 8px 10px;
  background: linear-gradient(150deg, #ffffff 0%, #f4f8ff 100%);
}

.promo-logo-image {
  max-width: 125px;
  max-height: 30px;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
}

.promo-provider-name {
  margin: 0;
  color: #425269;
  font-size: 0.94rem;
  font-weight: 600;
}

.promo-offer {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 650;
  color: #253449;
}

.promo-desc {
  margin: 0;
  font-size: 0.9rem;
  color: #5f6f86;
  line-height: 1.45;
}

.site-footer-note {
  margin-bottom: 10px;
  padding-top: 18px;
  border-top: 1px solid rgba(106, 140, 198, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-copy {
  margin: 0;
  color: #60708a;
  font-size: 0.9rem;
}

.articles-link {
  color: #5f6f88;
  text-decoration: none;
  border-bottom: 1px solid rgba(95, 111, 136, 0.3);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.articles-link:hover,
.articles-link:focus-visible {
  color: #2e9af4;
  border-color: rgba(46, 154, 244, 0.52);
  outline: none;
}

body.is-leaving .landing-main {
  opacity: 0;
  transform: scale(0.985);
  transition: transform 0.24s ease, opacity 0.24s ease;
}

.content-main {
  position: relative;
  z-index: 2;
  max-width: 1060px;
  margin: 0 auto;
  padding: clamp(16px, 2.2vw, 30px) clamp(16px, 4vw, 38px) clamp(48px, 6vw, 80px);
}

.content-topbar {
  margin-bottom: 14px;
}

.content-topbar-inner {
  min-height: 72px;
  border: 1px solid rgba(106, 141, 199, 0.25);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #30445f;
}

.site-brand-logo {
  max-height: 44px;
  max-width: min(220px, 48vw);
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
}

.site-brand-glyph {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(145deg, #7dccff, #2b9dff);
  box-shadow: 0 0 0 6px rgba(97, 181, 244, 0.19);
}

.site-brand-text {
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.content-nav {
  display: inline-flex;
  gap: 8px;
}

.content-nav-link {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid rgba(104, 139, 198, 0.24);
  border-radius: 10px;
  text-decoration: none;
  color: #556881;
  font-size: 0.92rem;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.content-nav-link:hover,
.content-nav-link:focus-visible,
.content-nav-link.is-current {
  color: #167ed2;
  border-color: rgba(22, 126, 210, 0.34);
  background: rgba(224, 241, 255, 0.66);
  outline: none;
}

.content-widget-block {
  margin: 22px 0 8px;
}

.content-search-widget {
  width: min(980px, 100%);
  margin-inline: auto;
}

.articles-hero {
  margin-top: 24px;
  margin-bottom: 10px;
}

.articles-hero h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4.4vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.articles-hero p {
  margin: 10px 0 0;
  color: #5f6f86;
  font-size: 1rem;
  line-height: 1.55;
}

.post-list {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.post-card {
  border: 1px solid rgba(106, 141, 199, 0.23);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.post-card-thumb {
  display: block;
}

.post-card-thumb img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.post-card-body {
  padding: 16px 18px 18px;
}

.post-card-title {
  margin: 0;
  font-size: clamp(1.1rem, 2.1vw, 1.32rem);
  line-height: 1.35;
}

.post-card-title a {
  color: #25364b;
  text-decoration: none;
}

.post-card-title a:hover,
.post-card-title a:focus-visible {
  color: #167ed2;
  outline: none;
}

.post-card-meta {
  margin: 8px 0 0;
  color: #6f7f95;
  font-size: 0.86rem;
}

.post-card-excerpt {
  margin: 10px 0 0;
  color: #5e6e84;
  font-size: 0.95rem;
  line-height: 1.6;
}

.post-article {
  margin-top: 18px;
  border: 1px solid rgba(106, 141, 199, 0.23);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-md);
  padding: clamp(20px, 3vw, 34px);
}

.post-header {
  margin-bottom: 16px;
}

.post-title {
  margin: 0;
  font-size: clamp(1.8rem, 4.3vw, 2.8rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.post-meta {
  margin-top: 10px;
  color: #6a7a90;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.post-meta-sep {
  opacity: 0.5;
}

.post-cover {
  margin: 0 0 16px;
}

.post-cover img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  display: block;
}

.post-content {
  color: #33465f;
  line-height: 1.75;
  font-size: 1.01rem;
}

.post-content p:first-child {
  margin-top: 0;
}

.post-content img,
.post-content iframe,
.post-content video {
  max-width: 100%;
  height: auto;
}

.post-content h2,
.post-content h3,
.post-content h4 {
  color: #1f3045;
  line-height: 1.3;
}

.post-footer-meta {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(101, 137, 196, 0.2);
}

.post-tax-line {
  color: #556a87;
  font-size: 0.9rem;
  line-height: 1.5;
}

.post-nav {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.post-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border: 1px solid rgba(105, 138, 194, 0.24);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.84);
  padding: 8px 12px;
  text-decoration: none;
  color: #3f556f;
  font-size: 0.92rem;
}

.post-nav a:hover,
.post-nav a:focus-visible {
  border-color: rgba(40, 143, 230, 0.34);
  color: #167ed2;
  outline: none;
}

.post-nav-next {
  text-align: right;
}

.post-nav-next a {
  justify-content: flex-end;
}

.post-pages {
  margin-top: 14px;
}

.pagination .nav-links {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pagination ul.page-numbers {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
}

.pagination ul.page-numbers li {
  margin: 0;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(105, 138, 194, 0.25);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.86);
  color: #526982;
  text-decoration: none;
  font-size: 0.9rem;
}

.pagination .page-numbers.current {
  color: #ffffff;
  border-color: #2b9dff;
  background: linear-gradient(145deg, #67bcff, #2697fa);
}

@keyframes pulse-dot {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(33, 184, 109, 0.34);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(33, 184, 109, 0.08);
  }
}

@keyframes pulse-button {
  0%,
  100% {
    transform: translateZ(0) scale(1);
    box-shadow: 0 12px 24px rgba(36, 140, 223, 0.34);
  }
  50% {
    transform: translateZ(0) scale(1.03);
    box-shadow: 0 14px 30px rgba(36, 140, 223, 0.44);
  }
}

@keyframes caret {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

@keyframes drift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(0, -14px, 0) scale(1.02);
  }
}

@keyframes float-a {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(16px, -16px, 0);
  }
}

@keyframes float-b {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(-16px, 14px, 0);
  }
}

@keyframes float-c {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(10px, -14px, 0);
  }
}

@keyframes promo-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@media (max-width: 1020px) {
  .widget-topline {
    flex-wrap: wrap;
  }

  .insight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-topbar-inner {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 760px) {
  .landing-main {
    padding-top: 16px;
  }

  .hero {
    gap: 10px;
  }

  .widget-stage {
    min-height: clamp(320px, 39vh, 420px);
  }

  .widget-line {
    flex-direction: column;
    align-items: stretch;
  }

  .widget-button {
    width: 100%;
  }

  .insight-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-footer-note {
    justify-content: center;
    text-align: center;
  }

  .content-main {
    padding-inline: 14px;
  }

  .content-topbar-inner {
    min-height: auto;
    padding: 12px;
  }

  .content-nav {
    width: 100%;
    justify-content: center;
  }

  .post-nav {
    grid-template-columns: minmax(0, 1fr);
  }

  .post-nav-next {
    text-align: left;
  }

  .post-nav-next a {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .widget-input {
    padding: 14px;
  }

  .widget-prefix {
    display: none;
  }

  .typed-address {
    font-size: 0.95rem;
  }

  .widget-note {
    font-size: 0.88rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  body.is-loading {
    overflow: auto;
  }

  .preloader {
    display: none;
  }

  .search-widget,
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}
