/* ==========================================================================
   dgcons.eu — Digital Consulting Ltd
   Single stylesheet. No framework, no build step, no third-party requests.
   Dark-first, single committed theme. All ratios AA-verified (see PLAN.md).
   ========================================================================== */

/* --- Fonts: self-hosted IBM Plex, latin + cyrillic subsets ---------------- */

@font-face{font-family:'Plex Sans';font-style:normal;font-weight:400;font-display:swap;
  src:url(../fonts/plex-sans-400-latin.woff2) format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Plex Sans';font-style:normal;font-weight:400;font-display:swap;
  src:url(../fonts/plex-sans-400-cyrillic.woff2) format('woff2');
  unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Plex Sans';font-style:normal;font-weight:600;font-display:swap;
  src:url(../fonts/plex-sans-600-latin.woff2) format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Plex Sans';font-style:normal;font-weight:600;font-display:swap;
  src:url(../fonts/plex-sans-600-cyrillic.woff2) format('woff2');
  unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Plex Mono';font-style:normal;font-weight:500;font-display:swap;
  src:url(../fonts/plex-mono-500-latin.woff2) format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Plex Mono';font-style:normal;font-weight:500;font-display:swap;
  src:url(../fonts/plex-mono-500-cyrillic.woff2) format('woff2');
  unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}

/* --- Tokens -------------------------------------------------------------- */

:root{
  color-scheme:dark;

  --bg:#050607;           /* page ground, behind the backdrop photo */
  --panel:#0B0C0D;        /* the content column — solid, as the original tables were */
  --panel-2:#111314;      /* nested block */
  --hairline:#2A2E31;
  --hairline-soft:#41474B;  /* 2.08:1 — every structural rule on the site: the column
                               edge, the 2x2 cell dividers, h2 underlines, timeline
                               rows. Still under the 3:1 non-text minimum, so quiet. */

  --text:#F2EFEC;         /* 17:1 on --panel */
  --text-dim:#BDB5AE;     /* 10:1  — body copy (the original used #A52A2A at 2.96:1) */
  --text-mute:#8B857E;    /*  5.4:1 — captions, footer */

  --led:#FF5A3C;          /*  6.3:1 — links, markers, accents */
  --led-hot:#FF6B4A;
  --ember:#800000;        /*  the heritage maroon: fills and rules only, never text */
  --seg-off:#33231F;      /*  unlit LED segment */
  --on-led:#0B0C0D;

  --sans:'Plex Sans',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
  --mono:'Plex Mono',ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;

  --step--1:clamp(.8125rem,.79rem + .11vw,.875rem);
  --step-0: clamp(.9375rem,.92rem + .12vw,1rem);
  --step-1: clamp(1.0625rem,1.02rem + .22vw,1.1875rem);
  --step-2: clamp(1.25rem,1.16rem + .42vw,1.5rem);
  --step-3: clamp(1.5rem,1.34rem + .78vw,2rem);

  --pad:clamp(1.15rem,3.4vw,2.75rem);   /* inner padding of the content column */
  --max:1140px;
  --r:2px;
}

/* --- Reset --------------------------------------------------------------- */

*,*::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;color:var(--text);
  font:400 var(--step-0)/1.62 var(--sans);
  -webkit-font-smoothing:antialiased;
  background:var(--bg) url(../img/backdrop.jpg) no-repeat 50% 0 fixed;
  background-image:image-set(url(../img/backdrop.webp) type("image/webp"),
                             url(../img/backdrop.jpg)  type("image/jpeg"));
  background-size:cover;
}
/* Below --max the content column covers the photo edge to edge, so a fixed
   attachment buys nothing and costs a repaint on every scroll frame (and iOS
   sizes a fixed background to the document, not the viewport). */
@media (max-width:1140px){body{background-attachment:scroll}}
h1,h2,h3,p,ul,ol,dl,figure{margin:0}
ul,ol{padding:0;list-style:none}
img,svg{display:block;max-width:100%}
a{color:var(--led);text-decoration:none}
a:hover{color:var(--led-hot)}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer}
:focus-visible{outline:2px solid var(--led);outline-offset:3px;border-radius:2px}
::selection{background:var(--led);color:var(--on-led)}
.mono{font-family:var(--mono);font-weight:500;font-variant-numeric:tabular-nums}
mark{
  color:var(--text);font-weight:600;background:none;
  background-image:linear-gradient(var(--ember),var(--ember));
  background-repeat:no-repeat;background-position:0 100%;background-size:100% .16em;
}

/* --- The content column -------------------------------------------------- */
/* The original was a fixed 1000px table on a dark keyboard photograph. Same
   idea, but fluid: the column shrinks to the viewport instead of overflowing. */

.shell{
  max-width:var(--max);margin-inline:auto;background:var(--panel);
  border-inline:1px solid var(--hairline-soft);min-height:100vh;
}
.pad{padding-inline:var(--pad)}
header.pad{padding-top:clamp(1.15rem,2.2vw,1.5rem)}

/* --- Masthead ------------------------------------------------------------ */
/* Original order preserved: language switch, logotype, heavy rule, then
   contact details left and the company name right. */

.lang{
  display:flex;justify-content:flex-end;gap:.25rem;
  padding:.2rem 0 .1rem;font-size:var(--step--1);
}
.lang a{
  display:inline-flex;align-items:center;min-height:44px;padding-inline:.4rem;
  color:var(--text-mute);
}
.lang a:hover{color:var(--led)}
.lang [aria-current]{color:var(--text)}

.mast__logo{display:block;line-height:0}
/* logotype and language switch share the top row — saves a whole row of height */
.mast__top{margin-bottom:.5rem;display:flex;align-items:center;justify-content:space-between;gap:1.5rem}
.mast__top .lang{padding:0}

.mast__logo .logo__svg{height:clamp(28px,3.2vw,36px);width:auto}

.rule{
  height:5px;border:0;margin:0;border-radius:1px;
  background:linear-gradient(90deg,var(--led) 0,var(--ember) 36%,var(--ember) 76%,#38130F 100%);
}

.mast__id{display:grid;gap:.32rem;padding:.6rem 0 .75rem}
.mast__c1,.mast__c2{font-size:var(--step--1);color:var(--text-mute)}
.mast__c1 a,.mast__c2 a{color:var(--text-dim)}
.mast__c1 a:hover,.mast__c2 a:hover{color:var(--led)}
.mast__c1 .mono{color:var(--text)}
@media (min-width:760px){
  /* one grid, four cells: row 1 is contact/company, row 2 is e-mail/tagline.
     align-items:baseline makes each row share a baseline across the two columns,
     which the old nested-column markup could not do — the 24px company name
     pushed the right column's second line out of step with the left's. */
  .mast__id{
    grid-template-columns:1fr auto;column-gap:2.5rem;row-gap:.32rem;
    align-items:baseline;
  }
  .mast__legal,.mast__tag{text-align:right}
}
@media (max-width:759px){
  /* logotype, company name and tagline form one identity group ABOVE the rule;
     contact details sit below it. display:contents lifts the band's children into
     the header's own flex flow, so they can be ordered across the <hr>. */
  header.pad{display:flex;flex-direction:column}
  .mast__id{display:contents}
  .mast__top{order:1;margin-bottom:.3rem}
  .mast__legal{order:2;font-size:var(--step-1)}
  .mast__tag{order:3;margin:.1rem 0 .7rem}
  .rule{order:4}
  .mast__c1{order:5;margin-top:.7rem}
  .mast__c2{order:6;margin-top:.32rem}
}
.mast__legal{font-size:var(--step-2);font-weight:600;letter-spacing:-.02em;line-height:1.15}
.mast__tag{
  font:500 var(--step--1)/1.3 var(--mono);
  letter-spacing:.11em;text-transform:uppercase;color:var(--led);
}

/* --- Seven-segment logotype ----------------------------------------------
   Vector-traced from the 2008 original by tools/trace_logo.py. Two layers:
   .seg is the bevel around every segment, .seg.on the lit ones. */

.logo__svg{display:block}
.logo__svg .seg{fill:var(--seg-off)}
.logo__svg .seg.on{fill:var(--led)}
.logo__svg .seg.on{animation:led-on .55s ease-out backwards}
@keyframes led-on{0%{opacity:0}30%{opacity:.35}45%{opacity:0}70%{opacity:1}82%{opacity:.55}100%{opacity:1}}
@media (prefers-reduced-motion:reduce){.logo__svg .seg.on{animation:none}}

/* --- Claim --------------------------------------------------------------- */

.claim{
  padding-block:clamp(1.15rem,2.4vw,1.6rem);
  border-top:1px solid var(--hairline-soft);
}
.claim h1{
  font-size:var(--step-3);font-weight:600;line-height:1.2;
  letter-spacing:-.02em;text-wrap:balance;max-width:48ch;
}
.claim p{margin-top:.55rem;color:var(--text-dim);max-width:64ch;text-wrap:pretty}

/* --- Readout strip -------------------------------------------------------
   The firm's key figures presented the way a panel presents them: small caps
   label, large mono value, a faint lit glow. Cells are flex columns with the
   value pinned to the bottom, so a label that wraps to two lines cannot drag
   its value out of line with the rest of the row.
   ------------------------------------------------------------------------- */

.readout{display:grid;grid-template-columns:repeat(4,1fr);border-top:1px solid var(--hairline-soft)}
.readout div{
  display:flex;flex-direction:column;justify-content:space-between;gap:.6rem;
  padding:1.15rem clamp(.75rem,2vw,1.5rem) 1.25rem;
  border-left:1px solid var(--hairline-soft);
}
.readout div:first-child{border-left:0;padding-left:0}
.readout dt{
  font:500 .625rem/1.35 var(--mono);letter-spacing:.15em;text-transform:uppercase;
  color:var(--text-mute);
}
.readout dd{
  margin:0;font:500 clamp(1.5rem,3.4vw,2.1rem)/1 var(--mono);
  letter-spacing:-.02em;color:var(--led);font-variant-numeric:tabular-nums;
  text-shadow:0 0 18px rgba(255,90,60,.26);
}
@media (max-width:820px){
  .readout{grid-template-columns:1fr 1fr}
  .readout div:nth-child(odd){border-left:0;padding-left:0}
  .readout div:nth-child(n+3){border-top:1px solid var(--hairline-soft)}
}

/* --- The 2x2 content blocks ---------------------------------------------- */
/* The original laid these out as table cells: Services | News on the first row,
   Who we are | Contact on the second. Same grid, now with a real breakpoint. */

.blocks{display:grid;gap:1px;background:var(--hairline-soft);border-block:1px solid var(--hairline-soft)}
@media (min-width:780px){.blocks{grid-template-columns:1fr 1fr}}
.block{background:var(--panel);padding:clamp(1.5rem,3vw,2.25rem) var(--pad)}
.block h2{
  display:flex;align-items:baseline;gap:.7em;position:relative;
  font-size:var(--step-1);font-weight:600;letter-spacing:-.01em;margin-bottom:1.2rem;
}
/* a lit bar above the label, the heavy masthead rule in miniature */
.block h2::before{
  content:"";position:absolute;left:0;top:-1.05rem;width:2.25rem;height:3px;
  background:linear-gradient(90deg,var(--led),var(--ember));border-radius:1px;
}
.block h2 .ix{font:500 .6875rem/1 var(--mono);letter-spacing:.14em;color:var(--text-mute)}
.block p{max-width:60ch;color:var(--text-dim);text-wrap:pretty}
.block p + p{margin-top:.8rem}
.block strong{color:var(--text);font-weight:600}

.list{display:grid;gap:.8rem}
.list li{position:relative;max-width:60ch;padding-left:1.4em;color:var(--text-dim)}
/* the marker is a lit segment, skewed to the logotype's own geometry */
.list li::before{
  content:"";position:absolute;left:0;top:.72em;
  width:.62em;height:.22em;background:var(--led);
  transform:skewX(-14deg);box-shadow:0 0 8px rgba(255,90,60,.42);
}
.list b{color:var(--text);font-weight:600}

.more{
  display:inline-flex;align-items:center;gap:.5em;margin-top:1rem;
  padding-block:.38rem;font-size:var(--step--1);font-weight:600;
}

/* IBM Plex carries no ← → ↔ glyphs — only ↑ ↓ — so these arrows are drawn, not
   typed. They scale with the font, match its weight, and cannot fall back to a
   mismatched system glyph or tofu. */
.more::after,.back a::before{
  content:"";flex:none;width:.4em;height:.4em;margin-top:.05em;
  border-top:1.5px solid currentColor;border-right:1.5px solid currentColor;
}
.more::after{transform:rotate(45deg);transition:transform .18s}
.more:hover::after{transform:rotate(45deg) translate(.1em,-.1em)}
.back a::before{transform:rotate(-135deg)}

/* --- Contact block ------------------------------------------------------- */

.dl{display:grid;gap:.95rem}
/* the contact block as a spec sheet: label, leader, value */
.dl div{display:grid;grid-template-columns:auto 1fr auto;gap:.6rem;align-items:baseline}
.dl dt{
  font:500 .6875rem/1 var(--mono);letter-spacing:.14em;text-transform:uppercase;
  color:var(--text-mute);white-space:nowrap;
}
.dl div::after{content:"";height:0;border-bottom:1px dotted var(--hairline-soft);align-self:center;order:2}
.dl dd{
  order:3;margin:0;color:var(--text);text-align:right;
  font-family:var(--mono);font-weight:500;font-size:var(--step--1);
}
@media (max-width:460px){
  .dl div{grid-template-columns:1fr;gap:.2rem}
  .dl div::after{display:none}
  .dl dd{text-align:left}
}
.dl dd a{display:inline-block;padding-block:.4rem;margin-block:-.4rem;color:var(--text)}
.dl dd a:hover{color:var(--led)}

.copy{
  display:inline-flex;align-items:center;margin-left:.55em;vertical-align:middle;
  font:500 .6875rem/1 var(--mono);letter-spacing:.07em;text-transform:uppercase;
  color:var(--text-mute);border:1px solid var(--hairline);border-radius:var(--r);
  padding:.66em .8em;transition:color .18s,border-color .18s;
}
.copy:hover,.copy[data-done=true]{color:var(--led);border-color:var(--led)}

/* --- Credentials --------------------------------------------------------- */

.credgroup{border-top:1px solid var(--hairline-soft)}
.credgroup h2{
  display:flex;align-items:baseline;gap:.7em;position:relative;
  font-size:var(--step-1);font-weight:600;letter-spacing:-.01em;
  padding-block:clamp(1.5rem,3vw,2rem) 1.1rem;
}
.credgroup h2::before{
  content:"";position:absolute;left:var(--pad);top:calc(clamp(1.5rem,3vw,2rem) - .55rem);
  width:2.25rem;height:3px;border-radius:1px;
  background:linear-gradient(90deg,var(--led),var(--ember));
}
.credgroup h2 .ix{font:500 .6875rem/1 var(--mono);letter-spacing:.14em;color:var(--text-mute)}

.creds{display:grid;gap:1px;background:var(--hairline-soft);border-top:1px solid var(--hairline-soft)}
@media (min-width:820px){.creds{grid-template-columns:1fr 1fr}}
.cred{
  display:grid;grid-template-columns:auto minmax(0,1fr);gap:1.1rem;align-items:start;
  background:var(--panel);padding:1.2rem var(--pad);
}
.cred img{width:56px;height:56px;object-fit:contain}
.cred h3{font-size:var(--step-0);font-weight:600;line-height:1.3;color:var(--text)}
.cred p{margin-top:.4rem;font-size:var(--step--1);line-height:1.55;color:var(--text-dim)}
@media (max-width:420px){
  .cred{grid-template-columns:1fr;gap:.75rem}
  .cred img{width:48px;height:48px}
}

/* Badges as proof at a glance, in place of the contact block the masthead already
   carries. Nested rather than wrapped, so eleven of them read as one object on a
   single line; the whole cluster is one link. Hovering fans them apart. */
.badges{display:flex;align-items:center;margin-top:.5rem;width:max-content;max-width:100%}
.badges img{
  width:46px;height:46px;object-fit:contain;margin-left:-13px;
  transition:margin-left .22s ease,transform .22s ease;
}
.badges img:first-child{margin-left:0}
.badges:hover img,.badges:focus-visible img{margin-left:-4px}
.badges:hover img:first-child,.badges:focus-visible img:first-child{margin-left:0}
@media (max-width:520px){
  .badges img{width:38px;height:38px;margin-left:-11px}
  .badges:hover img{margin-left:-6px}
}
@media (prefers-reduced-motion:reduce){.badges img{transition:none}}

/* --- Portfolio ----------------------------------------------------------- */

.tl{display:grid;border-top:1px solid var(--hairline-soft)}
.tl__item{
  display:grid;gap:.9rem;padding:clamp(1.4rem,3vw,2rem) 0;
  border-bottom:1px solid var(--hairline-soft);
}
@media (min-width:780px){.tl__item{grid-template-columns:9.5rem minmax(0,1fr);gap:2.25rem}}
.tl__yr{font:500 var(--step-2)/1.15 var(--mono);color:var(--led);letter-spacing:-.01em;align-self:start}
.tl__body{display:grid;gap:1rem;max-width:60ch}
.tl__body .list li{font-size:var(--step-0)}
.tl__who{display:flex;flex-wrap:wrap;gap:.4rem}
.chip{
  font:500 .75rem/1 var(--mono);padding:.45em .7em;
  border:1px solid var(--hairline);border-radius:var(--r);color:var(--text-mute);
}
/* The one sentence on the site that asks for a phone call. It is not metadata,
   so it does not get the metadata tone. 60ch to hold measure at the larger size. */
.note{margin-top:1.5rem;color:var(--text-dim);font-size:var(--step-0);max-width:60ch}
.back{display:inline-flex;gap:.5em;font-size:var(--step--1);padding-block:.9rem 0}
.back a{display:inline-flex;align-items:center;gap:.5em;padding-block:.35rem}

/* --- Footer -------------------------------------------------------------- */

.ftr{
  display:flex;flex-wrap:wrap;justify-content:space-between;gap:.5rem 1.5rem;
  padding-block:1.2rem 1.8rem;font-size:var(--step--1);color:var(--text-mute);
}
.ftr a{display:inline-block;padding-block:.3rem;color:var(--text-mute)}
.ftr a:hover{color:var(--led)}

/* --- Skip link ----------------------------------------------------------- */

.skip{
  position:absolute;left:1rem;top:.5rem;z-index:99;transform:translateY(-250%);
  transition:transform .18s;background:var(--led);color:var(--on-led);
  font-weight:600;font-size:var(--step--1);padding:.6em 1em;border-radius:var(--r);
}
.skip:focus{transform:none;color:var(--on-led)}

/* --- Print --------------------------------------------------------------- */

@media print{
  :root{color-scheme:light;
        --panel:#fff;--text:#000;--text-dim:#222;--text-mute:#555;--led:#800000;
        --hairline:#bbb;--hairline-soft:#ddd}
  html,body{background:#fff;color:#000}
  body{font-size:10.5pt}
  mark{background-image:linear-gradient(#800000,#800000);color:#000}
  .shell{border:0;min-height:0;max-width:none}
  .lang,.skip,.copy,.back{display:none!important}
  .blocks{gap:0;background:none}
  .block{break-inside:avoid;border-bottom:1px solid #ddd}
  .tl__item{break-inside:avoid}
  .logo__svg .seg{fill:#ccc}.logo__svg .seg.on{fill:#800000;animation:none}
}
