/* =========================================================
   SIBIS Communications - "Dark Impact" visual theme
   круг 40 - added on top of style.css / style-responsive.css,
   loaded AFTER both so these rules win on equal specificity.
   Does not delete/replace old rules - old CSS stays as a
   fallback for anything this file doesn't touch.
   ========================================================= */

@import url('https://fonts.googleapis.com/css?family=Raleway:300,400,500,600,700,800,900');

:root{
  --accent:#c8e552;
  --accent2:#9fc23a;
  --muted:#a3a39c;
  --card:#151517;
  --alt:#111113;
  --border:#2a2a2d;
  --bg:#0b0b0c;
}

html{ background:var(--bg); }
body{
  background:var(--bg) !important;
  color:#f5f5f2;
}
p{ color:#f5f5f2; }
a{ border-bottom-color:var(--border); }

/* style.css hides #fullscreen (the whole header, including the mobile menu
   button) with display:none by default, and script.js only reveals it with
   a jQuery fadeIn() after the page loads - a leftover fade flourish from
   the old template. While an ancestor's opacity is anything other than 1
   (exactly what's happening mid-fade), the CSS spec makes that ancestor the
   containing block for any position:fixed descendant instead of the
   viewport - which can leave a fixed child (like the menu button) stuck
   mispositioned on some mobile browsers even after the animation ends.
   There's no real reason critical nav has to be hidden-then-revealed by JS
   timing at all, so it's forced visible from the start here instead. */
#fullscreen{ display:block !important; opacity:1 !important; }

/* круг 41: the mobile menu overlay (.opacity-nav) now opens/closes via a
   small plain-JS toggle inlined right after the header in the layout,
   instead of jQuery's fadeToggle() - see that script's comment for the
   full story (it traced back to the site loading two conflicting jQuery
   versions). This transition is what gives that plain JS its fade;
   without it the toggle still works, just as an instant show/hide. */
.opacity-nav{ transition:opacity .25s ease; }

/* ---------- content container: keep it inside the viewport on mobile ----------
   .content (id="ajax-content" in the layout) is the shared width:1140px page
   wrapper - services, portfolio grid, contact etc. all nest inside it. None
   of the old style-responsive.css breakpoints ever narrowed .content itself,
   only specific children (like .text-intro) got their own smaller fixed
   widths. That was harmless under the old theme since nothing else sized
   itself relative to .content - but круг 40's .services-layout (max-width)
   and .portfolio-grid (width:100%) both size themselves AS A PERCENTAGE OF
   .content, so on a phone .content needs to actually shrink to the screen
   too, or those children (and any bare text sitting directly in .content)
   run edge-to-edge with no side gutter, or even part off-screen. */
@media (max-width:1180px){
  .content{
    width:100%;
    max-width:100%;
    box-sizing:border-box;
    padding:0 24px;
  }
}
@media (max-width:480px){
  .content{ padding:0 18px; }
}

/* ---------- header / wordmark ---------- */
.wordmark{
  font-size:23px;
  font-weight:900;
  letter-spacing:.5px;
  color:#ffffff;
  line-height:80px;
}
.wordmark .full-name{
  color:var(--accent);
  font-weight:700;
}
header .logo > a{ border-bottom:0; width:auto; height:auto; }
header .logo > a:hover{ opacity:.8; color:inherit; }

/* Mobile: "SIBIS Communications" at the desktop 23px size doesn't fit inside
   #full's mobile width (400px / 280px per style-responsive.css) and wraps
   onto a second line. Since #fullscreen is position:absolute over the page
   (style.css), that wrapped second line doesn't push anything down - it
   just overlaps whatever content sits at the top of the page underneath it.
   white-space:nowrap plus a smaller font stops the wrap (and the overlap)
   outright instead of relying on getting the width exactly right. */
@media (max-width:768px){
  .wordmark{
    font-size:16px;
    white-space:nowrap;
    letter-spacing:0;
  }
}
@media (max-width:480px){
  .wordmark{ font-size:13px; }
}

ul.menu-fullscreen li > a:hover{ color:var(--accent); }

/* --card (#151517) barely differs from the page --bg (#0b0b0c), so the
   button was nearly invisible against the black page - only the icon glyph
   itself (which depends on the FontAwesome web font finishing its download)
   made it noticeable at all. A visible border gives it a real, always-there
   outline so the tap target itself doesn't disappear if that font is slow.

   style.css centers the icon inside this button with float:right and gives
   the button itself no explicit width/height at all - it's only ever had a
   size because padding:20px (style.css) happens to push it out around the
   floated icon. That's exactly the kind of thing that can render fine in
   one browser/engine and collapse or misplace itself in another - reports
   of the button being fully invisible/untappable on a phone (not just the
   icon glyph failing to load, the whole box) line up with that. Given a
   fixed width/height and switched to flex centering instead, so the button
   has a real, guaranteed size that doesn't depend on an uncleared float. */
.menu-index{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:6px;
  width:58px;
  height:58px;
  padding:0;
  display:flex !important;
  align-items:center;
  justify-content:center;
  box-sizing:border-box;
}
.menu-index i{ float:none; }

/* ---------- hero / text-intro (H1) ---------- */
.content .text-intro h1{
  font-size:clamp(28px,4.6vw,64px);
  line-height:1.1;
  color:#ffffff;
  font-weight:900;
  letter-spacing:-0.01em;
}
.content .text-intro h1 .accent{ color:var(--accent); }
.content .text-intro p{
  color:var(--muted);
  font-size:15px;
  line-height:1.65;
  width:60%;
}
@media (max-width:900px){
  .content .text-intro p{ width:100%; }
}

.text-intro2 h2{
  font-size:clamp(28px,4vw,48px) !important;
  font-weight:900 !important;
  letter-spacing:-0.01em;
}

/* ---------- portfolio grid (4-col Dark Impact) ---------- */
.portfolio-grid{
  width:100%;
  max-width:1140px;
  margin:30px auto;
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:18px;
  overflow:visible;
}
li.grid-item{
  width:auto !important;
  min-width:0;
  min-height:0;
  float:none;
  padding:0;
  margin:0;
  /* jKit's fade-in "show" animation leaves this element with an inline
     position:absolute plus a per-item left/top offset (captured from
     wherever it happened to sit at animation time) after it runs. Forcing
     just position back to relative isn't enough - those leftover left/top
     values then get reinterpreted as relative offsets and shove every
     item further right than the last. All three have to be forced back. */
  position:relative !important;
  left:0 !important;
  top:0 !important;
  overflow:hidden;
  border-radius:10px;
  aspect-ratio:4/3;
  background:var(--alt);
}
li.grid-item img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center 15%;
  filter:grayscale(35%) brightness(.9);
  transition:filter .35s ease, transform .4s ease;
}
li.grid-item:hover img{
  filter:grayscale(0%) brightness(1);
  transform:scale(1.05);
}
.grid-hover{
  width:100%;
  height:100%;
  top:0;
  left:0;
  position:absolute;
  background:linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.9) 100%);
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  padding:22px;
  opacity:0;
}
li.grid-item:hover .grid-hover{ opacity:1; }
.grid-hover h3{
  position:static;
  color:#ffffff;
  font-size:16px;
  text-transform:uppercase;
  letter-spacing:.5px;
  font-weight:800;
  line-height:1.2;
  margin:0 0 4px;
}
.grid-hover p{
  position:static;
  color:#cfcfca;
  font-size:12.5px;
  letter-spacing:normal;
  line-height:1.4;
  margin:0;
}

.grid-item.archive-tile{
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:20px;
  background:var(--card);
  border:1px solid var(--border);
  transition:background .25s ease, border-color .25s ease;
}
.grid-item.archive-tile:hover{ background:#1b1b1e; border-color:var(--accent); }
.grid-item.archive-tile .archive-tile-inner{ display:flex; flex-direction:column; align-items:center; gap:10px; }
.grid-item.archive-tile .archive-tile-num{ font-size:12px; font-weight:800; color:var(--accent); letter-spacing:1px; }
.grid-item.archive-tile h3{ color:#ffffff; font-size:15px; font-weight:800; text-transform:uppercase; letter-spacing:.5px; margin:0; }
.grid-item.archive-tile .arrow{ font-size:22px; color:var(--accent); }

@media (max-width:900px){ .portfolio-grid{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:600px){ .portfolio-grid{ grid-template-columns:1fr; } }

/* ---------- services: two-column sticky layout ---------- */
.services-layout{
  display:grid;
  grid-template-columns:340px 1fr;
  gap:60px;
  align-items:start;
  max-width:1140px;
  margin:0 auto;
}
@media (max-width:900px){ .services-layout{ grid-template-columns:1fr; gap:40px; } }

.services-side{ position:sticky; top:110px; }
@media (max-width:900px){ .services-side{ position:static; } }
.services-side h1{ font-size:clamp(30px,4.2vw,52px); font-weight:900; margin:0 0 20px; color:#ffffff; line-height:1.1; }
.services-side p{ font-size:15px; color:var(--muted); line-height:1.65; }
.services-side .accent-inline{ color:var(--accent); font-weight:800; }
.services-side .cta-button{ font-size:12.5px; padding:15px 30px; margin-top:10px; display:inline-block; }

.service-list{ border-top:1px solid var(--border); }
.service-row{
  display:grid;
  grid-template-columns:70px 1fr;
  gap:22px;
  padding:34px 20px 34px 0;
  border-bottom:1px solid var(--border);
  transition:background .25s ease;
  align-items:start;
}
.service-row:hover{ background:var(--card); }
.service-row .num{ font-size:14px; font-weight:800; color:var(--muted); letter-spacing:.5px; padding-top:10px; transition:color .25s ease; }
.service-row:hover .num{ color:var(--accent); }
.service-row h2{
  font-size:clamp(22px,2.8vw,36px);
  font-weight:900;
  letter-spacing:-0.01em;
  margin:0 0 10px;
  line-height:1.1;
  color:#ffffff;
  transition:color .25s ease;
}
.service-row:hover h2{ color:var(--accent); }
.service-row p{ font-size:14px; color:var(--muted); line-height:1.6; margin:0; max-width:560px; }

.led-by{
  margin:70px auto 0;
  padding:40px;
  border-radius:14px;
  background:var(--card);
  border:1px solid var(--border);
  max-width:1140px;
}
.led-by h2{ color:#ffffff; font-size:clamp(22px,2.8vw,32px); font-weight:900; margin:0 0 18px; }
.led-by p{ color:#e4e4e0; font-size:15px; line-height:1.65; margin:0; }

/* ---------- CTA button ---------- */
.cta-button{
  background:var(--accent);
  color:#0b0b0c !important;
  padding:17px 40px;
  border-radius:40px;
  font-weight:800;
  letter-spacing:1.2px;
  border-bottom:0 !important;
}
.cta-button:hover{ background:var(--accent2); color:#0b0b0c !important; }

/* ---------- footer ---------- */
footer{ background:var(--bg); border-top:1px solid var(--border); }
.footer-margin .copyright, .footer-margin .social-footer{ color:var(--muted); }
.footer-margin .social-footer a{ color:#ffffff; }
.footer-margin .social-footer a:hover{ color:var(--accent); }

/* ---------- contact page (functional form, restyled) ---------- */
.contact-dark .contact-detail{ margin-bottom:22px; }
.contact-dark .contact-detail .label{ font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:1.5px; color:var(--accent); margin-bottom:6px; }
.contact-dark .contact-detail a, .contact-dark .contact-detail span{ font-size:16px; color:#ffffff; }
.contact-dark label{ font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:1.5px; color:var(--muted); margin-bottom:8px; display:block; }
.contact-dark input:not([type="button"]):not([type="submit"]), .contact-dark textarea{
  width:100%;
  background:var(--card);
  border:1px solid var(--border);
  border-radius:8px;
  padding:14px 16px;
  color:#ffffff;
  font-family:'Raleway',sans-serif;
  font-size:14px;
  transition:border-color .2s ease;
}
.contact-dark input:not([type="button"]):not([type="submit"]):focus, .contact-dark textarea:focus{ outline:none; border-color:var(--accent); }
.contact-dark textarea{ resize:vertical; min-height:120px; }
.contact-dark input.cta-button{
  width:auto;
  display:block;
  margin:22px auto 0;
  /* <input type="button"> keeps Chrome's default button UA-styling
     (line-height/vertical baseline) unless appearance is reset, which is
     what pushed the SUBMIT label toward the bottom of the pill instead of
     centering it - the .cta-button padding alone wasn't enough to override
     that native rendering. appearance:none alone wasn't fully reliable
     either, so height/line-height/border are also pinned explicitly. */
  -webkit-appearance:none;
  appearance:none;
  border:0;
  box-sizing:content-box;
  height:auto;
  line-height:1;
}
