/* ===================================================
   Newbury Oak — Design System
   Concept 3: The Studio
   Palatino/Georgia display · Helvetica Neue/Arial body
   White ground · pale-blue washes · #1965C9 throughout
   =================================================== */

/* --- Reset & base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: #1965C9;
  background: #ffffff;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: #1965C9; }
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #1965C9;
  outline-offset: 3px;
  border-radius: 2px;
}

/* --- Colour tokens ---
   Primary text/accent : #1965C9
   Tinted section bg   : #F0F5FD
   Pale wash           : #E6EEFA
   Border/divider      : #C4D6F0
   All visible text    : #1965C9 (fully opaque)
*/

/* --- Typography --- */
.eyebrow {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #1965C9;
  margin-bottom: 0.8rem;
  display: block;
}

h1 { color: #1965C9; }
h2 {
  font-family: Palatino, 'Palatino Linotype', Georgia, serif;
  font-size: clamp(1.55rem, 3.2vw, 2.3rem);
  font-weight: normal;
  line-height: 1.22;
  color: #1965C9;
  margin-bottom: 1.25rem;
}
h3 {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #1965C9;
  margin-bottom: 0.55rem;
  letter-spacing: 0.01em;
}
p { margin-bottom: 1rem; color: #1965C9; }
p:last-child { margin-bottom: 0; }

.body-lg {
  font-family: Palatino, 'Palatino Linotype', Georgia, serif;
  font-size: clamp(1.05rem, 1.8vw, 1.18rem);
  line-height: 1.72;
  margin-bottom: 1.2rem;
  color: #1965C9;
}

.text-link {
  color: #1965C9;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: #1965C9;
}
.text-link:hover { text-decoration-thickness: 2px; }

/* --- Hero headings --- */
.hero-heading {
  display: block;
  margin-bottom: 1.5rem;
}
.hero-line-a {
  display: block;
  font-family: Palatino, 'Palatino Linotype', Georgia, serif;
  font-size: clamp(1.9rem, 4.2vw, 3.2rem);
  font-weight: normal;
  line-height: 1.15;
  color: #1965C9;
  letter-spacing: -0.01em;
  margin-bottom: 0.45rem;
}
.hero-line-b {
  display: block;
  font-family: Palatino, 'Palatino Linotype', Georgia, serif;
  font-size: clamp(1.3rem, 2.6vw, 2rem);
  font-weight: normal;
  line-height: 1.25;
  color: #1965C9;
  letter-spacing: 0;
  opacity: 1;
}
.hero-body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: clamp(0.95rem, 1.6vw, 1.08rem);
  line-height: 1.7;
  margin-bottom: 2rem;
  color: #1965C9;
}

/* --- Layout --- */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}
.asymmetric {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2.5rem 5rem;
  align-items: start;
}
.section {
  padding: 5rem 0;
}
.section--tinted {
  background: #F0F5FD;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.75rem 1.875rem;
  border-radius: 3px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.16s, border-color 0.16s;
  min-height: 48px;
  line-height: 1.3;
}
.btn--outline {
  border: 1.5px solid #1965C9;
  background: transparent;
  color: #1965C9;
}
.btn--outline:hover {
  background: #E6EEFA;
  border-color: #1965C9;
  color: #1965C9;
}

/* --- Site header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.97);
  border-bottom: 1px solid #C4D6F0;
  backdrop-filter: blur(4px);
}
.header-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.logo-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-mark { width: 36px; height: 36px; flex-shrink: 0; }
.logo-mark--sm { width: 28px; height: 28px; }
.logo-wordmark {
  font-family: Palatino, 'Palatino Linotype', Georgia, serif;
  font-size: 1.1rem;
  color: #1965C9;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* --- Nav --- */
.site-nav { display: flex; align-items: center; }
.nav-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.15rem;
}
.nav-link {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: #1965C9;
  text-decoration: none;
  padding: 0.5rem 0.8rem;
  border-radius: 3px;
  transition: background 0.14s;
  white-space: nowrap;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.nav-link:hover { background: #E6EEFA; }
.nav-link--active { font-weight: 700; }
.nav-link--cta {
  border: 1.5px solid #1965C9;
  margin-left: 0.6rem;
  padding: 0.4rem 1rem;
}
.nav-link--cta:hover { background: #E6EEFA; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  color: #1965C9;
}
.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 22px;
  height: 2px;
  background: #1965C9;
  border-radius: 2px;
  transition: transform 0.18s, opacity 0.18s;
  position: relative;
}
.hamburger::before, .hamburger::after {
  content: '';
  position: absolute;
  left: 0;
}
.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .hamburger { background: transparent; }
.nav-toggle[aria-expanded="true"] .hamburger::before { transform: rotate(45deg); top: 0; }
.nav-toggle[aria-expanded="true"] .hamburger::after { transform: rotate(-45deg); top: 0; }

/* --- Hero --- */
.hero {
  padding: 5.5rem 0 4.5rem;
  position: relative;
  overflow: hidden;
}
.hero-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}
.hero-text { max-width: 660px; position: relative; z-index: 1; }

/* Broad left-edge pale wash — not a discrete shape */
.hero-wash {
  position: absolute;
  top: -60px;
  left: -120px;
  width: 340px;
  bottom: -60px;
  background: linear-gradient(to right, #E6EEFA 0%, rgba(230,238,250,0) 100%);
  pointer-events: none;
  z-index: 0;
}
/* software page: right-edge wash */
.hero-wash--right {
  left: auto;
  right: -120px;
  background: linear-gradient(to left, #E6EEFA 0%, rgba(230,238,250,0) 100%);
}

/* --- Portfolio showcase --- */
.portfolio-intro {
  max-width: 640px;
  margin-bottom: 2.5rem;
}
/* Twelve genuine product views; source order is also reading order. */
.showcase-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2rem 1.5rem; }
.showcase-item { margin: 0; min-width: 0; grid-column: span 3; }
.showcase-item--lead { grid-column: span 4; }
.showcase-item--narrow { grid-column: span 2; }
.showcase-item--wide { grid-column: 1 / -1; }
.showcase-link { display: flex; position: relative; align-items: center; justify-content: center; height: 340px; overflow: hidden; padding: 16px; background: #fff; border: 1px solid #C4D6F0; border-radius: 12px; box-shadow: 0 14px 30px -22px rgba(25,101,201,.35); transition: box-shadow .18s, transform .18s; }
.showcase-link:hover { box-shadow: 0 18px 32px -18px rgba(25,101,201,.5); transform: translateY(-2px); }
.showcase-link img { display: block; width: 100%; height: 100%; object-fit: contain; }
.showcase-item--wide .showcase-link { height: 430px; padding: 24px; }
.showcase-item--phone .showcase-link { background: #F1F6FE; padding: 18px; }
.showcase-item--extension .showcase-link { align-items: flex-start; background: #F1F6FE; }
.showcase-item--extension .showcase-link img { width: 210px; height: auto; max-width: 100%; flex: none; }
.showcase-item--extension .showcase-link,
.showcase-item--extension + .showcase-item--phone .showcase-link { height: 460px; }
.showcase-item--device-crop .showcase-link { padding: 0; }
.showcase-item--device-crop .showcase-link img { object-fit: cover; }
.showcase-enlarge { position: absolute; right: 12px; bottom: 12px; padding: 5px 10px; border-radius: 20px; border: 1px solid #C4D6F0; background: #fff; color: #1965C9; font-size: .7rem; font-weight: 600; }
.showcase-item figcaption { margin-top: .85rem; color: #1965C9; }
.showcase-brand { display: block; font-size: .74rem; letter-spacing: .04em; margin-bottom: .2rem; }
.showcase-title { display: block; font-size: 1rem; font-weight: 600; line-height: 1.4; }

/* --- Themes list (software page) --- */
.themes-list {
  list-style: none;
  margin-top: 0.25rem;
  margin-bottom: 1.5rem;
}
.theme-item {
  border-top: 1px solid #C4D6F0;
  padding: 1.25rem 0;
}
.theme-item:last-child { border-bottom: 1px solid #C4D6F0; }
.theme-item__title {
  font-family: Palatino, 'Palatino Linotype', Georgia, serif;
  font-size: 1.05rem;
  font-weight: normal;
  color: #1965C9;
  margin-bottom: 0.45rem;
}
.themes-cta-inline { margin-top: 0.5rem; }

/* --- Experience list --- */
.experience-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 0.5rem;
}
.exp-item {
  border-left: 2px solid #C4D6F0;
  padding-left: 1.25rem;
}
.exp-item__title {
  font-family: Palatino, 'Palatino Linotype', Georgia, serif;
  font-size: 1.02rem;
  font-weight: normal;
  color: #1965C9;
  margin-bottom: 0.45rem;
}

/* --- Specialist bridge --- */
.specialist-bridge .container { max-width: 1160px; }
.specialist-bridge__inner {
  display: flex;
  align-items: flex-end;
  gap: 3rem;
  justify-content: space-between;
}
.specialist-bridge__inner > div:first-child { max-width: 600px; }
.specialist-bridge__cta { flex-shrink: 0; padding-bottom: 0.25rem; }

/* --- Contact --- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 3rem 5rem;
  align-items: start;
}
/* --- Footer --- */
.site-footer {
  border-top: 1px solid #C4D6F0;
  padding: 2.5rem 0;
  background: #ffffff;
}
.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2.5rem;
}
.footer-nav { display: flex; gap: 0.25rem; flex-wrap: wrap; margin-left: auto; }
.footer-link {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
  color: #1965C9;
  text-decoration: none;
  padding: 0.35rem 0.6rem;
  border-radius: 3px;
  transition: background 0.14s;
}
.footer-link:hover { background: #E6EEFA; }
.footer-copy {
  width: 100%;
  font-size: 0.78rem;
  color: #1965C9;
  margin: 0;
}

/* ===================================================
   Responsive — ≤ 900px (tablet)
   =================================================== */
@media (max-width: 900px) {
  .asymmetric { grid-template-columns: 1fr; gap: 1.5rem 0; }
  .contact-layout { grid-template-columns: 1fr; gap: 2.5rem; }
  .experience-list { grid-template-columns: 1fr; }
  .specialist-bridge__inner { flex-direction: column; align-items: flex-start; gap: 1.75rem; }
  .specialist-bridge__cta { padding-bottom: 0; }
  .showcase-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .showcase-item, .showcase-item--lead, .showcase-item--narrow { grid-column: span 1; }
  .showcase-item--wide { grid-column: 1 / -1; }
  .showcase-link { height: 280px; }
}

/* ===================================================
   Responsive — ≤ 640px (mobile)
   =================================================== */
@media (max-width: 640px) {
  .section { padding: 3.25rem 0; }
  .hero { padding: 3.25rem 0 2.75rem; }
  .hero-wash { display: none; }

  /* Mobile menu */
  .js .nav-toggle { display: flex; }
  .nav-menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid #C4D6F0;
    padding: 0.75rem 24px 1rem;
    gap: 0.1rem;
    z-index: 99;
  }
  .js .nav-menu { display: none; }
  .js .nav-menu.is-open { display: flex; }
  html:not(.js) .site-header { position: relative; }
  html:not(.js) .header-inner { height: auto; min-height: 68px; flex-wrap: wrap; padding-block: 16px; }
  html:not(.js) .site-nav { width: 100%; }
  html:not(.js) .nav-menu { position: static; width: 100%; padding: 0; border: 0; }
  .nav-link { padding: 0.75rem 0.875rem; min-height: 52px; }
  .nav-link--cta { margin-left: 0; margin-top: 0.5rem; justify-content: center; }
  .header-inner { position: relative; }

  /* Footer */
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 0.875rem; }
  .footer-nav { margin-left: 0; }

  /* Container gutters */
  .container { padding: 0 24px; }
}

/* ===================================================
   Micro — ≤ 360px
   =================================================== */
@media (max-width: 360px) {
  .hero-line-a { font-size: 1.7rem; }
  .hero-line-b { font-size: 1.2rem; }
  h2 { font-size: 1.4rem; }
}

/* Launch contact and keyboard access */
.contact-panel { background: #F0F5FD; border: 1px solid #C4D6F0; border-radius: 6px; padding: clamp(1.25rem, 4vw, 2.5rem); }
.section--tinted .contact-panel { background: #fff; }
.contact-panel h3 { font-family: Palatino, 'Palatino Linotype', Georgia, serif; font-weight: normal; font-size: 1.5rem; line-height: 1.3; margin-bottom: 1rem; }
.contact-email { display: inline-block; overflow-wrap: anywhere; font-size: clamp(1.05rem, 2vw, 1.35rem); text-underline-offset: 5px; padding-block: .5rem; margin-bottom: 1rem; }
.contact-hint { font-size: .85rem; }
.skip-link { position: fixed; top: -100px; left: 16px; background: #fff; border: 2px solid #1965C9; padding: 12px 20px; z-index: 1000; }
.skip-link:focus { top: 10px; }
[id] { scroll-margin-top: 90px; }

.showcase-full-link { display: inline-block; margin-top: .4rem; text-underline-offset: 3px; font-size: .8rem; }

@media (max-width: 640px) {
  .showcase-grid { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
  .showcase-item, .showcase-item--lead, .showcase-item--narrow, .showcase-item--wide { grid-column: 1; }
  .showcase-link, .showcase-item--wide .showcase-link { height: auto; aspect-ratio: 4 / 3; padding: 10px; }
  .showcase-item--phone .showcase-link { height: 380px; aspect-ratio: auto; padding: 16px; }
  .showcase-item--extension .showcase-link { height: 460px; aspect-ratio: auto; padding: 16px; }
  .showcase-item--extension + .showcase-item--phone .showcase-link { height: 380px; }
  .showcase-item--device-crop .showcase-link { padding: 0; }
  .showcase-title { font-size: .94rem; }
}

/* D-028: linked service pages, contact form and readable legal pages. */
.hero--compact { padding-bottom: 3.25rem; }
.service-cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1.5rem; }
.service-card { display: flex; flex-direction: column; padding: 2rem; text-decoration: none; border: 1px solid #C4D6F0; border-radius: 10px; background: #fff; }
.service-card:hover { background: #F8FAFE; }
.service-card h3 { font-size: 1.55rem; line-height: 1.25; margin: .5rem 0 1rem; }
.service-card .text-link { margin-top: auto; padding-top: 1rem; }
.contact-form-panel { background: #F1F6FE; padding: 2rem; border: 1px solid #C4D6F0; border-radius: 10px; }
.contact-note { margin-top: 2rem; font-size: .88rem; }
.form-field { display:flex; flex-direction:column; gap: .45rem; margin-bottom: 1.35rem; }
.form-row { display:grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-field label { font-weight:600; font-size: .94rem; }
.form-field label span { font-weight:400; }
.form-field input,.form-field select,.form-field textarea { width:100%; min-width:0; border:1px solid #9BBCEB; border-radius:5px; padding:.85rem; font:inherit; font-size:1rem; color:#1965C9; background:#fff; }
.form-field textarea { resize:vertical; }
.form-field [aria-invalid="true"] { border:2px solid #A32638; }
.form-field input:focus,.form-field select:focus,.form-field textarea:focus { outline:3px solid #1965C9; outline-offset:2px; }
.field-hint,.form-required,.form-privacy { font-size:.83rem; line-height:1.6; }
.field-hint { margin:0; }
.form-privacy { margin: .4rem 0 1.5rem; }
.form-error { color:#A32638; font-size:.88rem; margin:0; }
.form-status { padding:1rem; margin-bottom:1.5rem; border:1px solid #9BBCEB; border-radius:5px; background:#fff; }
.form-status--error { border-color:#A32638; }
.form-status p:last-child { margin-bottom:0; }
.form-trap { position:absolute; left:-10000px; width:1px; height:1px; overflow:hidden; }
.btn--solid { background:#1965C9; color:#fff; border:1px solid #1965C9; gap:2rem; cursor:pointer; font:inherit; font-weight:600; }
.btn--solid:hover { background:#124B97; }
.btn--solid:disabled { opacity:.6; cursor:not-allowed; }
.legal-layout { display:grid; grid-template-columns:230px minmax(0,1fr); gap:4rem; align-items:start; }
.legal-nav { display:flex; flex-direction:column; gap:.6rem; font-size:.9rem; }
.legal-nav a { padding:.4rem 0; }
.legal-copy { max-width:760px; }
.legal-copy h2 { font-size:1.7rem; margin:2.5rem 0 1rem; scroll-margin-top:110px; }
.legal-copy ul { padding-left:1.25rem; margin-bottom:1.5rem; }
.legal-copy li { margin-bottom:1rem; }
.legal-date { font-size:.85rem; }
.legal-callout { border-left:3px solid #1965C9; padding:1rem 1.3rem; background:#F1F6FE; }
.footer-nav { flex-wrap:wrap; }
@media(max-width:1000px) {
 .service-cards { grid-template-columns:1fr; }
 .legal-layout { grid-template-columns:1fr; gap:2rem; }
 .legal-nav { flex-direction:row; flex-wrap:wrap; column-gap:1.5rem; }
}
@media(max-width:640px) {
 .contact-form-panel { padding:1.25rem; }
 .form-row { grid-template-columns:1fr; gap:0; }
 .legal-copy h2 { font-size:1.4rem; }
 .service-card { padding:1.5rem; }
}
