/* KornCode portfolio — светлая тема. Палитра взята из логотипа: зелёный, оранжевый, жёлтый. */
:root {
  --bg: #fbfcf8;
  --surface: #ffffff;
  --ink: #14221a;
  --muted: #4a5b51;
  --line: #e1e7da;
  --green: #3f8f3a;
  --green-ink: #276328;
  --green-soft: #e9f4e4;
  --orange: #ff8a1f;
  --orange-ink: #a84700;
  --orange-soft: #fff0df;
  --yellow: #ffd23f;
  --yellow-soft: #fff7d6;
  --rose: #9d4a63;
  --navy: #12304f;
  --indigo: #3b3fb5;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(20, 34, 26, .06), 0 12px 32px -12px rgba(20, 34, 26, .18);
  --shadow-lg: 0 2px 4px rgba(20, 34, 26, .06), 0 30px 60px -24px rgba(20, 34, 26, .28);
  --font: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "SF Pro Display", "Helvetica Neue", Roboto, "Noto Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  --ease: cubic-bezier(.22, .8, .24, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 760px;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(520px 320px at 12% 6%, rgba(63, 143, 58, .16), transparent 70%),
    radial-gradient(560px 340px at 90% 2%, rgba(255, 210, 63, .30), transparent 70%),
    radial-gradient(420px 260px at 70% 38%, rgba(255, 138, 31, .10), transparent 70%),
    radial-gradient(circle at 1px 1px, rgba(20, 34, 26, .07) 1px, transparent 0) 0 0 / 22px 22px;
  -webkit-mask-image: linear-gradient(#000 55%, transparent);
  mask-image: linear-gradient(#000 55%, transparent);
}
img, svg { max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #1a6fd1; outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
html[data-lang="zh"] body { word-break: normal; line-break: strict; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -64px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; text-decoration: none; transition: top .2s; }
.skip:focus { top: 12px; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.wrap--narrow { width: min(820px, 100% - 32px); }

/* ---------- Верхняя панель / язык ---------- */
.topbar { display: flex; justify-content: flex-end; padding: 14px 16px 0; max-width: 1280px; margin-inline: auto; }
.lang { display: inline-flex; gap: 2px; padding: 4px; background: rgba(255, 255, 255, .85); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow); backdrop-filter: blur(8px); }
.lang__btn { min-width: 44px; min-height: 36px; padding: 0 12px; border: 0; background: transparent; border-radius: 999px; font-weight: 700; font-size: .82rem; letter-spacing: .02em; cursor: pointer; color: var(--muted); transition: background .2s, color .2s; }
.lang__btn:hover { background: var(--green-soft); color: var(--green-ink); }
.lang__btn[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* ---------- Hero ---------- */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 6px 16px 22px; gap: 14px; }
.hero__logo { display: block; width: clamp(150px, 27vh, 290px); animation: logoIn .8s var(--ease) both; }
.hero__logo img { display: block; width: 100%; height: auto; filter: drop-shadow(0 22px 22px rgba(20, 34, 26, .16)); }
.hero__slogan { font-size: clamp(1.4rem, 1rem + 2.2vw, 2.45rem); line-height: 1.18; font-weight: 800; letter-spacing: -.01em; max-width: 22ch; text-wrap: balance; animation: rise .7s .12s var(--ease) both; background: linear-gradient(transparent 82%, rgba(255, 210, 63, .75) 82% 94%, transparent 94%); background-repeat: no-repeat; padding-inline: .15em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.hero__badge { font-size: .78rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); font-weight: 700; animation: rise .7s .2s var(--ease) both; }
.hero__badge span::before, .hero__badge span::after { content: ""; display: inline-block; width: 28px; height: 1px; background: currentColor; vertical-align: middle; margin-inline: 12px; opacity: .5; }
@keyframes logoIn { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- Вкладки ---------- */
.tabsbar { position: sticky; top: 10px; z-index: 30; display: flex; justify-content: center; padding: 0 12px; margin-bottom: 26px; pointer-events: none; transition: transform .3s var(--ease), opacity .3s; }
.tabsbar.is-hidden { transform: translateY(-140%); opacity: 0; }
.demo, .case { scroll-margin-top: 90px; }
.tabs { pointer-events: auto; display: inline-grid; grid-auto-flow: column; gap: 4px; padding: 5px; background: rgba(255, 255, 255, .92); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow); backdrop-filter: blur(10px); animation: rise .7s .28s var(--ease) both; max-width: 100%; }
.tab { min-height: 48px; padding: 0 clamp(14px, 2.4vw, 28px); border: 0; border-radius: 999px; background: transparent; font-weight: 700; font-size: clamp(.9rem, .85rem + .25vw, 1.02rem); cursor: pointer; color: var(--ink); white-space: nowrap; transition: background .25s var(--ease), color .25s, transform .2s, box-shadow .25s; }
.tab:hover { background: var(--green-soft); }
.tab:active { transform: scale(.97); }
.tab[aria-selected="true"] { background: var(--ink); color: #fff; box-shadow: 0 6px 16px -6px rgba(20, 34, 26, .55); }
.tab[aria-selected="true"]:hover { background: var(--ink); }

/* ---------- Панели ---------- */
.panels { min-height: 62vh; }
.panel { padding: 8px 0 72px; scroll-margin-top: 90px; }
.panel:focus { outline: none; }
.panel.is-entering { animation: panelIn .45s var(--ease) both; }
@keyframes panelIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.h2 { font-size: clamp(1.7rem, 1.2rem + 2.4vw, 3rem); line-height: 1.1; letter-spacing: -.02em; font-weight: 800; margin: 12px 0 18px; text-wrap: balance; }
.lead { color: var(--muted); font-size: 1.06rem; max-width: 62ch; margin-bottom: 22px; }

.notice { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: var(--radius-sm); background: var(--yellow-soft); border: 1px solid #f0d77c; border-left: 6px solid var(--orange); margin-bottom: 18px; max-width: 760px; }
.notice__icon { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--orange); color: #14221a; display: grid; place-items: center; font-weight: 900; }
.notice strong { display: block; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--orange-ink); margin-bottom: 2px; }
.notice p { font-weight: 600; }

.chip { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: .78rem; font-weight: 800; letter-spacing: .03em; }
.chip--rose { background: #f8e4ea; color: #7e2c46; }
.chip--navy { background: #dfeaf6; color: #12304f; }
.chip--indigo { background: #e5e6fb; color: #2c2f93; }
.chip--green { background: var(--green-soft); color: var(--green-ink); }

.jump { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 26px; }
.jump a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px 0 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); text-decoration: none; font-weight: 700; transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; }
.jump a:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #c8d3bf; }
.jump__n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--yellow); font-size: .8rem; font-weight: 900; }

/* ---------- Кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent; font-weight: 800; font-size: 1rem; text-decoration: none; cursor: pointer; transition: transform .2s var(--ease), box-shadow .25s, background .2s, border-color .2s; text-align: center; line-height: 1.2; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn .ico { width: 20px; height: 20px; fill: currentColor; flex: none; }
.btn--ghost { background: var(--surface); border-color: var(--line); color: var(--ink); min-height: 42px; padding: 0 16px; font-size: .92rem; }
.btn--ghost:hover { border-color: #b9c7ae; box-shadow: var(--shadow); }
.btn--primary { background: var(--ink); color: #fff; box-shadow: 0 10px 22px -10px rgba(20, 34, 26, .6); }
.btn--tg { background: var(--orange); color: #14221a; box-shadow: 0 12px 26px -12px rgba(255, 138, 31, .9); padding: 0 26px; min-height: 54px; }
.btn--tg:hover { background: #ff9a3d; box-shadow: 0 16px 30px -12px rgba(255, 138, 31, 1); }
.tg-handle { font-weight: 900; margin-inline-start: 4px; }

/* ---------- Демо ---------- */
.demo { margin: 0 0 44px; }
.demo__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 24px; align-items: flex-end; margin-bottom: 14px; }
.demo__meta { max-width: 700px; display: grid; gap: 8px; justify-items: start; }
.demo__meta h3 { font-size: clamp(1.25rem, 1.05rem + 1vw, 1.75rem); line-height: 1.2; letter-spacing: -.01em; }
.demo__meta p { color: var(--muted); }
.demo__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.frame { border-radius: var(--radius); overflow: hidden; border: 1px solid #cfd8c7; background: #fff; box-shadow: var(--shadow-lg); }
.frame__bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: #eef2ea; border-bottom: 1px solid var(--line); }
.frame__bar i { width: 11px; height: 11px; border-radius: 50%; background: #cdd6c4; flex: none; }
.frame__bar i:nth-child(1) { background: #ff8c7e; }
.frame__bar i:nth-child(2) { background: #ffd26a; }
.frame__bar i:nth-child(3) { background: #7fd08a; }
.frame__url { margin-inline-start: 8px; flex: 1; min-width: 0; padding: 4px 12px; background: #fff; border-radius: 999px; font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border: 1px solid var(--line); }
.frame__badge { font-size: .7rem; font-weight: 900; letter-spacing: .1em; background: var(--orange); color: #14221a; padding: 4px 10px; border-radius: 999px; flex: none; }
.frame iframe { display: block; width: 100%; height: 760px; border: 0; background: #fff; }
.frame--app iframe { height: clamp(660px, 88vh, 840px); }

/* ---------- CTA ---------- */
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; padding: clamp(22px, 4vw, 38px); border-radius: var(--radius); background: linear-gradient(120deg, var(--yellow-soft), #fff 55%, var(--green-soft)); border: 1px solid var(--line); box-shadow: var(--shadow); position: relative; overflow: hidden; margin-top: 36px; }
.cta::after { content: ""; position: absolute; right: -40px; top: -60px; width: 190px; height: 190px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 138, 31, .22), transparent 70%); pointer-events: none; }
.cta__text { max-width: 600px; position: relative; z-index: 1; }
.cta h3 { font-size: clamp(1.25rem, 1rem + 1.2vw, 1.9rem); line-height: 1.2; letter-spacing: -.01em; margin-bottom: 6px; text-wrap: balance; }
.cta p { color: var(--muted); }
.cta .btn { position: relative; z-index: 1; }
.cta--slim { padding: clamp(18px, 3vw, 28px); }

/* ---------- Наши работы ---------- */
.case { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(20px, 4vw, 48px); align-items: start; padding: clamp(20px, 4vw, 40px); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.case__info { display: grid; gap: 16px; justify-items: start; }
.case__title { font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.5rem); letter-spacing: -.02em; line-height: 1.1; word-break: break-word; }
.case__title a { text-decoration: none; background: linear-gradient(var(--yellow), var(--yellow)) 0 92% / 100% .24em no-repeat; transition: background-size .25s; }
.case__title a:hover { background-size: 100% 100%; }
.owner { display: grid; gap: 4px; padding: 14px 18px; border-left: 4px solid var(--green); background: var(--green-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; width: 100%; }
.owner figcaption { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; color: var(--green-ink); }
.owner blockquote { font-size: 1.12rem; font-weight: 700; }
.case__sub { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-top: 8px; }
.facts { display: grid; gap: 8px; width: 100%; }
.facts li { position: relative; padding-inline-start: 28px; }
.facts li::before { content: ""; position: absolute; inset-inline-start: 0; top: .42em; width: 16px; height: 16px; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4.5 8.3 2.3 2.3 4.7-4.9' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; }
.case__note { font-size: .9rem; color: var(--muted); padding-top: 12px; border-top: 1px dashed #cdd6c4; width: 100%; }
.schema { display: grid; gap: 10px; }
.schema__browser { border: 1px solid #cfd8c7; border-radius: var(--radius-sm); overflow: hidden; background: #f6f8f3; box-shadow: var(--shadow); }
.schema__body { display: grid; gap: 8px; padding: 14px; }
.schema__block { position: relative; display: flex; align-items: center; min-height: 44px; padding: 8px 14px; border-radius: 10px; background: #fff; border: 1px dashed #b9c7ae; font-size: .85rem; font-weight: 700; color: var(--muted); opacity: 0; animation: rise .5s var(--ease) forwards; }
.schema__block:nth-child(2) { min-height: 86px; background: linear-gradient(135deg, var(--green-soft), var(--yellow-soft)); }
.schema__block:last-child { min-height: 76px; border-color: var(--orange); }
.schema figcaption { font-size: .85rem; color: var(--muted); text-align: center; }

/* ---------- FAQ ---------- */
.acc { display: grid; gap: 10px; }
.acc__item { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-sm); transition: box-shadow .25s, border-color .25s; }
.acc__item.open { border-color: #b9c7ae; box-shadow: var(--shadow); }
.acc__item h3 { font-size: 1rem; }
.acc__btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; min-height: 60px; border: 0; background: transparent; text-align: start; font-size: clamp(1rem, .95rem + .3vw, 1.12rem); font-weight: 700; cursor: pointer; border-radius: var(--radius-sm); }
.acc__btn:hover { background: #f6f9f2; }
.acc__icon { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--yellow); position: relative; transition: transform .3s var(--ease), background .2s; }
.acc__icon::before, .acc__icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; background: var(--ink); transform: translate(-50%, -50%); border-radius: 2px; }
.acc__icon::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform .3s var(--ease); }
.acc__item.open .acc__icon { background: var(--orange); transform: rotate(180deg); }
.acc__item.open .acc__icon::after { transform: translate(-50%, -50%) rotate(0); }
.acc__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .32s var(--ease); }
.acc__item.open .acc__panel { grid-template-rows: 1fr; }
.acc__panel > div { overflow: hidden; visibility: hidden; transition: visibility 0s .32s; }
.acc__item.open .acc__panel > div { visibility: visible; transition-delay: 0s; }
.acc__panel p { padding: 0 20px 20px; color: var(--muted); max-width: 68ch; }

/* ---------- Почему именно мы ---------- */
.why { display: grid; gap: 14px; counter-reset: why; }
.why__item { display: grid; grid-template-columns: auto 1fr; gap: 6px clamp(14px, 3vw, 34px); align-items: start; padding: clamp(18px, 3vw, 30px); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); position: relative; overflow: hidden; opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease), box-shadow .25s, border-color .25s; }
.why__item.is-in { opacity: 1; transform: none; }
.why__item:hover { box-shadow: var(--shadow); border-color: #c4d1b9; }
.why__n { grid-row: span 2; font-size: clamp(2.6rem, 2rem + 3vw, 4.6rem); line-height: 1; font-weight: 900; letter-spacing: -.04em; color: transparent; -webkit-text-stroke: 2px var(--green); min-width: 1.5ch; font-variant-numeric: tabular-nums; }
.why__item:nth-child(even) .why__n { -webkit-text-stroke-color: var(--orange); }
.why__t { font-size: clamp(1.3rem, 1rem + 1.5vw, 2.1rem); line-height: 1.15; letter-spacing: -.02em; font-weight: 800; text-wrap: balance; }
.why__d { color: var(--muted); font-size: 1.04rem; max-width: 62ch; }
.why__item::after { content: ""; position: absolute; inset-inline-end: -30px; bottom: -30px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 210, 63, .35), transparent 70%); opacity: 0; transition: opacity .3s; pointer-events: none; }
.why__item:hover::after { opacity: 1; }
.why__item--big { background: linear-gradient(120deg, var(--green-soft), #fff 70%); }

/* ---------- Подвал ---------- */
.footer { border-top: 1px solid var(--line); background: #f4f7ef; padding: 26px 0 34px; font-size: .92rem; color: var(--muted); }
.footer__in { display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: space-between; align-items: center; }
.footer__tg { font-weight: 700; color: var(--ink); text-decoration: none; }
.footer__tg:hover { text-decoration: underline; }
.noscript { padding: 24px; text-align: center; }

/* ---------- Адаптив ---------- */
@media (max-width: 900px) {
  .case { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .hero__logo { width: clamp(140px, 24vh, 220px); }
  .tabsbar { position: static; margin-bottom: 20px; }
  .tabs { display: grid; grid-auto-flow: row; grid-template-columns: 1fr 1fr; border-radius: 26px; width: min(100%, 460px); }
  .tab { white-space: normal; padding: 8px 10px; min-height: 52px; line-height: 1.2; }
  .why__item { grid-template-columns: 1fr; }
  .why__n { grid-row: auto; }
  .demo__actions .btn { flex: 1 1 auto; }
  .cta .btn { width: 100%; }
  .frame__url { display: none; }
  .frame__badge { margin-inline-start: auto; }
}

/* ---------- Уменьшенное движение ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .panel.is-entering { animation: none; }
  .why__item { opacity: 1; transform: none; }
  .schema__block { opacity: 1; }
}
