/* =========================================================================
   MACEDA — software studio · Delchevo
   Light + dark, both built from navy #183E70 / charcoal #2B3239.
   Type: Archivo (one family) · mark = two-tone sun.
   Plain CSS, no build step. Tokens below; dark overrides in [data-theme].
   ========================================================================= */

:root {
  color-scheme: light;

  --bg:        #ECEFF3;
  --bg-card:   #FFFFFF;
  --bg-soft:   #F5F7FA;
  --ink:       #1A2330;
  --muted:     #57637A;
  --faint:     #8B96A7;
  --line:      #D8DEE8;
  --line-2:    #E7ECF2;

  --accent:      #183E70;
  --accent-soft: #2C548C;
  --accent-tint: #E9EEF6;
  --btn:         #183E70;
  --btn-h:       #102B50;

  --band-bg:   #102B50;
  --footer-bg: #2B3239;

  --err-bg: #FCEEEC; --err-bd: #E0A99F; --err-tx: #99342A;
  --ok:     #2E9E6A;

  --logo-top: #183E70;
  --logo-bot: #2B3239;

  --display: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --maxw: 1180px;
  --r: 8px;
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
}

[data-theme="dark"] {
  color-scheme: dark;

  --bg:        #0F1621;
  --bg-card:   #161F2C;
  --bg-soft:   #131B27;
  --ink:       #E7ECF3;
  --muted:     #9AA7B9;
  --faint:     #6C7888;
  --line:      #243140;
  --line-2:    #1C2734;

  --accent:      #84A8EC;
  --accent-soft: #6E92D8;
  --accent-tint: #17233A;
  --btn:         #2D5EAA;
  --btn-h:       #356FC4;

  --band-bg:   #0C1B33;
  --footer-bg: #0A0F17;

  --err-bg: #2A1614; --err-bd: #7A3A33; --err-tx: #F0A89E;
  --ok:     #4FC58C;

  --logo-top: #84A8EC;
  --logo-bot: #9AA7B9;
}

/* ---------- base ---------- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.62;
  font-weight: 420;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  background: var(--btn); color: #fff;
  padding: 10px 16px; border-radius: var(--r);
  font-size: 14px; font-weight: 600;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 28px; }
.section { padding-block: 96px; position: relative; scroll-margin-top: 76px; }

h1, h2, h3, h4 { margin: 0; font-weight: 800; line-height: 1.05; letter-spacing: -0.022em; }
h1 { font-size: clamp(38px, 5.6vw, 64px); letter-spacing: -0.03em; }
h2 { font-size: clamp(28px, 3.6vw, 42px); }
h3 { font-size: 21px; letter-spacing: -0.01em; font-weight: 700; }

.label {
  font-weight: 700; font-size: 12.5px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 22px;
}
.label--field { margin: 26px 0 12px; }
.label__opt { font-weight: 400; text-transform: none; letter-spacing: 0.02em; color: var(--muted); }
.lead { font-size: clamp(17px, 1.5vw, 20px); color: var(--muted); line-height: 1.58; max-width: 60ch; margin: 0; }
.muted { color: var(--muted); }
p { margin: 0; }

/* the sun mark */
.mark { width: 26px; height: 26px; flex: none; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 15.5px;
  padding: 13px 24px; border-radius: var(--r);
  border: 1.5px solid transparent;
  transition: background 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease), transform 0.2s var(--ease), opacity 0.2s var(--ease);
}
.btn .arw { transition: transform 0.2s var(--ease); }
.btn:hover .arw { transform: translateX(4px); }
.btn--solid { background: var(--btn); color: #fff; }
.btn--solid:hover { background: var(--btn-h); transform: translateY(-1px); }
.btn--outline { background: transparent; color: var(--accent); border-color: var(--line); }
.btn--outline:hover { border-color: var(--accent); }
.btn--text { padding: 0; color: var(--accent); font-weight: 600; gap: 8px; }
.btn--text:hover { color: var(--accent-soft); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

/* ---------- nav ---------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), background 0.3s var(--ease);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .nav { background: var(--bg); }
}
.nav.stuck { border-bottom-color: var(--line); }
.nav__in { display: flex; align-items: center; gap: 30px; height: 76px; }

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__word {
  font-weight: 800; font-size: 16px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink);
}
.brand__accent { color: var(--accent); }

.nav__links { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.nav__link { font-weight: 550; font-size: 15.5px; color: var(--ink); position: relative; padding: 4px 0; }
.nav__link::after {
  content: ""; position: absolute; left: 0; bottom: -3px; height: 2px; width: 0;
  background: var(--accent); transition: width 0.22s var(--ease);
}
.nav__link:hover::after { width: 100%; }
.nav__btn { padding: 10px 20px; }
.nav__burger { display: none; margin-left: auto; background: none; border: 0; color: var(--ink); padding: 6px; }

/* theme toggle */
.themer {
  background: transparent; border: 1.5px solid var(--line); border-radius: 50%;
  width: 38px; height: 38px; display: inline-grid; place-items: center;
  color: var(--ink); padding: 0;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.themer:hover { border-color: var(--accent); transform: rotate(12deg); }
.themer svg { width: 18px; height: 18px; }
.themer .moon { display: none; }
[data-theme="dark"] .themer .sun { display: none; }
[data-theme="dark"] .themer .moon { display: block; }

/* ---------- hero ---------- */

.hero { padding-top: 64px; padding-bottom: 90px; position: relative; overflow: hidden; }
.hero__in { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center; }

.avail {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.02em; color: var(--muted);
  border: 1px solid var(--line); border-radius: 100px;
  padding: 6px 14px 6px 12px; margin-bottom: 26px; background: var(--bg-card);
}
.avail__dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--ok);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); }
  70%  { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
@media (prefers-reduced-motion: reduce) { .avail__dot { animation: none; } }

.hero h1 { max-width: 16ch; }
.hero h1 .nv { color: var(--accent); }
.hero__lead { margin: 24px 0 32px; max-width: 50ch; font-size: clamp(17px, 1.55vw, 19px); color: var(--muted); }
.hero__cta { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.hero__loc {
  margin-top: 38px; display: inline-flex; align-items: center; gap: 12px;
  font-size: 13.5px; letter-spacing: 0.04em; color: var(--faint);
}
.hero__loc::before { content: ""; width: 26px; height: 1px; background: var(--line); }

.hero__art { position: relative; display: flex; justify-content: center; }
.mark--hero { width: min(320px, 72%); height: auto; opacity: 0.9; }

.hero__rule { position: absolute; inset: 0; pointer-events: none; z-index: -1; }
.hero__rule span { position: absolute; top: -60px; bottom: -60px; width: 1px; background: linear-gradient(var(--line), transparent); }
.hero__rule span:nth-child(1) { left: 18%; }
.hero__rule span:nth-child(2) { left: 64%; background: linear-gradient(transparent, var(--line)); }

/* ---------- services ---------- */

.do { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 56px; align-items: start; }
.do__aside { position: sticky; top: 110px; }
.do__aside .lead { margin-top: 18px; font-size: 17px; }

.svc { border-top: 1px solid var(--line); }
.svc__row {
  display: grid; grid-template-columns: auto 1fr; gap: 28px;
  padding: 26px 8px; border-bottom: 1px solid var(--line);
  transition: background 0.2s var(--ease);
}
.svc__row:hover { background: var(--bg-card); }
.svc__no { font-weight: 800; font-size: 14px; color: var(--accent); padding-top: 4px; }
.svc__row h3 { margin-bottom: 7px; transition: color 0.2s var(--ease); }
.svc__row:hover h3 { color: var(--accent); }
.svc__row p { color: var(--muted); font-size: 16px; max-width: 54ch; }

/* ---------- navy band ---------- */

.band { background: var(--band-bg); color: #E9EEF6; }
.band .label { color: #88A6D6; }
.band h2 { color: #fff; }
.band .lead { color: #B7C6DD; }
.band__in { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: start; }
.band__logo { width: 96px; height: 96px; margin-bottom: 26px; opacity: 0.96; }

.way { display: grid; }
.way__item {
  padding: 24px 0; border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: grid; grid-template-columns: 30px 1fr; gap: 20px;
}
.way__item:first-child { border-top: 0; }
.way__n { font-weight: 800; color: #7FA3DA; font-size: 15px; }
.way__item h3 { color: #fff; margin-bottom: 6px; }
.way__item p { color: #AEBED6; font-size: 16px; }

/* ---------- work ---------- */

.work__head {
  display: flex; justify-content: space-between; align-items: end;
  gap: 24px; flex-wrap: wrap; margin-bottom: 14px;
}
.work__list { display: grid; margin-top: 28px; }
.proj { border-top: 1px solid var(--line); }
.proj:last-child { border-bottom: 1px solid var(--line); }
.proj__summary {
  display: grid; grid-template-columns: 200px 1fr auto; gap: 32px; align-items: center;
  padding: 28px 44px 28px 8px; position: relative; cursor: pointer; list-style: none;
  transition: background 0.2s var(--ease);
}
.proj__summary::-webkit-details-marker { display: none; }
.proj__summary:hover { background: var(--bg-card); }
.proj__k {
  font-weight: 700; font-size: 12px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent-soft);
}
.proj h3 { font-size: 20px; margin-bottom: 5px; }
.proj p { color: var(--muted); font-size: 16px; }
.proj__yr { color: var(--faint); font-size: 14px; }
.proj__url {
  display: inline-block; font-size: 13px; color: var(--muted); margin-bottom: 6px;
  text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px;
  transition: color 0.18s var(--ease), text-decoration-color 0.18s var(--ease);
}
.proj__url:hover { color: var(--accent); text-decoration-color: var(--accent); }

.proj__chev { position: absolute; top: 50%; right: 12px; width: 20px; height: 20px; transform: translateY(-50%); }
.proj__chev::before, .proj__chev::after {
  content: ''; position: absolute; top: 50%; left: 50%; background: var(--accent);
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}
.proj__chev::before { width: 14px; height: 2px; transform: translate(-50%, -50%); }
.proj__chev::after { width: 2px; height: 14px; transform: translate(-50%, -50%); }
.proj[open] .proj__chev::after { transform: translate(-50%, -50%) rotate(90deg); opacity: 0; }

.proj__panel { padding: 0 8px 32px; animation: proj-in 0.25s var(--ease); }
@media (prefers-reduced-motion: reduce) { .proj__panel { animation: none; } }
@keyframes proj-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.proj__gallery { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px; margin: 0 0 20px; }
.proj__gallery img {
  height: 200px; width: auto; max-width: 100%;
  border-radius: var(--r); border: 1px solid var(--line); background: var(--bg-soft);
}
.proj__meta { max-width: 70ch; }
.proj__extra { color: var(--muted); font-size: 15px; margin: 0 0 16px; }
.proj__stacktitle {
  font-weight: 700; font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 10px;
}
.proj__stack { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.proj__stack li {
  font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 100px;
  background: var(--accent-tint); color: var(--accent);
}

/* ---------- start a project ---------- */

.start { background: var(--bg-card); border-top: 1px solid var(--line); }
.start__h { margin-bottom: 8px; }
.start__lead { margin-bottom: 34px; }

.brief { max-width: 760px; }

.brief__progress {
  height: 4px; background: var(--line-2); border-radius: 100px;
  overflow: hidden; margin-bottom: 8px;
}
.brief__bar {
  height: 100%; width: 25%; background: var(--accent); border-radius: 100px;
  transition: width 0.35s var(--ease);
}
.brief__count { font-size: 13px; color: var(--faint); font-weight: 600; letter-spacing: 0.03em; margin-bottom: 30px; }

/* Without JS the form renders as one long, fully working page.
   form.js adds .js to switch on the step-by-step flow. */
.step { display: block; border: 0; padding: 0; margin: 0; min-width: 0; }
.step + .step { margin-top: 44px; }
.brief.js .step { display: none; margin-top: 0; }
.brief.js .step.active { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .brief.js .step.active { animation: fade 0.35s var(--ease); }
}
@keyframes fade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.brief.js .brief__solo { display: none; }

.step__h { font-size: 25px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 6px; }
.step__h:focus-visible { outline: none; }
.step__sub { color: var(--muted); margin: 0 0 24px; font-size: 16px; }

.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choices--3 { grid-template-columns: 1fr 1fr 1fr; }
.choices--gap { margin-bottom: 26px; }

.choice {
  position: relative; border: 1.5px solid var(--line); border-radius: var(--r);
  padding: 16px 18px; cursor: pointer;
  display: flex; align-items: center; gap: 12px;
  font-size: 16px; font-weight: 500;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:hover { border-color: var(--accent-soft); }
.choice:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice:has(input:checked), .choice.is-sel { border-color: var(--accent); background: var(--accent-tint); }

.choice__tick {
  width: 18px; height: 18px; border-radius: 50%;
  border: 1.5px solid var(--line); flex: none;
  display: grid; place-items: center;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.choice:has(input:checked) .choice__tick, .choice.is-sel .choice__tick {
  border-color: var(--accent); background: var(--accent);
}
.choice:has(input:checked) .choice__tick::after, .choice.is-sel .choice__tick::after {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff;
}

/* fields */

.fld { display: grid; gap: 7px; margin-bottom: 18px; }
.fld label { font-weight: 600; font-size: 14px; color: var(--ink); }
.fld input, .fld textarea {
  font-family: var(--display); font-size: 16px; color: var(--ink);
  background: var(--bg-card); border: 1.5px solid var(--line);
  border-radius: var(--r); padding: 12px 14px; width: 100%;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.fld textarea { min-height: 120px; resize: vertical; }
.fld input::placeholder, .fld textarea::placeholder { color: var(--faint); }
.fld input:focus, .fld textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.call-when { display: none; margin-top: 18px; }
.call-when.show { display: grid; }
.brief:not(.js) .call-when { display: grid; }

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* nav row + flash */

.brief__nav { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 28px; }
.brief__hint { font-size: 13px; color: var(--err-tx); margin-left: auto; margin-right: 4px; }

.flash {
  display: flex; gap: 11px; align-items: center;
  padding: 14px 18px; border-radius: var(--r); margin-bottom: 24px;
  font-size: 15.5px; border: 1.5px solid; max-width: 760px;
}
.flash--ok { background: var(--accent-tint); border-color: var(--accent-soft); color: var(--accent); }
.flash--ok a, .flash--error a { text-decoration: underline; text-underline-offset: 0.18em; }
.flash--error { background: var(--err-bg); border-color: var(--err-bd); color: var(--err-tx); }

/* contact meta */

.contact-meta {
  display: flex; gap: 30px; flex-wrap: wrap;
  margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line);
  max-width: 760px;
}
.cm { display: grid; gap: 3px; }
.cm__k { font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); font-weight: 700; }
.cm__v { font-size: 16px; }
a.cm__v:hover { color: var(--accent); }

/* ---------- footer ---------- */

.footer { background: var(--footer-bg); color: #C7CDD6; padding-block: 60px 38px; }
.footer__top { display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap; }
.footer__brand { max-width: 320px; }
.footer__lock { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.footer__lock .brand__word { color: #fff; font-size: 15px; }
.footer__lock .brand__accent { color: #7FA3DA; }
.footer__brand p { font-size: 15px; color: #9AA2AD; }
.footer__cols { display: flex; gap: 72px; flex-wrap: wrap; }
.footer h4 {
  font-weight: 700; font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; color: #7D8794; margin: 0 0 15px;
}
.footer__cols a, .footer__plain { display: block; color: #C7CDD6; font-size: 15px; padding: 5px 0; }
.footer__cols a { transition: color 0.18s var(--ease); }
.footer__cols a:hover { color: #fff; }
.footer__bar {
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  margin-top: 46px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13.5px; color: #828B96;
}
.footer__bar a { text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.25); text-underline-offset: 2px; }
.footer__bar a:hover { color: #fff; }

/* ---------- reveal ---------- */

.rv { opacity: 0; transform: translateY(14px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 880px) {
  .hero__in { grid-template-columns: 1fr; gap: 30px; }
  .hero__art { order: -1; justify-content: flex-start; }
  .mark--hero { width: 150px; }
  .hero__rule { display: none; }
  .do, .band__in { grid-template-columns: 1fr; gap: 34px; }
  .do__aside { position: static; }
  .proj__summary { grid-template-columns: 1fr; gap: 6px; }
  .proj__yr { display: none; }
  .section { padding-block: 70px; }
}

@media (max-width: 620px) {
  .nav__links {
    position: absolute; left: 0; right: 0; top: 76px;
    flex-direction: column; align-items: flex-start; gap: 6px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 18px 28px 24px; display: none;
  }
  .nav__links.open { display: flex; }
  .nav__burger { display: inline-flex; }
  .nav__btn { margin-top: 8px; }
  .two, .choices, .choices--3 { grid-template-columns: 1fr; }
  .brief__nav { flex-wrap: wrap; }
}
