/*
 * Zysnor section themes.
 * theme-tools    : bright "workbench" look for the free browser tools.
 * theme-software : dark "blueprint" look for CAD, BIM and Windows software.
 * theme-home     : neutral gateway that introduces both sections.
 * Brand colours come from the logo: cyan stroke (#22c7e3) and amber corners (#f5b524).
 */

/* ---------- Shared brand tokens ---------- */
:root {
  --brand-cyan: #22c7e3;
  --brand-amber: #f5b524;
  --brand-navy: #0b1626;
}
.product-header .brand img { width: 172px; height: auto; }

/* =========================================================
   TOOLS — bright workbench
   ========================================================= */
body.theme-tools, body.theme-home {
  --bg: #fbfaf6;
  --panel: #ffffff;
  --line: #e6e2d6;
  --ink: #111c33;
  --muted: #4f5a70;
  --cyan: #0a6f82;
  --gold: #8a5300;
  color-scheme: light;
  background:
    radial-gradient(circle at 1px 1px, #e9e4d6 1px, transparent 1.4px) 0 0 / 22px 22px,
    var(--bg);
  color: var(--ink);
}
.theme-tools .product-header, .theme-home .product-header {
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.theme-tools .product-nav a, .theme-home .product-nav a { color: var(--ink); }
.theme-tools .product-nav a:hover, .theme-home .product-nav a:hover { background: #fff4d6; }
.theme-tools .product-nav a[aria-current], .theme-tools .product-nav a[data-active],
.theme-home .product-nav a[aria-current] {
  background: #fff1c9; color: #111c33; box-shadow: inset 0 -3px var(--brand-amber);
}
.theme-tools .cta, .theme-home .cta {
  background: var(--brand-amber); color: #1a1200; border-radius: 10px;
  box-shadow: 0 2px 0 #c98f08;
}
.theme-tools .cta:hover, .theme-home .cta:hover { background: #ffc94a; }
.theme-tools .cta:disabled { background: #e7d6a8; color: #4a3d1a; box-shadow: none; }
.theme-tools .label, .theme-home .label { color: var(--cyan); }
.theme-tools .card, .theme-home .card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 1px 0 #ece7da, 0 10px 24px -18px #1b2a4a40;
}
.theme-tools .card:hover { border-color: #f0cf7a; }
.theme-tools main a:not(.cta):not(.secondary-action), .theme-home main a:not(.cta):not(.secondary-action) { color: var(--cyan); }
.theme-tools :focus-visible, .theme-home :focus-visible { outline-color: var(--cyan); }
.theme-tools .secondary-action, .theme-home .secondary-action { border-color: #c9c3b2; color: var(--ink); background: #fff; }
.theme-tools .secondary-action:hover, .theme-home .secondary-action:hover { background: #fff4d6; }
.theme-tools .utility-form, .theme-tools .tool-workspace, .theme-tools .utility-help {
  border-radius: 14px;
}
.theme-tools .utility-help, .theme-tools aside.prose {
  background: #f3fbfc; border-color: #cfe9ee;
}
.theme-tools input, .theme-tools select, .theme-tools textarea {
  border-radius: 9px; border-color: #d7d1c1; background: #fff;
}
.theme-tools input:focus, .theme-tools select:focus, .theme-tools textarea:focus {
  outline: 2px solid var(--brand-cyan); outline-offset: 1px;
}
.theme-tools .product-footer, .theme-home .product-footer { background: #111c33; }
.theme-tools .product-footer .footer-bottom, .theme-home .product-footer .footer-bottom { border-color: #2c3a58; color: #b9c3d8; }
.theme-tools .product-footer a, .theme-home .product-footer a { color: #e8edf7; }
.theme-tools .product-footer .footer-tagline, .theme-home .product-footer .footer-tagline { color: #b9c3d8; }
.theme-tools .product-footer :focus-visible { outline-color: var(--brand-amber); }

/* =========================================================
   SOFTWARE — dark blueprint
   ========================================================= */
body.theme-software {
  --bg: #0b1626;
  --panel: #101f35;
  --line: #233a57;
  --ink: #e9f1f9;
  --muted: #a7b8cc;
  --cyan: #5fd8ec;
  --gold: #f5b524;
  color-scheme: dark;
  color: var(--ink);
  background:
    linear-gradient(#ffffff08 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, #ffffff08 1px, transparent 1px) 0 0 / 40px 40px,
    radial-gradient(ellipse at 85% -10%, #12365a 0%, transparent 55%),
    var(--bg);
}
.theme-software h1, .theme-software h2, .theme-software h3, .theme-software strong, .theme-software dt { color: #f4f8fc; }
.theme-software p, .theme-software li, .theme-software dd, .theme-software .lead { color: var(--muted); }
.theme-software .product-header { background: rgba(8, 17, 30, .92); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.theme-software .product-nav a { color: #dce7f2; }
.theme-software .product-nav a:hover { background: #15283f; }
.theme-software .product-nav a[aria-current] { background: #13304a; color: #fff; box-shadow: inset 0 -3px var(--brand-cyan); }
.theme-software .language-picker label { color: #c4d2e1; }
.theme-software .language-picker select { background: #0f1e33; color: #e9f1f9; border-color: #2c4767; }
.theme-software .label {
  color: var(--brand-amber); font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  letter-spacing: .14em;
}
.theme-software .cta {
  background: var(--brand-cyan); color: #04121f; border-radius: 6px; box-shadow: 0 0 0 1px #7be6f5 inset;
}
.theme-software .cta:hover { background: #7be6f5; }
.theme-software .secondary-action { border-color: #33557a; color: #e9f1f9; background: transparent; }
.theme-software .secondary-action:hover { background: #15283f; }
.theme-software main a:not(.cta):not(.secondary-action) { color: var(--cyan); }
.theme-software .card, .theme-software details, .theme-software .software-card {
  background: linear-gradient(180deg, #12233b, #0f1d31); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 18px 40px -28px #000;
}
.theme-software .card:hover { border-color: #3a6189; }
.theme-software .status-pill, .theme-software .product-status, .theme-software [class*="status"] {
  border-color: #6b5413;
}
.theme-software input, .theme-software select, .theme-software textarea {
  background: #0d1a2c; color: var(--ink); border-color: #2c4767; border-radius: 6px;
}
.theme-software :focus-visible { outline-color: var(--brand-cyan); }
.theme-software hr, .theme-software .section { border-color: var(--line); }
.theme-software .product-footer { background: #060e1a; border-top: 1px solid var(--line); }
.theme-software .product-footer .footer-bottom { border-color: #1d3049; color: #8fa3ba; }
.theme-software .product-footer .footer-tagline { color: #8fa3ba; }
.theme-software .product-footer a { color: #d9e5f1; }
.theme-software .chat-toggle { background: var(--brand-cyan); color: #04121f; }
.theme-software .assistant { background: #0f1e33; color: var(--ink); border-color: var(--line); }

/* =========================================================
   HOME — gateway split between Tools and Software
   ========================================================= */
.gateway { padding-block: clamp(2rem, 5vw, 4rem) clamp(2.5rem, 6vw, 4.5rem); }
.gateway-intro { max-width: 52rem; margin-bottom: clamp(1.5rem, 4vw, 2.75rem); }
.gateway-intro h1 { font-size: clamp(2.3rem, 5.4vw, 4.2rem); line-height: 1.03; letter-spacing: -.04em; margin: .2rem 0 .9rem; max-width: 18ch; }
.gateway-intro .lead { max-width: 46ch; }
.gateway-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1rem, 2.4vw, 1.6rem); }
.gateway-panel {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: .9rem;
  border-radius: 20px; padding: clamp(1.4rem, 3.4vw, 2.4rem); min-height: 25rem;
}
.gateway-panel h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); letter-spacing: -.03em; margin: 0; }
.gateway-panel p { margin: 0; }
.gateway-panel ul { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .5rem; }
.gateway-panel li { display: flex; gap: .6rem; align-items: baseline; }
.gateway-panel li::before { content: ""; flex: none; width: .55rem; height: .55rem; border-radius: 2px; background: var(--brand-amber); transform: translateY(-.05rem); }
.gateway-panel .gateway-actions { margin-top: auto; padding-top: .8rem; display: flex; flex-wrap: wrap; gap: .6rem; }
.gateway-panel .cta { margin: 0; }
.gateway-kicker { font: 700 .76rem/1.2 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .16em; text-transform: uppercase; }
.gateway-tools { background: #fff; border: 1px solid var(--line); box-shadow: 0 24px 50px -38px #1b2a4a80; }
.gateway-tools .gateway-kicker { color: #0a6f82; }
.gateway-tools p, .gateway-tools li { color: #4f5a70; }
.gateway-tools .chip-row { display: flex; flex-wrap: wrap; gap: .45rem; }
.gateway-tools .chip-row a {
  border: 1px solid #e3dccb; border-radius: 999px; padding: .38rem .8rem; background: #fffaf0;
  color: #111c33 !important; text-decoration: none; font-weight: 650; font-size: .92rem; min-height: 0;
}
.gateway-tools .chip-row a:hover { background: #fff1c9; border-color: #f0cf7a; }
.gateway-software {
  color: #e9f1f9;
  background:
    linear-gradient(#ffffff0b 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, #ffffff0b 1px, transparent 1px) 0 0 / 28px 28px,
    radial-gradient(ellipse at 100% 0%, #15406a 0%, transparent 60%),
    #0b1626;
  border: 1px solid #233a57;
}
.gateway-software h2 { color: #f4f8fc; }
.gateway-software .gateway-kicker { color: var(--brand-amber); }
.gateway-software p, .gateway-software li { color: #a7b8cc; }
.gateway-software li::before { background: var(--brand-cyan); }
.gateway-software .cta { background: var(--brand-cyan); color: #04121f; box-shadow: none; }
.gateway-software .cta:hover { background: #7be6f5; }
.gateway-software .secondary-action { background: transparent; color: #e9f1f9; border-color: #33557a; }
.gateway-software .secondary-action:hover { background: #15283f; }
.gateway-trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: clamp(1.5rem, 4vw, 2.5rem); }
.gateway-trust div { border-top: 2px solid var(--brand-amber); padding-top: .7rem; }
.gateway-trust strong { display: block; color: var(--ink); }
.gateway-trust span { color: var(--muted); font-size: .95rem; }
@media (max-width: 820px) {
  .gateway-split, .gateway-trust { grid-template-columns: 1fr; }
  .gateway-panel { min-height: 0; }
}

/* =========================================================
   ABOUT — software section
   ========================================================= */
.about2 { padding-bottom: 2.5rem; }
.about2-hero {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(240px, .8fr); gap: clamp(1.5rem, 5vw, 4.5rem);
  align-items: center; padding-block: clamp(2.2rem, 6vw, 4.5rem) clamp(1.5rem, 4vw, 2.5rem);
}
.about2-hero h1 { font-size: clamp(2.3rem, 5vw, 4.1rem); line-height: 1.04; letter-spacing: -.04em; max-width: 17ch; margin: .35rem 0 1rem; }
.about2-hero .lead { max-width: 52ch; font-size: 1.12rem; }
.about2-portrait { margin: 0; justify-self: end; max-width: 330px; width: 100%; }
.about2-portrait .frame {
  position: relative; border-radius: 14px; overflow: hidden; border: 1px solid #2c4767;
  box-shadow: 0 30px 60px -35px #000, 0 0 0 6px #0f1e33;
}
.about2-portrait img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.about2-portrait figcaption { margin-top: .9rem; display: grid; gap: .1rem; }
.about2-portrait figcaption strong { font-size: 1.05rem; }
.about2-portrait figcaption span { color: var(--muted); font-size: .92rem; }
.about2-facts {
  display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 12px;
  background: #0e1c30; margin: 0 0 clamp(2rem, 5vw, 3.2rem);
}
.about2-facts div { padding: 1.1rem 1.25rem; border-inline-start: 1px solid var(--line); }
.about2-facts div:first-child { border-inline-start: 0; }
.about2-facts strong { display: block; font-size: clamp(1.35rem, 2.6vw, 1.9rem); letter-spacing: -.02em; color: #fff; }
.about2-facts span { color: var(--muted); font-size: .92rem; }
.about2-row {
  display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.4fr); gap: clamp(1.2rem, 5vw, 4rem);
  padding-block: clamp(1.6rem, 4vw, 2.6rem); border-top: 1px solid var(--line); scroll-margin-top: 90px;
}
.about2-row h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -.03em; margin: .3rem 0 0; }
.about2-row p + p { margin-top: .8rem; }
.about2-row .cta { margin-top: 1.2rem; }
.about2-career { list-style: none; margin: 1.2rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.about2-career li {
  border: 1px solid #2c4767; border-radius: 6px; padding: .3rem .65rem; font-size: .88rem; color: #cfe0ee;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
}
.about2-principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: .2rem; }
.about2-principles article { padding: 1.2rem; border: 1px solid var(--line); border-radius: 10px; background: #0f1e33; }
.about2-principles .num { font: 700 .8rem ui-monospace, "Cascadia Mono", Consolas, monospace; color: var(--brand-amber); letter-spacing: .1em; }
.about2-principles h3 { font-size: 1.12rem; margin: .45rem 0 .35rem; }
.about2-products { display: grid; gap: .75rem; }
.about2-products a.product-line {
  display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center;
  padding: 1rem 1.15rem; border: 1px solid var(--line); border-radius: 10px; background: #0f1e33;
  text-decoration: none; color: inherit !important; min-height: 0;
}
.about2-products a.product-line:hover { border-color: #3a6189; background: #12243c; }
.about2-products .platform { font: 700 .74rem ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .1em; color: var(--brand-cyan); text-transform: uppercase; min-width: 6.5rem; }
.about2-products strong { display: block; font-size: 1.05rem; }
.about2-products span.desc { display: block; color: var(--muted); font-size: .94rem; margin-top: .15rem; }
.about2-products .state { font-size: .8rem; font-weight: 700; color: #f5d27a; border: 1px solid #6b5413; border-radius: 999px; padding: .2rem .6rem; white-space: nowrap; }
.about2-name {
  display: flex; gap: 1rem; align-items: center; margin-top: 1.2rem; padding: 1rem 1.15rem;
  border: 1px dashed #3a5675; border-radius: 10px;
}
.about2-name .squares { display: grid; grid-template-columns: repeat(2, 12px); gap: 5px; flex: none; }
.about2-name .squares i { width: 12px; height: 12px; border-radius: 2px; background: var(--brand-amber); }
.about2-cta {
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between;
  margin-top: clamp(1.5rem, 4vw, 2.5rem); padding: clamp(1.2rem, 3vw, 1.8rem);
  border: 1px solid #2c4767; border-radius: 12px; background: linear-gradient(120deg, #12304d, #0f1e33);
}
.about2-cta h2 { font-size: clamp(1.35rem, 2.6vw, 1.8rem); margin: 0 0 .3rem; }
.about2-cta p { margin: 0; }
.about2-cta .actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.about2-cta .cta { margin: 0; }
@media (max-width: 820px) {
  .about2-hero, .about2-row { grid-template-columns: 1fr; }
  .about2-portrait { justify-self: start; max-width: 260px; }
  .about2-facts { grid-template-columns: repeat(2, 1fr); }
  .about2-facts div:nth-child(3) { border-inline-start: 0; }
  .about2-facts div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .about2-principles { grid-template-columns: 1fr; }
  .about2-products a.product-line { grid-template-columns: 1fr; gap: .35rem; }
  .about2-products .state { justify-self: start; }
}

/* ---------- Tools: replace leftover green accents ---------- */
.theme-tools .guide-number, .theme-tools .guide-action { background: var(--brand-amber); color: #1a1200; }
.theme-tools .guide-window { background: #f3f6fb; border-color: #e1e6ef; }
.theme-tools .guide-window span { background: var(--brand-cyan); }
.theme-tools .guide-result, .theme-tools .art-calendar-grid i { background: #e6f7fa; color: #0a4f5c; }
.theme-tools input[type=file]::file-selector-button { background: #fff1c9; color: #1a1200; border: 1px solid #f0cf7a; }
.theme-tools .resize-drop.is-dragging { border-color: var(--brand-cyan); background: #e6f7fa; }
.theme-tools .study-output, .theme-tools .utility-status:not(:empty) { background: #f3fbfc; border: 1px solid #cfe9ee; }
.theme-tools .tool-feedback { border: 1px solid var(--line); background: #fff; color: var(--ink); }
.theme-tools .catalog-group .tool-card-open:hover, .theme-tools .tool-menu[open] summary,
.theme-tools .tool-menu summary:hover, .theme-tools .tool-menu-panel a:hover { background: #fff1c9; color: var(--ink); }
.theme-tools .tool-card .icon { background: #e6f7fa; color: #0a4f5c; }
.theme-tools .shortcut-links a { border-color: #e3dccb; color: var(--ink); }
.theme-tools .chat-toggle { background: var(--brand-amber); color: #1a1200; }

/* ---------- Software: leftover light surfaces ---------- */
.theme-software .guide-window, .theme-software .study-output { background: #0f1e33; border-color: var(--line); color: var(--ink); }
.theme-software input[type=file]::file-selector-button { background: #13304a; color: #e9f1f9; }
.theme-software summary { color: var(--ink); }
