/*
Theme Name: DASIZ Solutions
Theme URI: https://www.dasiz.co.uk
Author: Dasiz Solutions
Author URI: https://www.dasiz.co.uk
Description: Custom theme for Dasiz Solutions, electronic design consultancy. Dark brand design with the DASIZ logo pack, cookie consent banner with a settings dialog, contact form and auto-created pages on activation. Compatible with PHP 7.0 through 8.4.
Version: 1.0.3
Requires at least: 5.2
Tested up to: 7.0
Requires PHP: 7.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dasiz-solutions
Tags: one-column, custom-menu, dark
*/

/* ==========================================================================
   DASIZ Solutions — main stylesheet
   Brand: #2470A8 (pad blue) · #626264 (mark gray) · #12161F (dark)
   Fonts: Space Grotesk (headings) · IBM Plex Mono (labels) · Inter (body)
   ========================================================================== */

:root {
  --blue: #2470A8;
  --blue-bright: #3D8FC9;
  --blue-deep: #1A5680;
  --gray: #626264;
  --dark: #12161F;
  --dark-2: #1A2230;
  --ink: #1C2430;
  --body: #46505C;
  --line: #E3E8EE;
  --bg-soft: #F4F7FA;
  --white: #FFFFFF;
  --accent-glow: rgba(36, 112, 168, 0.35);
  --radius: 10px;
  --shadow: 0 8px 30px rgba(18, 22, 31, 0.08);
  --font-head: "Space Grotesk", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", Consolas, monospace;
  --font-body: "Inter", "Segoe UI", sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--body);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-deep); }
ul, ol { padding-left: 1.25rem; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.015em;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
h3 { font-size: 1.25rem; }

:focus-visible { outline: 3px solid var(--blue-bright); outline-offset: 2px; }

.container { width: min(1140px, 92%); margin: 0 auto; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--blue); color: #fff; padding: 0.6rem 1rem;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- Eyebrow label ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--blue);
  display: block;
  margin-bottom: 0.75rem;
}
.on-dark .eyebrow { color: var(--blue-bright); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  padding: 0.8rem 1.9rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-deep); color: #fff; }
.btn-outline { border-color: var(--blue); color: var(--blue); background: transparent; }
.btn-outline:hover { background: var(--blue); color: #fff; }
.on-dark .btn-outline { border-color: rgba(255,255,255,0.6); color: #fff; }
.on-dark .btn-outline:hover { background: #fff; color: var(--dark); border-color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 1rem;
}
.brand { display: flex; align-items: center; gap: 0.8rem; color: #fff; }
.brand:hover { color: #fff; }
.brand img.mark { width: 44px; height: 44px; }
.brand .brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand .brand-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: 0.04em;
}
.brand .brand-sub {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  opacity: 0.62;
}

.main-nav ul { display: flex; align-items: center; gap: 1.9rem; list-style: none; padding: 0; }
.main-nav a {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.82);
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover { color: #fff; }
.main-nav a.active { color: #fff; border-bottom-color: var(--blue-bright); }
.main-nav .nav-cta {
  background: var(--blue);
  color: #fff;
  padding: 0.55rem 1.3rem;
  border-radius: var(--radius);
  border-bottom: none;
}
.main-nav .nav-cta:hover { background: var(--blue-bright); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  width: 44px; height: 44px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
}
.nav-toggle span {
  display: block; width: 26px; height: 2px;
  background: #fff;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(ellipse at 75% 20%, rgba(36, 112, 168, 0.28), transparent 55%),
    var(--dark);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='%232470A8' stroke-opacity='0.16' stroke-width='1.5'%3E%3Cpath d='M20 20h50l20 20v40'/%3E%3Cpath d='M140 140H90l-20-20V80'/%3E%3Cpath d='M20 140V100l20-20h30'/%3E%3C/g%3E%3Cg fill='%232470A8' fill-opacity='0.28'%3E%3Ccircle cx='20' cy='20' r='3'/%3E%3Ccircle cx='90' cy='80' r='3'/%3E%3Ccircle cx='140' cy='140' r='3'/%3E%3Ccircle cx='20' cy='140' r='3'/%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.55;
  pointer-events: none;
}
.hero .container {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 3rem;
  padding: 5.5rem 0 6rem;
}
.hero h1 { color: #fff; margin-bottom: 1.2rem; }
.hero h1 .accent { color: var(--blue-bright); }
.hero p.lead {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.78);
  max-width: 34rem;
  margin-bottom: 2.2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero-art { display: flex; justify-content: center; }
.hero-art img {
  width: min(340px, 70vw);
  filter: drop-shadow(0 0 60px var(--accent-glow));
}

/* ---------- Sections ---------- */
.section { padding: 5rem 0; }
.section.alt { background: var(--bg-soft); }
.section-head { max-width: 46rem; margin: 0 auto 3rem; text-align: center; }
.section-head p { margin-top: 0.9rem; }

/* ---------- Cards ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.6rem; }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.7rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-4px); border-color: var(--blue); }
.card .icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: rgba(36, 112, 168, 0.1);
  color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.2rem;
}
.card .icon svg { width: 28px; height: 28px; }
.card h3 { margin-bottom: 0.6rem; }
.card p { font-size: 0.98rem; flex: 1; }
.card .more {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  margin-top: 1.1rem;
}

/* ---------- Process steps ---------- */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.2rem; counter-reset: step; }
.step { text-align: center; padding: 0 0.4rem; }
.step .num {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.1rem;
  width: 56px; height: 56px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  border: 2px solid var(--blue);
  color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  background: var(--white);
}
.step h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.step p { font-size: 0.9rem; }

/* ---------- Feature list ---------- */
.feature-list { list-style: none; padding: 0; display: grid; gap: 1.1rem; }
.feature-list li { display: flex; gap: 0.9rem; align-items: flex-start; }
.feature-list .tick {
  flex: 0 0 26px; height: 26px; margin-top: 0.2rem;
  border-radius: 50%;
  background: rgba(36, 112, 168, 0.12);
  color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem;
}
.feature-list strong { color: var(--ink); }

/* ---------- Split layout ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: center; }
.split .visual {
  background: var(--dark);
  border-radius: var(--radius);
  padding: 3.5rem;
  display: flex; align-items: center; justify-content: center;
}
.split .visual img { width: min(260px, 60%); }

/* ---------- Stats band ---------- */
.stats-band { background: var(--dark-2); color: #fff; padding: 3.4rem 0; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; text-align: center; }
.stat .value {
  font-family: var(--font-head);
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  font-weight: 700;
  color: var(--blue-bright);
}
.stat .label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

/* ---------- CTA band ---------- */
.cta-band {
  background:
    radial-gradient(ellipse at 20% 10%, rgba(36, 112, 168, 0.35), transparent 60%),
    var(--dark);
  color: #fff;
  text-align: center;
  padding: 4.5rem 0;
}
.cta-band h2 { color: #fff; margin-bottom: 0.9rem; }
.cta-band p { color: rgba(255, 255, 255, 0.75); max-width: 38rem; margin: 0 auto 2rem; }

/* ---------- Page hero (subpages) ---------- */
.page-hero {
  background:
    radial-gradient(ellipse at 80% 0%, rgba(36, 112, 168, 0.3), transparent 55%),
    var(--dark);
  color: #fff;
  text-align: center;
  padding: 4rem 0;
}
.page-hero h1 { color: #fff; }
.page-hero p { color: rgba(255, 255, 255, 0.75); max-width: 40rem; margin: 0.9rem auto 0; }

/* ---------- Service detail ---------- */
.service-detail { display: grid; grid-template-columns: 64px 1fr; gap: 1.6rem; padding: 2.4rem 0; border-bottom: 1px solid var(--line); }
.service-detail:last-child { border-bottom: none; }
.service-detail .icon {
  width: 64px; height: 64px;
  border-radius: 14px;
  background: rgba(36, 112, 168, 0.1);
  color: var(--blue);
  display: flex; align-items: center; justify-content: center;
}
.service-detail .icon svg { width: 32px; height: 32px; }
.service-detail h3 { font-size: 1.35rem; margin-bottom: 0.5rem; }
.service-detail ul { margin-top: 0.8rem; display: grid; gap: 0.35rem; }

/* ---------- Contact ---------- */
.contact-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 3rem; align-items: start; }
.contact-info .info-item {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 1.3rem 0;
  border-bottom: 1px solid var(--line);
}
.contact-info .info-item:last-child { border-bottom: none; }
.contact-info .icon {
  flex: 0 0 48px; height: 48px;
  border-radius: 12px;
  background: rgba(36, 112, 168, 0.1);
  color: var(--blue);
  display: flex; align-items: center; justify-content: center;
}
.contact-info .icon svg { width: 24px; height: 24px; }
.contact-info h3 { font-size: 1.05rem; margin-bottom: 0.2rem; }

.contact-form {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.2rem;
}
.form-row { margin-bottom: 1.3rem; }
.form-row label {
  display: block;
  font-family: var(--font-head);
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}
.form-row input,
.form-row textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  padding: 0.75rem 0.9rem;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--blue);
  background: var(--white);
}
.form-note { font-size: 0.85rem; color: var(--gray); margin-top: 0.9rem; }
.honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.72);
  padding: 3.5rem 0 2rem;
  font-size: 0.95rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.site-footer .footer-logo { width: 200px; margin-bottom: 1rem; }
.site-footer h4 {
  color: #fff;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.site-footer ul { list-style: none; padding: 0; display: grid; gap: 0.55rem; }
.site-footer a { color: rgba(255, 255, 255, 0.72); }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem;
  padding-top: 1.6rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.45);
}

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card:hover { transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; text-align: center; padding: 3.5rem 0 4rem; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-art { order: -1; }
  .hero-art img { width: min(200px, 45vw); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 2rem; }
  .split, .contact-layout { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; row-gap: 2rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--dark);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: none;
  }
  .main-nav.open { display: block; }
  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 4%;
  }
  .main-nav li { border-top: 1px solid rgba(255, 255, 255, 0.07); }
  .main-nav li:first-child { border-top: none; }
  .main-nav a { display: block; padding: 0.9rem 0.2rem; border-bottom: none; }
  .main-nav .nav-cta { margin: 0.8rem 0.2rem 1rem; text-align: center; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .section { padding: 3.5rem 0; }
  .service-detail { grid-template-columns: 1fr; }
  .contact-form { padding: 1.5rem; }
}


/* ==========================================================================
   WordPress integration
   ========================================================================== */

/* Highlight current page set by WordPress menus */
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a { color: #fff; border-bottom-color: var(--blue-bright); }
@media (max-width: 720px) {
  .main-nav .current-menu-item > a,
  .main-nav .current_page_item > a { border-bottom: none; }
}

/* Generic page content (page.php) */
.entry-content { max-width: 46rem; margin: 0 auto; }
.entry-content h2, .entry-content h3 { margin: 1.6rem 0 0.6rem; }
.entry-content p, .entry-content ul, .entry-content ol { margin-bottom: 1rem; }
.entry-content img { border-radius: var(--radius); }

/* Form feedback notices on the contact page */
.form-notice {
  padding: 0.9rem 1.1rem;
  border-radius: 8px;
  margin-bottom: 1.4rem;
  font-size: 0.97rem;
}
.form-notice.success { background: #E8F5EC; color: #1F6B38; border: 1px solid #BCE3C8; }
.form-notice.error { background: #FBECEC; color: #9B2C2C; border: 1px solid #F2CACA; }

/* ==========================================================================
   Cookie consent banner & settings dialog
   ========================================================================== */

.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 150;
  background: var(--dark);
  color: rgba(255, 255, 255, 0.85);
  border-top: 2px solid var(--blue);
  box-shadow: 0 -8px 30px rgba(18, 22, 31, 0.35);
  padding: 1.2rem 0;
}
.cookie-banner .container {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.cookie-banner p { margin: 0; font-size: 0.93rem; flex: 1 1 22rem; line-height: 1.55; }
.cookie-banner a { color: var(--blue-bright); text-decoration: underline; }
.cookie-banner .cookie-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.cookie-banner .btn { padding: 0.55rem 1.2rem; font-size: 0.92rem; }
.cookie-banner .btn-ghost {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.85);
}
.cookie-banner .btn-ghost:hover { border-color: #fff; color: #fff; }

.cookie-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 160;
  background: rgba(18, 22, 31, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.cookie-modal {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(18, 22, 31, 0.4);
  width: min(560px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
}
.cookie-modal h2 { font-size: 1.4rem; margin-bottom: 0.4rem; }
.cookie-modal > p { font-size: 0.95rem; margin-bottom: 1.4rem; }
.cookie-modal .cookie-close {
  position: absolute;
  top: 0.9rem; right: 0.9rem;
  width: 38px; height: 38px;
  border: none;
  border-radius: 8px;
  background: var(--bg-soft);
  color: var(--ink);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}
.cookie-modal .cookie-close:hover { background: var(--line); }

.cookie-cat {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
}
.cookie-cat:last-of-type { border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; }
.cookie-cat h3 { font-size: 1.02rem; margin-bottom: 0.25rem; }
.cookie-cat p { font-size: 0.88rem; margin: 0; }
.cookie-cat .always-on {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  white-space: nowrap;
  padding-top: 0.35rem;
}

/* Toggle switch */
.switch { position: relative; display: inline-block; flex: 0 0 52px; width: 52px; height: 28px; margin-top: 0.2rem; }
.switch input { opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; position: absolute; z-index: 2; }
.switch .slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #C7CDD4;
  transition: background 0.2s ease;
}
.switch .slider::before {
  content: "";
  position: absolute;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #fff;
  top: 3px; left: 3px;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.switch input:checked + .slider { background: var(--blue); }
.switch input:checked + .slider::before { transform: translateX(24px); }
.switch input:focus-visible + .slider { outline: 3px solid var(--blue-bright); outline-offset: 2px; }

.cookie-modal .cookie-modal-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }

@media (max-width: 600px) {
  .cookie-banner .cookie-actions { width: 100%; }
  .cookie-banner .btn { flex: 1 1 auto; text-align: center; }
  .cookie-modal { padding: 1.4rem; }
}

[hidden] { display: none !important; }
