/* ===== Retro Tech Theme ===== */
:root{
  --bg: #0a18ff;           /* punchy royal blue */
  --ink: #e8ecff;          /* near-white text */
  --ink-dim: #b8c0ff;
  --line: #eeeeee;         /* thick line color (dark) */
  --card: #0610d4;
  --card-ink: #f2f4ff;
  --accent: #88f0b6;       /* mint accent */
  --brand: var(--ink);
  --maxw: 1180px;
  --radius: 14px;
  --gap: 1.1rem;
  --thick: 2px;            /* thick rule */
  --thin: 1.5px;
}

*{ box-sizing: border-box }
html, body { height: 100% }
body.retro{
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  line-height: 1.6;
}

/* Utilities */
.container { max-width: var(--maxw); margin-inline: auto; padding: 0 1.1rem; }
.rule { border-top: var(--thin) solid var(--ink); opacity: .9; }
.rule-thick { border-top: var(--thick) solid var(--line); }

/* ===== Header ===== */
.site-header { position: sticky; top:0; background: #fff; color:#0b18fe; backdrop-filter: blur(6px); z-index: 50; box-shadow:0 10px 30px rgba(6,16,212,.08); }
.header-inner { display:flex; align-items:center; justify-content:space-between; min-height:82px; }
.brand a{ text-decoration:none; color:inherit; font-weight:700; letter-spacing:.4px; }
.brand-top{ font-size: clamp(20px, 2.4vw, 32px); line-height:1; text-transform: uppercase; }
.brand-bottom{ font-size: clamp(20px, 2.4vw, 32px); line-height:1; text-transform: uppercase; margin-top:2px; }
.site-nav{ display:flex; gap:.9rem; align-items:center; color:inherit; }
.menu-toggle{ display:none; align-items:center; gap:.55rem; padding:.45rem .75rem; border: var(--thin) solid #0b18fe; border-radius:999px; background:transparent; color:#0b18fe; font:inherit; letter-spacing:.08em; text-transform:uppercase; cursor:pointer; transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.menu-toggle.is-open{ background: #0b18fe; color:#fff; border-color:#0b18fe; }
.menu-toggle:hover,
.menu-toggle:focus-visible{ background: #0b18fe; color:#fff; border-color:#0b18fe; outline:none; }
.menu-toggle-bars{ display:grid; gap:4px; }
.menu-toggle-bars span{ display:block; width:22px; height:2px; background: currentColor; border-radius:999px; transition: transform .2s ease, opacity .2s ease; }
.menu-toggle.is-open .menu-toggle-bars span:nth-child(1){ transform: translateY(6px) rotate(45deg); }
.menu-toggle.is-open .menu-toggle-bars span:nth-child(2){ opacity:0; }
.menu-toggle.is-open .menu-toggle-bars span:nth-child(3){ transform: translateY(-6px) rotate(-45deg); }
.menu-toggle-label{ font-size:.92rem; letter-spacing:.08em; }
.top-nav{ display:flex; gap:.9rem; align-items:center; }
.nav-link{
  color:#0b18fe;
  text-decoration:none;
  padding:.55rem .8rem;
  border: var(--thin) solid #0b18fe;
  border-radius: 999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.nav-link.is-active{
  background: #0b18fe;
  color:#fff;
}
.nav-link:hover{ background: #0b18fe; color:#fff; }

/* Brand: logo left, two-line text stack right */
.brand a {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;                  /* space between logo and text */
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  image-rendering: auto;         /* keep edges crisp */
  /* retro tech vibe: chunky outline */
  outline: none;
  outline-offset: 2px;
  background: none;
  border-radius: 4px;            /* small radius to match cards */
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.0;
}

/* Fine-tune the two lines if needed */
.brand-top {
  font-weight: 400;              /* thin mono already in use */
  letter-spacing: 0.02em;
}

.brand-bottom {
  font-weight: 600;              /* slightly heavier for contrast */
  letter-spacing: 0.02em;
}

/* Responsive tweak: scale logo down a touch on very small screens */
@media (max-width: 420px) {
  .brand-logo { width: 30px; height: 30px; }
}

@media (max-width: 720px){
  .header-inner{ position:relative; gap:1rem; }
  .menu-toggle{ display:inline-flex; }
  .site-nav{ display:none; position:absolute; top:calc(100% + .75rem); right:1.1rem; left:1.1rem; flex-direction:column; align-items:stretch; gap:.65rem; padding:1rem; border: var(--thick) solid var(--line); border-radius: var(--radius); background: #fff; color:#0b18fe; box-shadow:0 18px 40px rgba(5, 12, 120, .25); }
  .site-nav.is-open{ display:flex; }
  .site-nav .nav-link{ width:100%; }
}

/* ===== Hero ===== */
.hero{ padding: clamp(1.5rem, 3vw, 2.5rem) 0; margin: auto; padding-left: 1.1rem; padding-right: 1.1rem; }
.hero-grid{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap: clamp(1rem, 3vw, 2rem);
  align-items: start;
}
.hero-h1{
  font-weight: 600;
  letter-spacing: .3px;
  font-size: clamp(22px, 3.6vw, 40px);
  margin: 0 0 .6rem 0;
}
.lead{ color:var(--ink); font-size: clamp(15px, 1.4vw, 18px); }
.text-link{ color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.hero-photo{
  margin:0;
  border: none;
  border-radius: none;
  overflow: hidden;
  background: #fff;
}
.hero-photo img{
  display:block; width:100%; height:auto; object-fit: cover;
}

/* ===== Portfolio ===== */
.section-title{ font-size: clamp(18px, 2vw, 22px); margin: 1.2rem 0 .6rem; text-transform: uppercase; letter-spacing: .12em; }
.portfolio-head{ position: static; top: 82px; background: color-mix(in oklab, var(--bg) 95%, transparent); padding-top:.75rem; z-index: 40; }

/* Filters bar (desktop/tablet) */
.filters-bar{ display:flex; gap:.6rem; flex-wrap: wrap; padding:.4rem 0 .9rem; }
.filter-btn{
  border: var(--thick) solid var(--line);
  background: var(--card);
  color: var(--card-ink);
  padding:.5rem .75rem;
  border-radius: none;
  font-size: .9rem;
  cursor: pointer;
}
.filter-btn[aria-pressed="true"]{ background: var(--accent); color:#031f0f; border-color: #031f0f; }

/* Accordion (mobile) */
.filters-accordion{ display:none; border: var(--thick) solid var(--line); border-radius: 12px; padding:.5rem .75rem; margin-bottom: .9rem; background: var(--card); }
.filters-accordion summary{ cursor:pointer; list-style:none; font-weight:600; }
.filters-accordion-inner{ display:flex; flex-wrap:wrap; gap:.5rem; margin-top:.65rem; }

/* Grid */
.grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
  padding-bottom: 3rem;
}
.card{
  grid-column: span 4; /* 3-up on desktop */
  background: var(--card);
  border: var(--thick) solid var(--line);
  border-radius: none;
  overflow: clip;
  display:flex; flex-direction: column;
  min-height: 280px;
}
.card-media{
  aspect-ratio: 16/9;
  background: #050b6a;
  border-bottom: var(--thick) solid var(--line);
  position: relative;
}
.card-media img{ width:100%; height:100%; object-fit: cover; display:block; }
.card-body{ padding: .9rem; }
.card-title{ margin:0 0 .35rem; font-size: clamp(15px, 1.5vw, 18px); color:var(--card-ink) }
.card-meta{ color: var(--ink-dim); font-size: .85rem; }
/* Make the entire card clickable by wrapping content in a link */
.card {
  position: relative;        /* layout containment */
  overflow: hidden;          /* keep children clipped if needed */
}

.card-link {
  display: block;            /* so the link occupies the card box */
  height: 100%;
  color: inherit;
  text-decoration: none;
  position: relative;        /* anchor for any inner absolute elements */
  /* small interaction niceties */
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.card-link:hover .card-title {
  text-decoration: underline;
}

/* Keep content layers above backgrounds if you add effects later */
.card .card-media,
.card .card-body {
  position: relative;
  z-index: 1;
}

/* (Optional) subtle hover lift */
.card:hover .card-link {
  transform: translateY(-1px);
}

/* If any legacy .stretched rules exist, neutralize them */
.stretched {
  position: static !important;
  inset: auto !important;
  display: inline !important;
  background: none !important;
  z-index: auto !important;
}

/* Responsive */
@media (max-width: 1024px){
  .card{ grid-column: span 6; } /* 2-up */
  .hero-grid{ grid-template-columns: 1fr; }
  .hero-photo{ order: -1; } /* photo first on smaller screens */
}
@media (max-width: 720px){
  .filters-bar{ display:none; }
  .filters-accordion{ display:block; }
  .card{ grid-column: span 12; } /* 1-up */
}

/* Footer */
.site-footer{ padding: 1.25rem 0 2.5rem; }
.micro{ color:var(--ink-dim); font-size:.85rem; }

/* --- Services & Contact additions --- */
.services-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.list {
  margin: 0.5rem 0 1rem 1.25rem;
}
.list li { margin: 0.25rem 0; }

.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }

.btn {
  display: inline-block;
  border: 4px solid currentColor;
  padding: 0.5rem 0.9rem;
  text-decoration: none;
  font-weight: 600;
  line-height: 1;
  font-family: monospace;
  color: #fff
}
.btn:hover { text-decoration: underline; }
.btn-solid {
  background: #0b18fe;
  color: #fff;
}

/* Contact form */
.contact-form { max-width: 720px; margin-bottom: 20px; }
.field { margin: 0.75rem 0; }
.field label { display: block; font-size: 0.9rem; margin-bottom: 0.25rem; }
.field input,
.field textarea {
  width: 100%;
  border: 4px solid currentColor;
  background: #fff;
  padding: 0.6rem 0.75rem;
  font: inherit;
}
.hp { display: none !important; }

.notice { border: 4px solid currentColor; color: #0b18fe; padding: 0.6rem 0.75rem; margin: 0.75rem 0; }
.notice.ok { background: #e7ffe7; }
.notice.err { background: #ffe7e7; }

/* --- Hero v2 (screenshot match) --- */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.hero--v2 {
  background: #ffffff;               /* white hero band */
}

.hero--v2 .hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;  /* text wider than photo */
  align-items: anchor-center;
  gap: clamp(24px, 5vw, 64px);
  padding: clamp(0px, 5vw, 0px) 0;
}

.hero--v2 .hero-copy {
  color: var(--bg, #0a18ff);         /* electric blue body */
  font-size: clamp(13px, 1.05vw + 12px, 13px);
  line-height: 1.65;
  max-width: 70ch;
}

.hero--v2 .hero-copy p { margin: 0 0 1rem 0; }
.hero--v2 .hero-copy a {
  color: #2ad084;                    /* retro green links */
  text-decoration: underline;
  font-weight: 600;
}

.hero--v2 .hero-photo {
  display: flex;
  align-self: end;                   /* anchor photo to bottom of band */
  align-items: flex-end;
  justify-content: flex-end;         /* push image to the right edge */
}

.hero--v2 .hero-photo img {
  display: block;
  width: min(620px, 43vw);
  height: auto;
  margin-left: auto;
  /* optional subtle frame for retro look; comment out if not wanted */
  /* border: 6px solid #0b18ff; border-radius: 12px; */
}

@media (max-width: 980px) {
  .hero--v2 .hero-grid { grid-template-columns: 1fr; }
  .hero--v2 .hero-photo img {
    width: min(88vw, 640px);
    margin: 12px auto 0;
  }
}
