/* TekkSet Backoffice — tekkset.com
   Palette: ink on warm paper with a lime highlight; amber for secondary notes. */

:root {
  --paper: #F4F5F0;
  --card: #FFFFFF;
  --ink: #141414;
  --muted: #5C6058;
  --rule: #D9DCD2;
  --accent: #141414;
  --accent-tint: #EDF3D3;
  --lime: #C6F135;
  --lime-soft: #E4F5A8;
  --on-lime: #141414;
  --amber: #8A5A0B;
  --amber-tint: #F5EBD8;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --gutter: clamp(1rem, 4vw, 4rem);
  --measure: 64ch;
  --radius: 10px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0E0F0C;
    --card: #171914;
    --ink: #ECEEE6;
    --muted: #A0A596;
    --rule: #272A22;
    --accent: #C6F135;
    --accent-tint: #181D0A;
    --lime-soft: #2A3410;
    --amber: #D9A94F;
    --amber-tint: #2A2114;
  }
}
:root[data-theme="dark"] {
  --paper: #0E0F0C;
  --card: #171914;
  --ink: #ECEEE6;
  --muted: #A0A596;
  --rule: #272A22;
  --accent: #C6F135;
  --accent-tint: #181D0A;
  --lime-soft: #2A3410;
  --amber: #D9A94F;
  --amber-tint: #2A2114;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-color: var(--lime); text-decoration-thickness: 2px; text-underline-offset: 4px; transition: text-decoration-color .15s; }
a:hover { text-decoration-color: currentColor; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.05rem; font-family: var(--sans); font-weight: 600; }
p { margin: 0 0 1em; }
p.lede { font-size: 1.25rem; color: var(--muted); max-width: var(--measure); }
small, .small { font-size: .9rem; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: .9em; }
.wrap { width: min(1120px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.measure { max-width: var(--measure); }
.kicker {
  font-family: var(--sans); font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink); margin-bottom: .75rem; display: flex; align-items: center; gap: .55rem;
}
.kicker::before { content: ""; width: .6rem; height: .6rem; border-radius: 2px; background: var(--lime); box-shadow: 0 0 0 1px var(--ink); flex: none; }
.cta .kicker { justify-content: center; }

/* Lime marker behind a phrase; draws in from the left. */
.hl { background: linear-gradient(var(--lime), var(--lime)) no-repeat 0 88% / 100% .42em; padding-inline: .08em; margin-inline: -.08em; color: inherit; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hl { background-size: 100% .12em; background-position: 0 100%; } }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; font-family: var(--serif); font-size: 1.25rem; letter-spacing: -0.01em; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand span { color: var(--muted); font-family: var(--sans); font-size: .95rem; margin-left: -.1rem; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 1.4rem; }
.site-nav a { color: var(--ink); text-decoration: none; font-size: .97rem; }
.site-nav a:not(.btn) { padding-block: .2rem; background: linear-gradient(var(--lime), var(--lime)) no-repeat 0 100% / 0 3px; transition: background-size .2s ease; }
.site-nav a:not(.btn):hover, .site-nav a:not(.btn)[aria-current="page"] { background-size: 100% 3px; }
.site-nav a[aria-current="page"] { font-weight: 600; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--rule); border-radius: 8px; color: var(--ink); padding: .45rem .8rem; font: inherit; font-size: .95rem; }

/* Buttons */
.btn { display: inline-block; padding: .7rem 1.2rem; border-radius: 8px; background: var(--lime); color: var(--on-lime); text-decoration: none; font-weight: 600; font-size: .97rem; border: 1.5px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); cursor: pointer; font-family: var(--sans); transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease; }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); text-decoration: none; }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: none; }
.btn.ghost:hover { background: var(--lime); color: var(--on-lime); box-shadow: 3px 3px 0 var(--ink); }
.site-nav .btn, .site-nav .btn[aria-current="page"] { padding: .5rem 1rem; color: var(--on-lime); }

/* Sections */
section { padding-block: clamp(3rem, 7vw, 6rem); }
section + section { border-top: 1px solid var(--rule); }
section.tint { background: var(--accent-tint); }
section.dark { background: #141414; color: #ECEEE6; }
section.dark .muted { color: #B4B8AC; }
section.dark h2, section.dark h3 { color: #ECEEE6; }
section.dark .kicker { color: var(--lime); }
section.dark .kicker::before { box-shadow: none; }
section.dark a { color: var(--lime); }
.section-head { max-width: 46rem; margin-bottom: 2.5rem; }

/* Hero */
.hero { padding-block: clamp(3.5rem, 9vw, 7rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero .actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.75rem; }
.hero .tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.hero .shot { box-shadow: 14px 14px 0 var(--lime), 0 20px 50px -30px rgba(16, 20, 24, .45); border-color: var(--ink); }
.hero .kicker::before { border-radius: 50%; animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 1px var(--ink), 0 0 0 0 rgba(198, 241, 53, .9); } 70%, 100% { box-shadow: 0 0 0 1px var(--ink), 0 0 0 .7rem rgba(198, 241, 53, 0); } }

/* Ticker band under the home hero */
.ticker { background: var(--lime); color: var(--on-lime); border-block: 1.5px solid #141414; overflow: hidden; padding-block: .7rem; font-weight: 600; font-size: .95rem; letter-spacing: .04em; text-transform: uppercase; }
.ticker .track { display: flex; width: max-content; animation: ticker 40s linear infinite; }
.ticker:hover .track { animation-play-state: paused; }
.ticker span { white-space: nowrap; padding-inline: 1.1rem; }
.ticker span::after { content: "◆"; font-size: .6em; margin-left: 2.2rem; vertical-align: middle; }
@keyframes ticker { to { transform: translateX(-50%); } }
.tag { font-size: .82rem; padding: .3rem .7rem; border-radius: 999px; background: var(--lime-soft); color: var(--ink); font-weight: 600; }

/* Screenshots */
.shot { margin: 0; border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; background: var(--card); box-shadow: 0 20px 50px -30px rgba(16, 20, 24, .45); }
.shot img { width: 100%; }
.shot figcaption { font-size: .85rem; color: var(--muted); padding: .6rem .9rem; border-top: 1px solid var(--rule); }

/* Grids and cards */
.grid { display: grid; gap: 1.25rem; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.4rem 1.5rem; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.card:hover { transform: translate(-2px, -3px); border-color: var(--ink); box-shadow: 5px 5px 0 var(--lime); }
.card h3 { font-size: 1.15rem; margin-bottom: .4rem; }
.card p:last-child { margin-bottom: 0; }
.card .num { display: inline-block; font-family: var(--mono); background: var(--lime); color: var(--on-lime); font-size: .8rem; padding: .1rem .5rem; border-radius: 4px; margin-bottom: .6rem; }
section.dark .card { background: #1D1F1A; border-color: #2C2F27; }
section.dark .card:hover { border-color: var(--lime); }

/* Split layouts */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split.reverse > :first-child { order: 2; }

/* Feature list */
.features { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.features li { padding-left: 1.6rem; position: relative; }
.features li::before { content: ""; position: absolute; left: 0; top: .55em; width: .8rem; height: .8rem; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 1px var(--ink); }
.features strong { font-weight: 600; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1rem; counter-reset: step; }
.steps > div { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1rem 1.1rem; }
.steps .num { display: inline-block; font-family: var(--mono); background: var(--lime); color: var(--on-lime); font-size: .78rem; padding: .05rem .45rem; border-radius: 4px; }
.steps h4 { margin: .25rem 0 .35rem; }
.steps p { margin: 0; font-size: .92rem; color: var(--muted); }

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-weight: 600; font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.table-wrap { overflow-x: auto; }

/* Timeline (change management) */
.timeline { display: grid; gap: 0; }
.timeline > div { display: grid; grid-template-columns: 5rem 7rem minmax(0, 1fr); gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--rule); font-size: .95rem; }
.timeline .who { font-weight: 600; }
.timeline .dev .who { color: var(--accent); }

/* Chat mock */
.chat { display: grid; gap: .8rem; }
.chat .msg { max-width: 92%; padding: .8rem 1rem; border-radius: 12px; background: var(--card); border: 1px solid var(--rule); font-size: .95rem; }
.chat .msg.user { margin-left: auto; background: var(--card); border-color: var(--ink); }
.chat .msg.ai { background: var(--lime-soft); border-color: transparent; }
.chat .label { display: block; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .3rem; }
.chat .options { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.chat .options span { border: 1px solid var(--accent); color: var(--accent); border-radius: 999px; padding: .2rem .7rem; font-size: .82rem; }

/* Architecture diagram */
.arch { display: grid; gap: .6rem; font-size: .93rem; }
.arch .zone { border: 1px dashed var(--rule); border-radius: var(--radius); padding: .9rem 1rem; }
.arch .zone h4 { margin: 0 0 .6rem; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.arch .boxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: .6rem; }
.arch .box { background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: .7rem .9rem; }
.arch .box strong { display: block; }
.arch .box span { color: var(--muted); font-size: .88rem; }
.arch .flow { text-align: center; color: var(--muted); font-size: .85rem; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1rem; }
.stats div { border-left: 4px solid var(--lime); padding: .2rem 0 .2rem 1rem; }
.stats b { display: block; font-family: var(--serif); font-size: 2rem; font-weight: 500; line-height: 1.1; }
.stats span { color: var(--muted); font-size: .92rem; }

/* CTA band */
.cta { text-align: center; }
.cta .actions { display: flex; justify-content: center; flex-wrap: wrap; gap: .8rem; margin-top: 1.5rem; }

/* Forms */
form.contact { display: grid; gap: 1rem; max-width: 40rem; }
form.contact .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
label { display: grid; gap: .35rem; font-size: .92rem; font-weight: 600; }
input, textarea, select { font: inherit; padding: .65rem .8rem; border: 1px solid var(--rule); border-radius: 8px; background: var(--card); color: var(--ink); width: 100%; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
textarea { min-height: 9rem; resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { border-radius: 8px; padding: .9rem 1.1rem; margin-bottom: 1.25rem; border: 1px solid var(--rule); background: var(--card); }
.notice.ok { background: var(--accent-tint); border-color: transparent; }
.notice.err { background: var(--amber-tint); border-color: transparent; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); padding: 2.5rem 0 3rem; font-size: .9rem; color: var(--muted); }
.site-footer .wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 2rem; }
.site-footer h4 { color: var(--ink); margin-bottom: .6rem; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.site-footer a { color: inherit; }
.site-footer .legal { grid-column: 1 / -1; border-top: 1px solid var(--rule); padding-top: 1.2rem; margin-top: .5rem; font-size: .82rem; }

/* Responsive */
@media (max-width: 900px) {
  .hero-grid, .split, .split.reverse { grid-template-columns: 1fr; }
  .split.reverse > :first-child { order: 0; }
  .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .site-footer .wrap { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .timeline > div { grid-template-columns: 4rem minmax(0, 1fr); }
  .timeline > div .what { grid-column: 1 / -1; }
  form.contact .row { grid-template-columns: 1fr; }
  .site-footer .wrap { grid-template-columns: 1fr; }
  .nav-toggle { display: inline-block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 64px; background: var(--paper); border-bottom: 1px solid var(--rule); flex-direction: column; align-items: flex-start; padding: 1rem var(--gutter) 1.25rem; gap: 1rem; }
  .site-nav.open { display: flex; }
}
/* Motion: hero entrance, reveal on scroll. site.js adds .js and .in. */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes mark { from { background-size: 0 .42em; } }
@keyframes shadow-in { from { box-shadow: 0 0 0 var(--lime), 0 20px 50px -30px rgba(16, 20, 24, .45); } }
@media (prefers-reduced-motion: no-preference) {
  .hero-grid > div > * { animation: rise .6s ease both; }
  .hero-grid > div > :nth-child(2) { animation-delay: .08s; }
  .hero-grid > div > :nth-child(3) { animation-delay: .16s; }
  .hero-grid > div > :nth-child(4) { animation-delay: .24s; }
  .hero-grid > div > :nth-child(5) { animation-delay: .32s; }
  .hero .shot { animation: rise .7s .2s ease both, shadow-in .5s .8s ease both; }
  h1 .hl { animation: mark .7s .55s cubic-bezier(.2, .7, .2, 1) both; }
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; transition-delay: var(--d, 0s); }
  .js .reveal.in { opacity: 1; transform: none; }
  .js .reveal.in.card { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
  .js h2 .hl { background-size: 0 .42em; transition: background-size .7s .2s cubic-bezier(.2, .7, .2, 1); }
  .js .in h2 .hl, .js h2.in .hl { background-size: 100% .42em; }
}
@media (prefers-reduced-motion: reduce) {
  .ticker .track, .hero .kicker::before { animation: none; }
  .btn, .card { transition: none; }
}
@media print { .site-header, .site-footer, .nav-toggle { display: none; } }
