/* ==========================================================================
   DV.ie — design tokens + base styles
   Keep this lean. Adjust tokens below to shift the whole look.
   ========================================================================== */

:root {
  /* Colour — derived from the DV.ie logo (triangle mosaic: yellow → amber → orange → red → maroon) */
  --c-bg: #fffdfa;         /* warm white */
  --c-bg-alt: #faf1e4;     /* warm cream */
  --c-ink: #2b1710;        /* warm near-black */
  --c-ink-soft: #6d5346;   /* warm grey-brown */
  --c-brand: #e65300;      /* logo orange — primary accent, buttons */
  --c-brand-ink: #ad3e00;  /* darker orange — link/accent text (AA on white) */
  --c-amber: #f0a30a;      /* logo amber */
  --c-yellow: #ffc400;     /* logo yellow — highlights on dark bands */
  --c-red: #c13a05;        /* logo red — hover / emphasis */
  --c-line: #f0e0cd;
  --c-dark: #45100a;       /* logo maroon — CTA band */
  --c-dark-deep: #2e0a06;  /* one step down the Roast ramp — footer ground */

  /* Type */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --fs-step--1: clamp(0.85rem, 0.8rem + 0.2vw, 0.95rem);
  --fs-base: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --fs-h3: clamp(1.15rem, 1rem + 0.6vw, 1.4rem);
  --fs-h2: clamp(1.6rem, 1.3rem + 1.4vw, 2.4rem);
  --fs-h1: clamp(2.2rem, 1.5rem + 3.2vw, 4.2rem);

  /* Space + shape */
  --sp: clamp(1rem, 0.8rem + 1vw, 1.5rem);
  --container: 72rem;
  --radius: 12px;
  --shadow-rest: 0 2px 10px rgba(69, 16, 10, 0.05);
  --shadow: 0 10px 32px rgba(69, 16, 10, 0.14);

  /* Logo mosaic, shared by the home hero and inner page heroes */
  --mosaic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='340' viewBox='0 0 420 340'%3E%3Cpolygon points='300,0 360,0 330,52' fill='%23f0a30a'/%3E%3Cpolygon points='360,0 420,0 390,52' fill='%23e65300'/%3E%3Cpolygon points='330,52 390,52 360,104' fill='%23ffc400'/%3E%3Cpolygon points='390,52 420,104 360,104' fill='%23c13a05'/%3E%3Cpolygon points='360,104 420,104 390,156' fill='%23f0a30a'/%3E%3Cpolygon points='390,156 420,156 405,182' fill='%23e65300'/%3E%3Cpolygon points='240,0 300,0 270,52' fill='%23ffc400' opacity='.6'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

a { color: var(--c-brand-ink); text-underline-offset: 3px; }
a:hover { color: var(--c-brand); }

img { max-width: 100%; height: auto; display: block; }

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

.skip-link {
  position: absolute; left: -999px;
  background: var(--c-ink); color: #fff; padding: 0.6rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; top: 0; z-index: 100; }

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

/* ---- Buttons ----
   Primary fill is Ember Deep, not Ember: white text needs ≥4.5:1 (AA) and
   #ad3e00 gives 5.9:1 where #e65300 only manages 3.7:1. Ember stays on
   borders, focus rings and non-text accents. */
.btn {
  display: inline-block; background: var(--c-brand-ink); color: #fff;
  padding: 0.8rem 1.4rem; border-radius: var(--radius); font-weight: 600;
  text-decoration: none; border: 2px solid var(--c-brand-ink); cursor: pointer;
  transition: transform .06s ease, background .15s ease;
}
.btn:hover { background: var(--c-red); border-color: var(--c-red); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: transparent; color: var(--c-brand-ink); }
.btn--ghost:hover { background: var(--c-brand-ink); color: #fff; }
.btn--light { background: var(--c-yellow); color: var(--c-dark); border-color: var(--c-yellow); }
.btn--light:hover { background: var(--c-amber); border-color: var(--c-amber); color: var(--c-dark); }
.btn--small { padding: 0.5rem 0.9rem; font-size: var(--fs-step--1); }
.btn--large { padding: 1rem 1.9rem; font-size: 1.1rem; }

/* ---- Header ---- */
.site-header { border-bottom: 1px solid var(--c-line); position: sticky; top: 0; background: rgba(255,253,250,.92); backdrop-filter: blur(8px); z-index: 50; transition: box-shadow .15s ease; }
.site-header.is-scrolled { box-shadow: var(--shadow-rest); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; padding-block: 0.9rem; }
.brand { font-weight: 800; font-size: 1.25rem; text-decoration: none; color: var(--c-ink); letter-spacing: -0.03em; display: inline-flex; align-items: center; gap: 0.5rem; }
.brand__mark { flex: none; }
.primary-nav ul { display: flex; gap: 1.4rem; list-style: none; margin: 0; padding: 0; align-items: center; }
.primary-nav a { text-decoration: none; color: var(--c-ink); font-weight: 500; }
.primary-nav a[aria-current="page"] { color: var(--c-brand-ink); }
/* .primary-nav a out-specifies .btn — restore white text on the nav CTA (AA) */
.primary-nav a.btn { color: #fff; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 26px; height: 2px; background: var(--c-ink); display: block; }

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  /* visibility keeps collapsed links out of the tab order */
  .primary-nav { position: absolute; inset: 100% 0 auto 0; background: var(--c-bg); border-bottom: 1px solid var(--c-line); transform: scaleY(0); transform-origin: top; visibility: hidden; transition: transform .15s ease, visibility .15s; }
  .primary-nav[data-open="true"] { transform: scaleY(1); visibility: visible; }
  .primary-nav ul { flex-direction: column; align-items: flex-start; gap: 0; padding: var(--sp); }
  .primary-nav li { width: 100%; padding-block: 0.5rem; }
}

/* ---- Hero ---- */
.hero { padding-block: clamp(3rem, 6vw, 6rem); background: linear-gradient(180deg, var(--c-bg-alt), var(--c-bg)); position: relative; overflow: hidden; }
.hero .container { position: relative; z-index: 1; }
/* Triangle mosaic echoing the logo, top-right */
.hero::after, .page-hero::after {
  content: ""; position: absolute; inset: 0 0 auto auto; width: 420px; height: 100%;
  background: var(--mosaic) right top no-repeat;
  pointer-events: none;
}
.page-hero::after { width: 280px; background-size: 280px auto; }
@media (max-width: 900px) {
  .hero::after { width: 200px; background-size: 200px auto; opacity: .55; }
  .page-hero::after { width: 160px; background-size: 160px auto; opacity: .7; }
}
@media (max-width: 600px) {
  /* Smaller but present: the brand's one visual must survive mobile */
  .hero::after { width: 112px; background-size: 112px auto; opacity: 1; }
  .page-hero::after { width: 96px; background-size: 96px auto; opacity: 1; }
  .hero__fact { max-width: calc(100% - 118px); }
}
.hero__fact { color: var(--c-ink-soft); font-weight: 500; margin: 0 0 0.75rem; }

/* ---- Inner page hero: the home hero's band, sized for content pages ---- */
.page-hero {
  background: linear-gradient(180deg, var(--c-bg-alt), var(--c-bg));
  position: relative; overflow: hidden;
  padding-block: clamp(2rem, 4vw, 3.5rem);
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero .page__header { padding-block: 0; }
.page-hero .breadcrumb { padding-top: 0; margin-bottom: 0.6rem; }
.page-hero h1 { animation: rise .55s cubic-bezier(.16, 1, .3, 1) both; }
.page-hero .lede { animation: rise .55s .07s cubic-bezier(.16, 1, .3, 1) both; }
.hero h1 { max-width: 18ch; margin: 0 0 1rem; }
.lede { font-size: clamp(1.1rem, 1rem + 0.6vw, 1.4rem); color: var(--c-ink-soft); max-width: 60ch; }
.hero__actions { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.5rem; }

/* One entrance moment: hero content rises in once on load */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.hero__fact    { animation: rise .55s cubic-bezier(.16, 1, .3, 1) both; }
.hero h1       { animation: rise .55s .07s cubic-bezier(.16, 1, .3, 1) both; }
.hero .lede    { animation: rise .55s .14s cubic-bezier(.16, 1, .3, 1) both; }
.hero__actions { animation: rise .55s .21s cubic-bezier(.16, 1, .3, 1) both; }

/* ---- Sections ---- */
.section { padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.section--alt { background: var(--c-bg-alt); }
.section__intro { color: var(--c-ink-soft); max-width: 60ch; }
.eyebrow { font-weight: 600; }

/* ---- Cards grid ---- */
.grid { display: grid; gap: var(--sp); }
.grid--cards { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 1.5rem; }
.card {
  display: block; background: #fff; border: 1px solid var(--c-line);
  border-radius: var(--radius); padding: 1.4rem; text-decoration: none; color: inherit;
  box-shadow: var(--shadow-rest);
  transition: box-shadow .15s ease, transform .06s ease, border-color .15s ease;
}
.card:hover { box-shadow: var(--shadow); border-color: var(--c-brand); transform: translateY(-2px); }
.card h2, .card h3 { margin: 0 0 0.4rem; }
.card p { color: var(--c-ink-soft); margin: 0 0 0.8rem; }
.card__link { color: var(--c-brand-ink); font-weight: 600; }
.card__meta { font-size: var(--fs-step--1); text-transform: uppercase; letter-spacing: .06em; }
.card__thumb {
  width: calc(100% + 2.8rem); max-width: none; margin: -1.4rem -1.4rem 1rem;
  border-radius: var(--radius) var(--radius) 0 0;
  aspect-ratio: 16 / 10; object-fit: cover; object-position: top;
  border-bottom: 1px solid var(--c-line);
}

/* ---- Proof strip (homepage, under the hero) ---- */
.proof { border-bottom: 1px solid var(--c-line); padding-block: 1.8rem 2rem; }
.proof__lead { margin: 0 0 0.8rem; font-size: var(--fs-step--1); font-weight: 600; color: var(--c-ink-soft); }
.proof__list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.4rem clamp(1.5rem, 4vw, 3.5rem);
}
.proof__list--shots {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: var(--sp);
}
.proof__item a { display: block; font-weight: 700; color: var(--c-ink); text-decoration: none; }
.proof__item a:hover { color: var(--c-brand-ink); }
.proof__item a:hover strong { text-decoration: underline; }
.proof__item span { display: block; color: var(--c-ink-soft); font-size: var(--fs-step--1); font-weight: 400; }
.proof__thumb {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top;
  border-radius: var(--radius); border: 1px solid var(--c-line);
  box-shadow: var(--shadow-rest); margin-bottom: 0.65rem;
  transition: box-shadow .15s ease, border-color .15s ease, transform .06s ease;
}
.proof__item a:hover .proof__thumb { border-color: var(--c-brand); box-shadow: var(--shadow); transform: translateY(-2px); }
.proof__lead--brands { margin-top: 1.6rem; }
.proof__name { font-weight: 700; color: var(--c-ink); font-size: inherit; }

/* ---- Featured service panel (homepage lead) ---- */
.feature {
  display: block; background: var(--c-bg-alt); border: 1px solid var(--c-line);
  border-radius: var(--radius); padding: clamp(1.5rem, 3vw, 2.5rem);
  margin-top: 1.5rem; margin-bottom: var(--sp);
  text-decoration: none; color: inherit;
  box-shadow: var(--shadow-rest);
  transition: box-shadow .15s ease, transform .06s ease, border-color .15s ease;
}
.feature:hover { box-shadow: var(--shadow); border-color: var(--c-brand); transform: translateY(-2px); }
.feature h3 { font-size: var(--fs-h2); margin: 0 0 0.5rem; max-width: 22ch; }
.feature p { color: var(--c-ink-soft); margin: 0 0 0.8rem; max-width: 55ch; }
.feature .card__meta { margin-bottom: 0.4rem; }

/* ---- Enquiry steps (a real sequence — the numbers carry meaning) ---- */
.steps {
  list-style: none; margin: 1.5rem 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--sp);
}
.step__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.2rem; height: 2.2rem; border-radius: 50%;
  background: var(--c-brand-ink); color: #fff; font-weight: 800;
}
.step h3 { font-size: var(--fs-h3); margin: 0.7rem 0 0.35rem; }
.step p { color: var(--c-ink-soft); margin: 0; }
.section__aside { margin-top: 2rem; color: var(--c-ink-soft); }

/* ---- Case studies ---- */
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; margin: 1rem 0 0; padding: 0; }
.tag {
  font-size: var(--fs-step--1); font-weight: 600; color: var(--c-brand-ink);
  background: var(--c-bg-alt); border: 1px solid var(--c-line);
  border-radius: 999px; padding: 0.25rem 0.8rem;
}
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--sp); margin-top: 1.5rem; }
.stat { background: var(--c-bg-alt); border-radius: var(--radius); padding: 1.2rem 1.4rem; box-shadow: var(--shadow-rest); }
.stat__value { display: block; font-size: var(--fs-h2); font-weight: 800; letter-spacing: -0.02em; color: var(--c-brand-ink); }
.stat__label { color: var(--c-ink-soft); font-size: var(--fs-step--1); }

/* ---- CTA band ---- */
.cta-band { background: var(--c-dark); color: #fff; padding-block: clamp(2.5rem, 5vw, 4rem); text-align: center; }
.cta-band h2 { margin: 0 0 0.5rem; }
.cta-band p { color: #f0c9ae; max-width: 50ch; margin: 0 auto 1.5rem; }

/* ---- Page / prose ---- */
.page__header { padding-block: clamp(2rem, 5vw, 3.5rem) 0.5rem; }
.breadcrumb { padding-top: 1rem; font-size: var(--fs-step--1); color: var(--c-ink-soft); }
.breadcrumb a { color: var(--c-ink-soft); }
.prose { max-width: 70ch; padding-block: 1.5rem 2.5rem; }
.prose h2 { margin-top: 2rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-block: 0.3rem; }

/* ---- Contact ---- */
.contact { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
@media (max-width: 720px) { .contact { grid-template-columns: 1fr; } }
.field { margin-bottom: 1.1rem; display: flex; flex-direction: column; }
.field label { font-weight: 600; margin-bottom: 0.35rem; }
.field input, .field select, .field textarea {
  font: inherit; padding: 0.7rem 0.8rem; border: 1px solid var(--c-line);
  border-radius: 8px; background: #fff; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--c-brand); outline: none; box-shadow: 0 0 0 3px rgba(230,83,0,.15); }
.hp { position: absolute; left: -9999px; }
.form-status { margin-top: 1rem; font-weight: 600; }
.form-status.is-error { color: #b00020; }
.form-status.is-success { color: #0a7d33; }
.contact__aside { background: var(--c-bg-alt); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-rest); align-self: start; }
.contact__aside h2 { font-size: var(--fs-h3); margin-top: 1.5rem; }
.contact__aside h2:first-child { margin-top: 0; }

/* ---- Footer ---- */
.site-footer { background: var(--c-dark-deep); color: #f0c9ae; padding-block: 2.5rem 1.5rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer__inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--sp); }
@media (max-width: 720px) {
  .site-footer__inner { grid-template-columns: 1fr; }
  /* contact is what a footer visitor came for — it follows the brand block */
  .site-footer__inner > nav { order: 3; }
  .site-footer__contact { order: 2; }
}
.site-footer .brand { color: #fff; margin: 0 0 0.8rem; }
/* every column starts flush at the same top edge */
.site-footer__inner > * > :first-child { margin-top: 0; }
.site-footer__label {
  margin: 0 0 0.7rem; font-size: var(--fs-step--1); font-weight: 600;
  color: rgba(240, 201, 174, 0.75); letter-spacing: normal; line-height: 1.65;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-block: 0 0.25rem; }
.site-footer li a { display: inline-block; padding-block: 0.3rem; }
.site-footer a[aria-current="page"] { text-decoration: underline; text-underline-offset: 3px; }
.site-footer__legal { display: flex; justify-content: space-between; border-top: 1px solid rgba(255,255,255,.12); margin-top: 2rem; padding-top: 1rem; font-size: var(--fs-step--1); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
