/* A HD studio arculata és a két felület megjelenéskapcsolója. */
:root {
  --primary: #943d18;
  --primary-dark: #6c2b11;
  --action-bg: #943d18;
  --action-ink: #fffaf2;
  --ink: #261c16;
  --muted: #6b594c;
  --border: #dfd0c2;
  --surface: #f5efe5;
  --panel: #fffaf2;
  --raised: #eee4d7;
  --soft-accent: #f5e1d3;
  --brand-accent: #b74e21;
  --shadow: 0 16px 42px #4e291110;
  --studio-serif: Georgia, 'Times New Roman', serif;
  --studio-ease: cubic-bezier(0.22, 1, 0.36, 1);
}
.public-site {
  --primary: color-mix(in srgb, var(--customer-accent, #f08143), #271205 53%);
  --primary-dark: color-mix(in srgb, var(--primary), black 22%);
  --action-bg: var(--primary);
  --brand-accent: var(--primary);
  background: var(--surface);
}
.public-header-actions,
.auth-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--ink);
  background: transparent;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}
.theme-toggle:hover {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary), transparent 94%);
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}
.theme-toggle .icon {
  width: 19px;
  height: 19px;
}
.theme-dark-icon,
.theme-dark-label,
:root[data-theme='dark'] .theme-light-icon,
:root[data-theme='dark'] .theme-light-label {
  display: none;
}
:root[data-theme='dark'] .theme-dark-icon,
:root[data-theme='dark'] .theme-dark-label {
  display: inline-block;
}

/* A tervező vásznának saját színeihez és a képekhez nem nyúlunk. */
:root[data-theme='dark'] {
  color-scheme: dark;
  --primary: #f08143;
  --primary-dark: #ffad7e;
  --action-bg: #f08143;
  --action-ink: #201208;
  --ink: #f5efe5;
  --muted: #bdb1a3;
  --border: #3c3229;
  --surface: #100e0c;
  --panel: #181512;
  --raised: #231e19;
  --soft-accent: #302018;
  --brand-accent: var(--primary);
  --logo-center: var(--ink);
  --shadow: 0 16px 42px #00000026;
  background: var(--surface);
}
:root[data-theme='dark'] .public-site {
  --primary: color-mix(in srgb, var(--customer-accent, #f08143), #fff5e8 14%);
  --primary-dark: color-mix(in srgb, var(--primary), #fff5e8 24%);
  --action-bg: color-mix(in srgb, var(--customer-accent, #f08143), #fff5e8 34%);
  background: var(--surface);
}
:root[data-theme='dark'] .site-root {
  color-scheme: light;
  --ink: #18213b;
  --muted: #728096;
  --border: #e5e9f1;
  --surface: #f5f7fb;
  --primary: var(--site-accent);
}
.editor-header .theme-toggle-label {
  display: none;
}
.editor-header .theme-toggle {
  width: 44px;
  padding: 10px;
}
:root[data-theme='dark']
  :is(
    .card,
    .auth-card,
    .workspace-header,
    .project-card,
    .template-card,
    .subscription-card,
    .subscription-promo,
    .editor-header,
    .editor-toolbar,
    .block-library,
    .library-block,
    .properties-panel,
    .canvas-empty,
    .page-tab,
    .modal,
    .floating-card,
    .floating-colors
  ) {
  background: var(--panel);
  border-color: var(--border);
  color: var(--ink);
}
:root[data-theme='dark'] .subscription-featured {
  border-color: var(--primary);
}
:root[data-theme='dark'] .subscription-current {
  border-color: var(--primary);
}
:root[data-theme='dark'] :is(.how-section, .subscriptions-section) {
  background: var(--panel);
  border-color: var(--border);
}
:root[data-theme='dark'] .auth-page {
  background:
    radial-gradient(ellipse at 15% 20%, var(--soft-accent), transparent 55%), var(--surface);
}
:root[data-theme='dark'] :is(input, select, textarea):not(.site-root *) {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
}
:root[data-theme='dark'] :is(input, textarea):not(.site-root *)::placeholder {
  color: var(--muted);
  opacity: 1;
}
:root[data-theme='dark'] :is(input, select, textarea):not(.site-root *):focus {
  outline-color: var(--primary);
  border-color: var(--primary);
}
:root[data-theme='dark'] :is(.btn-outline, .theme-toggle) {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--border);
}
:root[data-theme='dark'] :is(.btn-outline, .theme-toggle):hover {
  background: var(--raised);
  border-color: var(--primary);
}
:root[data-theme='dark'] .btn-primary:not(.site-root *) {
  background: var(--action-bg);
  color: var(--action-ink);
}
:root[data-theme='dark'] .btn-primary:not(.site-root *):hover {
  background: var(--primary-dark);
}
:root[data-theme='dark'] :is(.icon-btn:hover, .icon-btn.active, .step-number, .auth-icon) {
  background: var(--soft-accent);
  border-color: var(--border);
  color: var(--primary);
}
:root[data-theme='dark']
  :is(
    .public-header nav a,
    .hero-footnote,
    .floating-colors > span,
    .promo-plan-name,
    .promo-plan small,
    .promo-later,
    .subscription-promo p,
    .summary-text,
    th
  ) {
  color: var(--muted);
}
:root[data-theme='dark'] .public-header nav a:hover {
  color: var(--ink);
}
:root[data-theme='dark'] :is(.view-toggle, .canvas-area, .page-bar, .message, th, .summary-text) {
  background: var(--raised);
}
:root[data-theme='dark']
  :is(
    .team-message,
    .help-box,
    .canvas-help,
    .page-tab.active,
    .editor-plan-chip,
    .profile-type-options label:has(input:checked)
  ) {
  background: var(--soft-accent);
  border-color: var(--border);
}
:root[data-theme='dark'] :is(.help-box, .canvas-help, .page-tab.active, .editor-plan-chip) {
  color: var(--primary-dark);
}
:root[data-theme='dark'] .profile-type-options label {
  border-color: var(--border);
}
:root[data-theme='dark'] .profile-details > div {
  border-color: var(--border);
}
:root[data-theme='dark'] .library-block:hover {
  background: var(--raised);
  border-color: var(--primary);
}
:root[data-theme='dark'] .library-block > .icon {
  color: var(--primary);
}
:root[data-theme='dark'] .block-mini {
  background: var(--soft-accent);
}
:root[data-theme='dark'] .block-mini i {
  background: var(--primary);
}
:root[data-theme='dark'] .save-status {
  color: #86d7b1;
}
:root[data-theme='dark'] :is(.save-error, .inline-form-status, .danger) {
  color: #ff9bb0;
}
:root[data-theme='dark'] :is(.warning, .local-mail-notice) {
  background: #3a2e1c;
  color: #f4d394;
}
:root[data-theme='dark'] .badge.blue {
  background: var(--soft-accent);
  color: var(--primary-dark);
}
:root[data-theme='dark'] .badge.green {
  background: #16382d;
  color: #93dfb8;
}
:root[data-theme='dark'] .badge.amber {
  background: #3a2e1c;
  color: #f4d394;
}
:root[data-theme='dark'] .badge.red {
  background: #412635;
  color: #ffadc0;
}
:root[data-theme='dark'] .promo-plan {
  background: var(--raised);
  border-color: var(--border);
}
:root[data-theme='dark'] .promo-plan-featured {
  background: var(--soft-accent);
  border-color: var(--primary);
}
:root[data-theme='dark'] .promo-close {
  background: var(--panel);
  border-color: var(--border);
  color: var(--ink);
}
:root[data-theme='dark'] .promo-close:hover {
  background: var(--raised);
}
:root[data-theme='dark'] .promo-visual {
  background: var(--soft-accent);
}

/* A szerkesztő kezelősávjai és az ügyféltervek külön palettát használnak. */
#app :is(.btn, .theme-toggle):not(.site-root *),
#modal-root .btn {
  border-radius: 6px;
  transition:
    background-color 200ms,
    border-color 200ms,
    color 200ms,
    box-shadow 200ms;
}
:root:not([data-theme='dark']) .btn-outline:not(.site-root *) {
  color: var(--ink);
  background: var(--panel);
}
:root:not([data-theme='dark']) .btn-primary:not(.site-root *) {
  color: var(--action-ink);
  background: var(--action-bg);
}
:root:not([data-theme='dark']) .btn-primary:not(.site-root *):hover {
  background: var(--primary-dark);
}
:root:not([data-theme='dark']) .btn-outline:not(.site-root *):hover {
  background: var(--raised);
  border-color: var(--primary);
}
:is(#app, #modal-root) :is(a, button):not(.site-root *):focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}
:root:not([data-theme='dark']) :is(input, select, textarea):not(.site-root *) {
  background: var(--panel);
  border-color: var(--border);
}
:root:not([data-theme='dark']) :is(input, select, textarea):not(.site-root *):focus {
  outline-color: var(--primary);
}

.public-header-bar {
  position: sticky;
  top: 0;
  z-index: 45;
  background-color: transparent;
  transition:
    background-color 240ms var(--studio-ease),
    box-shadow 240ms var(--studio-ease);
}
.public-header-bar.is-scrolled {
  background-color: var(--surface);
  box-shadow:
    0 1px 0 var(--border),
    0 8px 28px #00000016;
}
.public-header {
  border-bottom: 1px solid var(--border);
}
.public-site main > section[id],
.public-site :is(a, button, input, select, textarea, summary):focus {
  scroll-margin-top: calc(var(--studio-nav-height, 100px) + 12px);
}
.public-header nav a {
  position: relative;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.public-header nav a:not(.studio-external-link)::after,
.hero-copy .text-link::after {
  content: '';
  display: block;
  height: 1px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 320ms var(--studio-ease);
}
.public-header nav a:not(.studio-external-link):is(:hover, :focus-visible),
.hero-copy .text-link:is(:hover, :focus-visible) {
  color: var(--primary);
  text-decoration: none;
}
.public-header nav a:not(.studio-external-link):is(:hover, :focus-visible)::after,
.hero-copy .text-link:is(:hover, :focus-visible)::after {
  transform: scaleX(1);
}
.landing-hero {
  position: relative;
  isolation: isolate;
}
.landing-hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: '';
  pointer-events: none;
  background: radial-gradient(
    ellipse at 76% 46%,
    color-mix(in srgb, var(--primary) 13%, transparent),
    transparent 62%
  );
}
.landing-hero::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: '';
  opacity: 0.14;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black, transparent 78%);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.87' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' opacity='.72' filter='url(%23grain)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}
.hero-copy h1 {
  font-family: 'Arial Narrow', 'Aptos Narrow', 'Segoe UI', sans-serif;
  font-size: clamp(2.65rem, 5.15vw, 4.95rem);
  font-weight: 800;
  letter-spacing: -0.075em;
  line-height: 1.04;
  overflow-wrap: anywhere;
}
.studio-title-line {
  display: block;
}
.studio-title-line + .studio-title-line {
  margin-top: 0.12em;
  font-family: var(--studio-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.065em;
}
.hero-footnote {
  color: var(--muted);
}
.hero-showcase::before,
.hero-showcase::after {
  position: absolute;
  z-index: 1;
  width: 21px;
  height: 21px;
  content: '';
  border: solid var(--primary);
  pointer-events: none;
}
.hero-showcase::before {
  inset: 1px auto auto 0;
  border-width: 1px 0 0 1px;
}
.hero-showcase::after {
  inset: auto 0 15px auto;
  border-width: 0 1px 1px 0;
}
.hero-showcase > img,
.mini-browser {
  border-radius: 8px;
  border: 1px solid var(--border);
}
.mini-browser {
  background: #191511;
  box-shadow: 0 26px 60px #0c08053b;
}
.mini-browser-bar {
  background: #211a15;
  border-color: #4a3b30;
}
.mini-browser-bar span,
.mini-nav span {
  color: #c4b3a1;
}
.mini-browser-bar i {
  background: #856c58;
}
.mini-browser-bar i:first-child {
  background: #f08143;
}
.mini-site {
  color: #f5efe5;
  background: radial-gradient(ellipse at 75% 45%, #46291a, transparent 65%), #1b1511;
}
.mini-hero > span:first-child {
  color: #ffa571;
}
.mini-hero h2 {
  color: #f5efe5;
  font-style: italic;
}
.mini-hero p {
  color: #c6b4a5;
}
.mini-cta {
  color: #201208;
  background: #f08143;
}
.mini-grid > div {
  background: #f5efe50b;
  border: 1px solid #f5efe52a;
  color: #d3c2b1;
}
:is(.floating-card, .floating-colors, .auth-card, .public-site .template-card, .subscription-card) {
  border-radius: 9px;
}
.floating-colors > span {
  color: var(--muted);
}
.floating-colors i {
  background: #f08143;
}
.floating-colors i:nth-last-child(2) {
  background: #e9d5bf;
}
.floating-colors i:last-child {
  background: #473024;
}
.public-site :is(.how-section, .subscriptions-section) {
  background: var(--panel);
  border-color: var(--border);
}
.public-site .step-grid article {
  border-top: 1px solid var(--border);
  padding-top: 20px;
}
:is(.step-number, .auth-icon, .subscription-mark, .subscription-featured .subscription-mark) {
  color: var(--primary);
  background: var(--soft-accent);
  border-radius: 6px;
}
.subscription-featured,
:root[data-theme='dark'] .subscription-featured {
  background: linear-gradient(150deg, var(--soft-accent), var(--panel) 70%);
  border-color: var(--primary);
}
.billing-selector button[aria-pressed='true'] {
  color: var(--action-ink);
}
.public-site .template-card {
  transition:
    border-color 250ms,
    box-shadow 250ms;
}
.public-site .template-card:is(:hover, :focus-visible) {
  border-color: var(--primary);
}
.public-site .template-card:is(:hover, :focus-visible) .template-caption .icon {
  color: var(--primary);
}
.promo-visual img[src='/subscription-plans-v2.png'] {
  filter: sepia(0.75) saturate(0.8);
}
.auth-page,
:root[data-theme='dark'] .auth-page {
  background:
    radial-gradient(ellipse at 12% 33%, var(--soft-accent), transparent 55%), var(--surface);
}
.auth-intro h1 {
  letter-spacing: -0.07em;
}
.operator-customer-actions {
  align-items: center;
}

/* Az operátori felületen az aktív állapotot és a fókuszt jelzi a narancs. */
.admin-sidebar {
  --primary: #f08143;
  --brand-accent: var(--primary);
  background: #171310;
  color: #f5efe5;
  border-right: 1px solid #3c3229;
}
.admin-sidebar :where(.sidebar-caption, .sidebar-user small, .sidebar-user .icon-btn) {
  color: #c0b3a6;
}
.admin-sidebar nav a {
  color: #c0b3a6;
  border: 1px solid transparent;
  border-radius: 5px;
  transition:
    background-color 180ms,
    border-color 180ms,
    color 180ms;
}
.admin-sidebar nav a:hover {
  background: #292119;
}
.admin-sidebar nav a.active {
  color: #ffa571;
  background: #332117;
  border-color: #5e3724;
  box-shadow: inset 2px 0 #f08143;
}
.admin-sidebar .avatar {
  background: #332117;
  color: #ffa571;
}
.admin-app :is(.admin-topbar, .metric, .search-field, .inquiry-row) {
  background: var(--panel);
  color: var(--ink);
}
.admin-topbar > span {
  color: var(--muted);
}
.admin-app :is(.primary-metric, .inquiry-row.selected, .inquiry-message) {
  background: var(--soft-accent);
}
.primary-metric {
  border-color: var(--primary);
}
.admin-content :is(.metric, .card) {
  border-radius: 9px;
}
.admin-content .page-title {
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}
.chart-bar {
  background: color-mix(in srgb, var(--primary), var(--panel) 30%);
}
.admin-content .inquiry-row:hover {
  border-color: var(--primary);
}
:is(.admin-app, .editor-workspace) :is(.badge.blue, .design-element-list button.active) {
  background: var(--soft-accent);
  border-color: var(--border);
  color: var(--primary);
}
.admin-content :is(.template-admin-card, .template-tier-counts > div),
.editor-workspace :is(.design-template-card, .design-element-list button) {
  background: var(--panel);
  border-color: var(--border);
  color: var(--ink);
}

@media (prefers-reduced-motion: no-preference) {
  .public-header-bar::after {
    position: absolute;
    inset: auto 0 0;
    height: 2px;
    content: '';
    pointer-events: none;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    transform: scaleX(var(--page-scroll, 0));
    transform-origin: left;
  }
  .hero-copy > *,
  .hero-showcase,
  .auth-intro,
  .auth-card {
    animation: studio-rise 650ms var(--studio-ease) backwards;
  }
  .public-site .studio-revealed {
    animation: studio-scroll-enter 820ms var(--studio-ease) var(--reveal-delay, 0ms) backwards;
  }
  .public-site .studio-revealed:focus-within {
    animation: none;
  }
  .public-site :is(.step-grid, .template-grid, .subscription-grid) > :nth-child(2) {
    --reveal-delay: 70ms;
  }
  .public-site :is(.step-grid, .template-grid, .subscription-grid) > :nth-child(3) {
    --reveal-delay: 140ms;
  }
  .public-site .subscription-grid > :nth-child(4) {
    --reveal-delay: 210ms;
  }
  .public-site .template-grid > .template-card {
    --reveal-y: 54px;
    --reveal-scale: 0.93;
  }
  .public-site .subscription-grid > .subscription-card.studio-revealed {
    animation-name: studio-plan-enter;
  }
  .public-site .subscription-card.studio-revealed .subscription-mark {
    animation: studio-rise 650ms var(--studio-ease) var(--reveal-delay, 0ms) backwards;
  }
  .landing-hero::before {
    opacity: calc(0.72 + var(--hero-scroll, 0) * 0.28);
  }
  .hero-showcase {
    --hero-travel: 66px;
    --hero-shrink: 0.095;
    translate: 0 calc(var(--hero-scroll, 0) * var(--hero-travel));
    scale: calc(1 - var(--hero-scroll, 0) * var(--hero-shrink));
  }
  .hero-showcase > :is(.mini-browser, img) {
    rotate: y calc(var(--hero-scroll, 0) * -9deg);
  }
  .hero-showcase .floating-card {
    translate: 0 calc(var(--hero-scroll, 0) * -40px);
  }
  .hero-showcase .floating-colors {
    translate: 0 calc(var(--hero-scroll, 0) * 32px);
  }
  .admin-content > .page-title {
    animation: studio-rise 300ms var(--studio-ease) backwards;
  }
  .hero-copy h1 {
    animation-delay: 90ms;
  }
  .hero-copy > p {
    animation-delay: 165ms;
  }
  .hero-copy :is(.button-row, .hero-footnote) {
    animation-delay: 230ms;
  }
  .hero-showcase,
  .auth-card {
    animation-delay: 100ms;
  }
  .mini-browser,
  .hero-showcase > img,
  .public-site .template-preview img {
    transition: transform 650ms var(--studio-ease);
  }
  .hero-showcase:hover .mini-browser {
    transform: rotate(-1deg) scale(1.025);
  }
  .hero-showcase:hover > img {
    transform: scale(1.025);
  }
  .public-site .template-card:is(:hover, :focus-visible) .template-preview img {
    transform: scale(1.1);
  }
}
@media (prefers-reduced-motion: no-preference) and (min-width: 901px) {
  .public-site .template-grid > .template-card:first-child {
    --reveal-x: -22px;
    --reveal-rotate: -3deg;
  }
  .public-site .template-grid > .template-card:last-child {
    --reveal-x: 22px;
    --reveal-rotate: 3deg;
  }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 600px) {
  .hero-showcase {
    --hero-travel: 32px;
    --hero-shrink: 0.045;
  }
  .hero-showcase > :is(.mini-browser, img) {
    rotate: none;
  }
}
@keyframes studio-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes studio-scroll-enter {
  from {
    opacity: 0.3;
    transform: translate(var(--reveal-x, 0px), var(--reveal-y, 34px))
      rotate(var(--reveal-rotate, 0deg)) scale(var(--reveal-scale, 1));
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes studio-plan-enter {
  from {
    opacity: 0.3;
  }
  to {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  :is(.public-site, .admin-app, .auth-page) *,
  :is(.public-site, .admin-app, .auth-page) *::after {
    transition-duration: 0s !important;
  }
}

@media (max-width: 600px) {
  .public-header-bar .public-header {
    padding-block: 13px;
  }
}

@media (max-width: 1100px) and (min-width: 901px) {
  .public-header {
    gap: 16px;
  }
  .public-header .brand-logo {
    width: 145px;
  }
  .public-header nav {
    gap: 15px;
  }
}
@media (max-width: 600px) {
  .theme-toggle-label {
    display: none;
  }
  .theme-toggle {
    width: 44px;
    padding: 10px;
    flex-shrink: 0;
  }
  .public-header-actions,
  .auth-header-actions {
    gap: 8px;
  }
  .public-header .brand-logo {
    width: 132px;
  }
  .auth-top {
    gap: 16px;
    flex-wrap: wrap;
  }
  .auth-top .brand-logo {
    width: 132px;
  }
  .workspace-header {
    flex-wrap: wrap;
    gap: 12px;
  }
}
@media (max-width: 360px) {
  .public-header .brand-logo {
    width: 108px;
  }
}
