/* ==========================================================================
   Deux Digital — styles.css
   ========================================================================== */

:root {
  /* Brand palette */
  --obsidian: #100F14;
  --deep-void: #19181F;
  --dusk: #2C2B34;
  --chalk-blue: #5B82A6;
  --chalk-blue-dark: #446286; /* logo mark shade, used for AA text-on-light contrast */
  --cool-white: #CDD0D9;
  --pale: #EDF1F5;
  --terracotta: #C17B4E; /* second accent — warm counterpoint to Chalk Blue, used sparingly */
  --terracotta-dark: #A6653C; /* AA text-on-light shade of terracotta */

  /* Semantic tokens (light, friendly layout per brief) */
  --bg: #FFFFFF;
  --bg-alt: var(--pale);
  --surface: #FFFFFF;
  --text: var(--obsidian);
  --text-muted: #56555F;
  --border: #E1E5EC;
  --accent: var(--chalk-blue-dark);
  --accent-warm: var(--terracotta-dark);
  --accent-contrast: #FFFFFF;
  --focus-ring: var(--chalk-blue-dark);

  /* Type */
  --font-wordmark: "Teko", sans-serif; /* logo/wordmark only */
  --font-heading: "Plus Jakarta Sans", sans-serif;
  --font-label: "Barlow Condensed", sans-serif;
  --font-body: "Barlow", sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --container: 1160px;
}

/* ---- Reset ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul { list-style: none; }
input, textarea, select { font: inherit; color: inherit; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

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

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--obsidian);
  color: var(--pale);
  padding: 12px 20px;
  z-index: 1000;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus {
  left: 0;
}

/* ---- Typography helpers --------------------------------------------- */
.eyebrow {
  font-family: var(--font-label);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  color: var(--accent);
}

h1, h2, h3, .display {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: var(--obsidian);
}

h1 { font-size: clamp(2.5rem, 6vw, 4.2rem); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.9rem, 4vw, 2.75rem); font-weight: 800; letter-spacing: -0.025em; }
h3 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); font-weight: 700; }

p { color: var(--text-muted); }
.lede { font-size: 1.15rem; line-height: 1.65; }

/* ---- Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-lg);
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
  transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
}
.btn-primary:hover { background: var(--obsidian); }
.btn-primary:active { transform: translateY(1px); }

.btn-ghost {
  background: transparent;
  color: var(--obsidian);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-block { width: 100%; }

/* ---- Header / Nav ------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand__mark { width: 34px; height: auto; }
.brand__mark svg { width: 100%; height: auto; }
.brand__word {
  font-family: var(--font-wordmark);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.6rem;
  letter-spacing: 0.01em;
  color: var(--obsidian);
}

.nav-links {
  display: none;
  align-items: center;
  gap: 32px;
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
}
.nav-links a {
  color: var(--text);
  position: relative;
  padding-block: 4px;
}
.nav-links a:hover { color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 12px; }

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 8px;
  border-radius: var(--radius-sm);
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--obsidian);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px 24px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.mobile-nav.is-open { display: flex; }
.mobile-nav a {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 1.1rem;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.mobile-nav a:last-of-type { border-bottom: none; }
.mobile-nav .btn { margin-top: 10px; }

@media (max-width: 899px) {
  .brand__word { display: none; }
  .header-actions .btn-primary { display: none; }
}

@media (min-width: 900px) {
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
  .mobile-nav { display: none !important; }
}

/* ---- Hero ---------------------------------------------------------- */
.hero {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  position: relative;
}
.section-alt::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../images/pattern-network.webp");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  opacity: 0.20;
  pointer-events: none;
}
.hero .container {
  position: relative;
  padding-block: 64px 56px;
  display: grid;
  gap: 40px;
  max-width: var(--container);
  align-items: center;
}
.hero__content { max-width: 620px; }
.hero__media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 700 / 868;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
@media (min-width: 860px) {
  .hero .container {
    grid-template-columns: 1.05fr 0.95fr;
    padding-block: 96px 88px;
  }
}
.hero__eyebrow { margin-bottom: 18px; }
.hero h1 { margin-bottom: 22px; }
.hero__sub {
  font-size: 1.2rem;
  max-width: 56ch;
  margin-bottom: 12px;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
}
.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 36px;
  font-family: var(--font-label);
  font-size: 0.95rem;
  color: var(--text-muted);
}
.hero__trust li { display: flex; align-items: center; gap: 8px; }
.hero__trust li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* ---- Section shell --------------------------------------------------- */
.section { padding-block: 88px; }
.section-alt { background: var(--bg-alt); position: relative; overflow: hidden; }
.section-alt > .container { position: relative; }
.section__head {
  max-width: 640px;
  margin-bottom: 52px;
}
.section__head .eyebrow { display: block; margin-bottom: 14px; }
.section__head p { margin-top: 16px; font-size: 1.08rem; }

/* ---- Services --------------------------------------------------------- */
.card-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1080px) {
  .card-grid { grid-template-columns: repeat(4, 1fr); }
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.service-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.service-card__icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.service-card__icon svg { width: 24px; height: 24px; }
.service-card:nth-child(2n) .service-card__icon { color: var(--accent-warm); }
.service-card h3 { font-size: 1.5rem; }
.service-card p { font-size: 0.98rem; }

/* ---- How we work ------------------------------------------------------ */
.how-we-work__media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 8;
  margin-bottom: 48px;
}
.how-we-work__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.steps {
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
  counter-reset: step;
}
@media (min-width: 800px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}
.step {
  position: relative;
  padding: 34px 28px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.step__num {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 2.2rem;
  color: var(--accent-warm);
  line-height: 1;
  margin-bottom: 10px;
  display: block;
}
.step h3 { margin-bottom: 10px; }
.step p { font-size: 0.98rem; }

/* ---- Case studies placeholder (v2) ------------------------------------ */
/*
<section id="work" class="section" aria-labelledby="work-heading">
  <div class="container">
    <div class="section__head">
      <span class="eyebrow">Our work</span>
      <h2 id="work-heading">Recent projects</h2>
      <p>A selection of sites and applications we've built for clients.</p>
    </div>
    ... case study cards go here for v2 ...
  </div>
</section>
*/

/* ---- DIY Website Workshop ---------------------------------------------- */
.workshop {
  background: #F8ECE2; /* light terracotta tint — distinct "event" moment vs. the rest of the page */
  border-bottom: 1px solid var(--border);
}
.workshop__inner { max-width: 700px; }
.eyebrow-warm { color: var(--accent-warm); }
.workshop h2 { margin-bottom: 18px; }
.workshop .lede { margin-bottom: 28px; }

.workshop__features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px 28px;
  margin-bottom: 32px;
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
}
@media (min-width: 560px) {
  .workshop__features { grid-template-columns: 1fr 1fr; }
}
.workshop__features li { display: flex; align-items: center; gap: 10px; }
.workshop__features li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-warm);
  flex-shrink: 0;
}

.btn-warm { background: var(--accent-warm); color: var(--accent-contrast); }
.btn-warm:hover { background: var(--obsidian); }

.workshop__note {
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ---- Contact ----------------------------------------------------------- */
.contact-grid {
  display: grid;
  gap: 48px;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .contact-grid { grid-template-columns: 1fr 1.3fr; align-items: start; }
}

.contact-info h2 { margin-bottom: 16px; }
.contact-info p { margin-bottom: 28px; font-size: 1.05rem; }

.contact-detail-list { display: flex; flex-direction: column; gap: 18px; margin-bottom: 8px; }
.contact-detail-list a { font-weight: 600; color: var(--obsidian); }
.contact-detail-list a:hover { color: var(--accent); }
.contact-detail-list dt {
  font-family: var(--font-label);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.contact-info__media {
  margin-top: 32px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  max-width: 480px;
}
.contact-info__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-form-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
}
@media (max-width: 480px) {
  .contact-form-wrap { padding: 24px; }
}

.form-row { margin-bottom: 20px; }
.form-row-group {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
@media (min-width: 560px) {
  .form-row-group { grid-template-columns: 1fr 1fr; }
}

label {
  display: block;
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 7px;
  color: var(--obsidian);
}
.optional-tag {
  font-weight: 400;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 1rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(68, 98, 134, 0.15);
  outline: none;
}
textarea { min-height: 130px; resize: vertical; }

.field-error {
  display: none;
  color: #A6432F;
  font-size: 0.86rem;
  margin-top: 6px;
  font-family: var(--font-label);
}
.form-row.has-error input,
.form-row.has-error select,
.form-row.has-error textarea {
  border-color: #A6432F;
}
.form-row.has-error .field-error { display: block; }

.honeypot-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  display: none;
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-label);
  font-size: 0.98rem;
}
.form-status.is-success {
  display: block;
  background: #E4EEE6;
  color: #2A5C3A;
}
.form-status.is-error {
  display: block;
  background: #F5E4E0;
  color: #A6432F;
}

.contact-form.is-submitted-success .form-fields { display: none; }

/* ---- Footer ------------------------------------------------------------ */
.site-footer {
  background: var(--obsidian);
  color: var(--cool-white);
  padding-block: 56px 32px;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 40px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand__mark { width: 30px; }
.footer-brand__mark svg .cls-1 { fill: var(--pale) !important; }
.footer-brand__word {
  font-family: var(--font-wordmark);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.5rem;
  color: var(--pale);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  font-family: var(--font-label);
  font-size: 0.98rem;
}
.footer-links a:hover { color: var(--chalk-blue); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 28px;
  border-top: 1px solid var(--dusk);
  font-size: 0.86rem;
  color: #8B8A94;
  font-family: var(--font-label);
}

/* ---- Utility ------------------------------------------------------------ */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
