/*
Theme Name: APHS 2026
Theme URI: https://www.aphsltd.com/
Author: APHS Ltd
Description: Block theme for APHS Ltd — cyber security and AI consultancy. Every heading, paragraph and button is editable in WordPress. Uses system fonts, so the site makes no third-party font requests.
Version: 3.0.0
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aphs-2026
Tags: business, blog, block-patterns, full-site-editing, one-column, wide-blocks, accessibility-ready
*/

/* Only what theme.json cannot express. Everything else is editable in WordPress. */

:root{
  --aphs-glow: 0 1px 2px rgba(11,26,41,.05), 0 14px 34px -18px rgba(11,26,41,.30);
}

/* ---- sticky header ----
   The frosted-glass effect is painted on a pseudo-element rather than on the
   header itself. backdrop-filter turns an element into the containing block
   for any position:fixed descendant, which would trap the mobile menu overlay
   inside the header strip and make the menu button appear to do nothing. */
.wp-site-blocks > header.wp-block-template-part{
  position: sticky; top: 0; z-index: 50;
  background: transparent;
  border-bottom: 1px solid var(--wp--preset--color--rule);
}
.wp-site-blocks > header.wp-block-template-part::before{
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(255,255,255,.90);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
}
.admin-bar .wp-site-blocks > header.wp-block-template-part{ top: 32px; }
@media (max-width: 782px){ .admin-bar .wp-site-blocks > header.wp-block-template-part{ top: 46px; } }

/* ---- small caps label ---- */
.aphs-eyebrow{
  font-family: var(--wp--preset--font-family--mono);
  font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--wp--preset--color--accent); font-weight: 500;
}
.aphs-eyebrow.is-dim{ color: var(--wp--preset--color--muted); }

/* ---- service / news cards ---- */
.aphs-card{
  position: relative;
  border: 1px solid var(--wp--preset--color--rule);
  border-radius: 12px;
  background: var(--wp--preset--color--ground);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
  height: 100%;
}
.aphs-card:hover{
  border-color: var(--wp--preset--color--rule-strong);
  box-shadow: var(--aphs-glow);
  transform: translateY(-2px);
}
/* icon chip inside a service card */
.aphs-card .aphs-icon{
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  margin: 0 auto 18px 0 !important;
  border: 1px solid var(--wp--preset--color--rule);
  border-radius: 12px;
  background: rgba(10,109,189,.07);
}
.aphs-card .aphs-icon img{
  display: block; width: 26px; height: 26px; max-width: none;
}
.aphs-icon-row .aphs-icon{ margin: 0 !important; }
.aphs-icon-row{ align-items: center; }
.aphs-card:hover .aphs-icon{ border-color: var(--wp--preset--color--rule-strong); }

/* number sitting beside a card heading */
.aphs-title-row{
  align-items: baseline;
  margin: 0 0 2px;
}
/* the six service cards keep a fixed title height so their body copy lines up */
.aphs-card .aphs-title-row.is-tall{ min-height: 3.2rem; }
.aphs-title-row .aphs-eyebrow{ flex: 0 0 auto; margin: 0; }
.aphs-title-row h3{ margin: 0 !important; }

/* headings never snap mid-word; hyphenate only if they truly cannot fit */
h1, h2, h3, h4, h5, h6{
  overflow-wrap: normal;
  word-break: normal;
  -webkit-hyphens: none;
  hyphens: none;
}

/* section headings sit in a narrow column, so they take a smaller size */
.aphs-sectionhead h2{
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.2;
}

/* long technical words in narrow cards */
.aphs-card p{
  text-wrap: pretty;
  -webkit-hyphens: none;
  hyphens: none;
  overflow-wrap: break-word;
}

/* the whole card is the link */
.aphs-card h3 a::after,
.aphs-card .wp-block-post-title a::after{
  content: ""; position: absolute; inset: 0; z-index: 2;
}
.aphs-card a{ text-decoration: none; }
.aphs-card a:hover{ text-decoration: underline; }

/* portrait placeholder in a person card */
.aphs-person .aphs-portrait{ margin: 20px 0 0 !important; }
.aphs-person .aphs-portrait img{
  display: block; width: 150px; height: 150px; max-width: 100%;
  border-radius: 12px; object-fit: cover;
  border: 1px solid var(--wp--preset--color--rule);
  background: var(--wp--preset--color--surface);
}

/* ---- services dropdown ---- */
.aphs-navwrap .wp-block-navigation .wp-block-navigation__submenu-container{
  min-width: 274px;
  padding: 8px;
  border: 1px solid var(--wp--preset--color--rule);
  border-radius: 12px;
  background: var(--wp--preset--color--ground);
  box-shadow: var(--aphs-glow);
}
.aphs-navwrap .wp-block-navigation__submenu-container .wp-block-navigation-item__content{
  display: block; white-space: nowrap;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: .92rem;
  color: var(--wp--preset--color--ink);
}
.aphs-navwrap .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover,
.aphs-navwrap .wp-block-navigation__submenu-container .wp-block-navigation-item__content:focus{
  background: var(--wp--preset--color--surface);
  color: var(--wp--preset--color--accent);
  text-decoration: none;
}
.aphs-navwrap .wp-block-navigation__submenu-icon{ margin-left: 4px; }

/* inside the mobile overlay the submenu is a plain indented list */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container{
  min-width: 0; padding: 0; border: 0; box-shadow: none; background: transparent;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content{
  padding: 6px 0 6px 18px; font-size: 1rem;
}

/* ---- reference link lists ---- */
.aphs-links{ list-style: none; margin-left: 0; padding-left: 0; }
.aphs-links li{
  padding: 12px 0;
  border-top: 1px solid var(--wp--preset--color--rule);
  font-size: .96rem;
  color: var(--wp--preset--color--muted);
}
.aphs-links li:last-child{ border-bottom: 1px solid var(--wp--preset--color--rule); }
.aphs-links a{ color: var(--wp--preset--color--ink); font-weight: 500; }

/* ---- news reel ---- */
.aphs-reel{
  position: relative;
  width: min(1180px, calc(100vw - 40px));
  max-width: none;
  left: 50%;
  transform: translateX(-50%);
}
.aphs-reel .wp-block-post-template.is-layout-flex{
  align-items: stretch;
  gap: 24px;
  margin: 0;
  padding: 4px 2px 20px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--wp--preset--color--rule-strong) transparent;
}
.aphs-reel .wp-block-post-template.is-layout-flex > li{
  flex: 0 0 clamp(255px, 80vw, 336px);
  scroll-snap-align: start;
  display: flex;
}
.aphs-reel .wp-block-post-template.is-layout-flex > li > .aphs-card{
  width: 100%;
}
.aphs-reel .wp-block-post-template.is-layout-flex::-webkit-scrollbar{ height: 8px; }
.aphs-reel .wp-block-post-template.is-layout-flex::-webkit-scrollbar-thumb{
  background: var(--wp--preset--color--rule-strong); border-radius: 4px;
}
.aphs-reel-btn{
  position: absolute; top: 92px; z-index: 4;
  display: none;
  width: 44px; height: 44px; padding: 0;
  align-items: center; justify-content: center;
  border: 1px solid var(--wp--preset--color--rule-strong);
  border-radius: 50%;
  background: var(--wp--preset--color--ground);
  color: var(--wp--preset--color--ink);
  box-shadow: var(--aphs-glow);
  cursor: pointer;
  transition: opacity .15s ease, border-color .15s ease;
}
.aphs-reel.has-overflow .aphs-reel-btn{ display: flex; }
.aphs-reel-btn:hover{ border-color: var(--wp--preset--color--accent); color: var(--wp--preset--color--accent); }
.aphs-reel-btn[disabled]{ opacity: .3; cursor: default; }
.aphs-reel-prev{ left: -22px; }
.aphs-reel-next{ right: -22px; }
.aphs-reel-prev svg{ transform: rotate(180deg); }
@media (max-width: 1260px){
  .aphs-reel-prev{ left: 4px; }
  .aphs-reel-next{ right: 4px; }
}
@media (max-width: 781px){
  .aphs-reel-btn{ display: none !important; }
}

/* ---- gentle reveal on scroll ---- */
.aphs-reveal{
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1);
  will-change: opacity, transform;
}
.aphs-reveal.is-in{ opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce){
  .aphs-reveal{ opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---- abstract artwork ---- */
.aphs-art img{
  display: block; width: 100%; height: auto;
  border: 1px solid var(--wp--preset--color--rule);
  border-radius: 14px;
}
.aphs-art{ margin: 0 !important; }

/* header emblem */
.aphs-logo{ margin: 0 !important; }
.aphs-logo img{ display: block; width: 38px; height: 44px; }

/* ---- interactive segmentation diagram ---- */
.aphs-diagram{
  border: 1px solid var(--wp--preset--color--rule);
  border-radius: 14px;
  background: var(--wp--preset--color--ground);
  padding: 22px;
}
.aphs-diagram svg{ display: block; width: 100%; height: auto; }
.aphs-zone{ cursor: pointer; outline: none; }
.aphs-zone .zone-box{
  fill: #F2F7FB; stroke: var(--wp--preset--color--rule-strong); stroke-width: 1.6;
  transition: fill .18s ease, stroke .18s ease;
}
.aphs-zone .zone-label{ fill: var(--wp--preset--color--ink); font-size: 15px; font-weight: 500; }
.aphs-zone .zone-dot{ fill: var(--wp--preset--color--accent); opacity: .5; transition: opacity .18s ease; }
.aphs-zone:hover .zone-box,
.aphs-zone:focus .zone-box,
.aphs-zone.is-active .zone-box{ fill: #E4EFF9; stroke: var(--wp--preset--color--accent); }
.aphs-zone:hover .zone-dot,
.aphs-zone:focus .zone-dot,
.aphs-zone.is-active .zone-dot{ opacity: 1; }
.aphs-diagram .zone-link{ stroke: var(--wp--preset--color--rule-strong); stroke-width: 1.6; fill: none; }
.aphs-diagram .zone-deny{ stroke-dasharray: 5 6; }
.aphs-diagram-readout{
  margin-top: 18px; padding-top: 16px;
  border-top: 1px solid var(--wp--preset--color--rule);
  min-height: 92px;
}
.aphs-diagram-title{
  margin: 0; font-size: 1.06rem; font-weight: 600; color: var(--wp--preset--color--ink);
}
.aphs-diagram-body{
  margin: 8px 0 0; font-size: .95rem; color: var(--wp--preset--color--body); line-height: 1.6;
}

/* ---- what do you need? chooser ---- */
.aphs-chooser-opts{ display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 24px; padding: 0; }
.aphs-chooser-opt{
  font: inherit; font-size: .93rem; line-height: 1.35;
  text-align: left; cursor: pointer;
  padding: 11px 16px;
  border: 1px solid var(--wp--preset--color--rule-strong);
  border-radius: 999px;
  background: var(--wp--preset--color--ground);
  color: var(--wp--preset--color--ink);
  transition: border-color .16s ease, background .16s ease, color .16s ease;
}
.aphs-chooser-opt:hover{ border-color: var(--wp--preset--color--accent); color: var(--wp--preset--color--accent); }
.aphs-chooser-opt.is-on{
  background: var(--wp--preset--color--accent); border-color: var(--wp--preset--color--accent); color: #fff;
}
.aphs-chooser-result{
  border: 1px solid var(--wp--preset--color--rule);
  border-radius: 14px;
  background: var(--wp--preset--color--ground);
  padding: 26px 28px;
}
.aphs-chooser-name{ margin: 0; font-size: 1.28rem; font-weight: 600; color: var(--wp--preset--color--ink); }
.aphs-chooser-why{ margin: 10px 0 0; color: var(--wp--preset--color--body); line-height: 1.65; }
.aphs-chooser-link{ display: inline-block; margin-top: 16px; font-weight: 500; }
.aphs-chooser:not(.is-answered) .aphs-chooser-link{ display: none; }

/* ---- article featured image ---- */
.aphs-postimg img{
  width: 100%; height: 420px; object-fit: cover;
  border-radius: 14px; display: block;
}
@media (max-width: 781px){
  .aphs-postimg img{ height: 240px; }
}

/* ---- footer ---- */
.wp-site-blocks > footer .wp-block-list{
  list-style: none; margin-left: 0; padding-left: 0;
}
.wp-site-blocks > footer a{ text-decoration: none; color: var(--wp--preset--color--ink); }
.wp-site-blocks > footer a:hover{ text-decoration: underline; color: var(--wp--preset--color--accent); }

/* ---- links on the dark bands ---- */
.has-deep-background-color a:not(.wp-element-button){
  color: #9FD0F5; text-decoration: none;
  border-bottom: 1px solid rgba(159,208,245,.4);
}
.has-deep-background-color a:not(.wp-element-button):hover{
  color: #fff; border-bottom-color: #fff;
}

/* ---- hero wash ---- */
.aphs-hero{ position: relative; overflow: hidden; }
.aphs-hero::before{
  content: ""; position: absolute; left: 50%; top: -140px;
  width: 900px; height: 520px; transform: translateX(-30%);
  pointer-events: none; z-index: 0;
  background: radial-gradient(closest-side, rgba(10,109,189,.09), transparent 72%);
}
.aphs-hero > *{ position: relative; z-index: 1; }

/* ---- panel that holds the emblem ---- */
.aphs-panel{
  background: var(--wp--preset--color--deep);
  border: 1px solid rgba(120,180,240,.22);
  border-radius: 20px;
  box-shadow: var(--aphs-glow);
  isolation: isolate;
}
.aphs-panel img{ mix-blend-mode: screen; display: block; }

/* ---- facts strip ---- */
.aphs-facts{ border-top: 1px solid var(--wp--preset--color--rule); }
.aphs-facts .wp-block-column{ border-right: 1px solid var(--wp--preset--color--rule); }
.aphs-facts .wp-block-column:last-child{ border-right: 0; }
@media (max-width: 781px){ .aphs-facts .wp-block-column{ border-right: 0; border-bottom: 1px solid var(--wp--preset--color--rule); } }
.aphs-figure{
  font-family: var(--wp--preset--font-family--mono);
  font-size: 1.85rem; font-weight: 500; letter-spacing: -.02em;
  color: var(--wp--preset--color--accent); font-variant-numeric: tabular-nums;
}

/* ---- readable measure for long copy ---- */
.aphs-measure{ max-width: 36em; }
/* keep measured text at the same left edge as its full-width siblings */
.wp-site-blocks .aphs-measure{
  margin-left: max(0px, calc((100% - var(--wp--style--global--wide-size)) / 2)) !important;
  margin-right: auto !important;
}

/* ---- skip link and focus ---- */
:focus-visible{ outline: 2px solid var(--wp--preset--color--accent); outline-offset: 3px; }

/* ---- navigation ---- */
.wp-block-navigation .wp-block-navigation-item__content{ padding: 9px 13px; border-radius: 5px; }
.wp-block-navigation .wp-block-navigation-item__content:hover{ background: var(--wp--preset--color--surface-two); }
.wp-block-navigation .current-menu-item .wp-block-navigation-item__content{ color: var(--wp--preset--color--accent); font-weight: 600; }

/* ---- card headings read as headings, not links ---- */
.aphs-card h2 a, .aphs-card h3 a, .aphs-card .wp-block-post-title a{
  color: var(--wp--preset--color--ink);
  text-decoration: none;
}
.aphs-card h2 a:hover, .aphs-card h3 a:hover, .aphs-card .wp-block-post-title a:hover{
  color: var(--wp--preset--color--accent);
  text-decoration: none;
}

/* ---- header sizing ---- */
.aphs-navwrap .wp-block-navigation{ font-size: .88rem; }
.aphs-navwrap .wp-block-navigation__container{ gap: 2px; }
@media (max-width: 900px){
  .aphs-headcta{ display: none; }
}

/* ---- site title next to the emblem ---- */
.wp-block-site-title a{ text-decoration: none; }

/* ---- forms (Contact Form 7) ----
   The old theme styled these; this one needs its own rules so the enquiry
   form matches the rest of the site rather than falling back to browser
   defaults. */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 input[type="number"],
.wpcf7 textarea,
.wpcf7 select{
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font-family: var(--wp--preset--font-family--serif);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--wp--preset--color--ink);
  background: var(--wp--preset--color--ground);
  border: 1px solid var(--wp--preset--color--rule-strong);
  border-radius: 6px;
  padding: 12px 14px;
  margin: 0;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.wpcf7 textarea{ min-height: 170px; resize: vertical; }
.wpcf7 input::placeholder,
.wpcf7 textarea::placeholder{ color: var(--wp--preset--color--muted); opacity: 1; }
.wpcf7 input:focus,
.wpcf7 textarea:focus,
.wpcf7 select:focus{
  outline: none;
  border-color: var(--wp--preset--color--accent);
  box-shadow: 0 0 0 3px rgba(10,109,189,.14);
}
.wpcf7 p{ margin: 0 0 16px; }
.wpcf7 label{
  display: block;
  font-family: var(--wp--preset--font-family--sans);
  font-size: .85rem;
  font-weight: 600;
  color: var(--wp--preset--color--ink);
  margin-bottom: 6px;
}
.wpcf7 .wpcf7-form-control-wrap{ display: block; }

.wpcf7 input[type="submit"],
.wpcf7 button[type="submit"],
.wpcf7 .wpcf7-submit{
  font-family: var(--wp--preset--font-family--sans);
  font-size: .97rem;
  font-weight: 600;
  color: #fff;
  background: var(--wp--preset--color--accent);
  border: 0;
  border-radius: 5px;
  padding: 13px 26px;
  cursor: pointer;
  transition: background .15s ease;
}
.wpcf7 input[type="submit"]:hover,
.wpcf7 button[type="submit"]:hover,
.wpcf7 .wpcf7-submit:hover{ background: var(--wp--preset--color--accent-dark); }
.wpcf7 input[type="submit"]:disabled,
.wpcf7 button[type="submit"]:disabled{ opacity: .6; cursor: default; }

/* keep the form inside its column */
.wpcf7, .wpcf7 form, .wpcf7 .wpcf7-form-control-wrap{ max-width: 100%; }
.wpcf7 *{ box-sizing: border-box; }

.wpcf7 .wpcf7-not-valid-tip{
  font-family: var(--wp--preset--font-family--sans);
  font-size: .82rem;
  color: #B3261E;
  margin-top: 6px;
}
.wpcf7 .wpcf7-not-valid{ border-color: #B3261E; }
.wpcf7-response-output{
  font-family: var(--wp--preset--font-family--sans);
  font-size: .9rem;
  border-radius: 6px;
  padding: 14px 16px !important;
  margin: 18px 0 0 !important;
  border-width: 1px !important;
}
.wpcf7 .wpcf7-spinner{ margin-left: 10px; }
.wpcf7 .g-recaptcha, .wpcf7 .grecaptcha-badge{ margin-bottom: 16px; }
