/* ==========================================================================
   Améredia — modern static rebuild
   Design tokens & base
   ========================================================================== */
:root {
  --ink: #2b1410;          /* warm near-black */
  --ink-2: #43271d;
  --paper: #ffffff;
  --surface: #fbf3e1;      /* warm cream (original content bg) */
  --surface-2: #f5e8cf;
  --muted: #6e5f51;
  --muted-2: #9d8f7f;
  --line: #ece0c9;

  --brand: #c03214;        /* brick red */
  --brand-ink: #9a2710;
  --purple: #662485;
  --teal: #2aa16d;
  --gold: #fec53a;         /* signature gold */
  --gold-deep: #eaa600;
  --grad: linear-gradient(120deg, #c03214 0%, #e0651f 100%);
  --grad-soft: linear-gradient(120deg, rgba(192,50,20,.10), rgba(254,197,58,.16));

  --container: 1200px;
  --radius: 6px;
  --radius-sm: 4px;
  --shadow: 0 18px 50px -22px rgba(43,20,16,.35);
  --shadow-sm: 0 8px 24px -14px rgba(43,20,16,.30);

  --font-body: "Arimo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Arimo", var(--font-body);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: clamp(15px, 0.6vw + 14px, 17px);
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 .5em;
  font-weight: 700;
}

h1 { font-size: clamp(2.3rem, 4.5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.7rem); }
h3 { font-size: clamp(1.2rem, 1.6vw, 1.45rem); }

p { margin: 0 0 1rem; color: var(--muted); }
p.lead { font-size: clamp(1.05rem, 1.4vw, 1.3rem); color: var(--ink-2); }

ul { margin: 0; padding: 0; list-style: none; }

/* Layout helpers ---------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(64px, 9vw, 130px) 0; }
.section--tight { padding: clamp(48px, 6vw, 80px) 0; }
.section--surface { background: var(--surface); }
.section--ink { background: var(--ink); color: #fff; }
.section--ink p { color: #aab2c0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-display);
  font-size: .78rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--brand);
  margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--grad); border-radius: 2px; }

.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow { justify-content: center; }

.text-grad {
  background: linear-gradient(120deg, #fec53a 0%, #f7a81b 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* Buttons ----------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-display); font-weight: 600; font-size: .95rem;
  padding: .85rem 1.5rem; border-radius: var(--radius); cursor: pointer;
  border: 1px solid transparent; transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.btn svg { width: 1.05em; height: 1.05em; }
.btn--primary { background: var(--grad); color: #fff; box-shadow: 0 6px 16px -10px rgba(154,39,16,.45); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -12px rgba(154,39,16,.55); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn--lg { padding: 1rem 1.8rem; font-size: 1rem; }

/* Header / navigation ----------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; letter-spacing: -0.03em; }
.brand b { color: var(--brand); }
.brand img { height: 38px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a { font-weight: 500; font-size: .96rem; color: var(--ink-2); position: relative; padding: .25rem 0; }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px; background: var(--grad); transition: width .25s ease; }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-actions { display: flex; align-items: center; gap: .9rem; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: .3s; }
.nav-toggle span + span { margin-top: 5px; }

/* Hero -------------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; background: var(--brand); color: #fff; }
.hero::before { content: ""; position: absolute; inset: 0; background:
  radial-gradient(60% 70% at 80% 0%, rgba(254,197,58,.30), transparent 60%),
  radial-gradient(55% 65% at 8% 100%, rgba(108,18,6,.65), transparent 60%);
}
.hero .container { position: relative; z-index: 1; padding-top: clamp(72px, 11vw, 150px); padding-bottom: clamp(72px, 11vw, 150px); }
.hero h1 { color: #fff; max-width: 14ch; }
.hero p { color: #ffe7c7; max-width: 52ch; font-size: clamp(1.05rem, 1.4vw, 1.3rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2rem; }
.hero-stats { display: flex; flex-wrap: wrap; gap: clamp(1.5rem, 4vw, 3.5rem); margin-top: clamp(2.5rem, 5vw, 4rem); padding-top: 2rem; border-top: 1px solid rgba(255,255,255,.22); }
.hero-stats .num { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.8rem, 3vw, 2.6rem); color: #fff; }
.hero-stats .lbl { font-size: .9rem; color: #ffd9a8; }

.page-hero { background: var(--brand); color: #fff; position: relative; overflow: hidden; }
.page-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 120% at 85% -10%, rgba(254,197,58,.28), transparent 55%), radial-gradient(60% 100% at 0% 120%, rgba(108,18,6,.6), transparent 55%); }
.page-hero .container { position: relative; z-index: 1; padding-top: clamp(60px, 8vw, 110px); padding-bottom: clamp(60px, 8vw, 110px); }
.page-hero h1 { color: #fff; }
.page-hero p { color: #ffe7c7; max-width: 60ch; }
.hero .eyebrow, .page-hero .eyebrow, .mission-card .eyebrow { color: var(--gold); }
.hero .eyebrow::before, .page-hero .eyebrow::before, .mission-card .eyebrow::before { background: var(--gold); }
.hero .btn--primary, .page-hero .btn--primary { background: var(--gold); color: var(--ink); box-shadow: 0 8px 20px -12px rgba(0,0,0,.45); }
.hero .btn--primary:hover, .page-hero .btn--primary:hover { background: var(--gold-deep); box-shadow: 0 12px 26px -12px rgba(0,0,0,.55); }
.breadcrumb { font-size: .85rem; color: #ffd9a8; margin-bottom: 1rem; display: flex; gap: .5rem; }
.breadcrumb a:hover { color: #fff; }

/* Grid utilities ---------------------------------------------------------- */
.grid { display: grid; gap: clamp(20px, 2.5vw, 32px); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }

/* Cards ------------------------------------------------------------------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 2.4vw, 34px); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; height: 100%; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.card .ico { width: 52px; height: 52px; display: grid; place-items: center; border-radius: var(--radius); background: var(--grad-soft); color: var(--brand); margin-bottom: 1.1rem; }
.card .ico svg { width: 26px; height: 26px; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { margin-bottom: .5rem; }
.card p { margin-bottom: 0; font-size: .96rem; }
.card--link { display: flex; flex-direction: column; }
.card--link .more { margin-top: 1.1rem; font-family: var(--font-display); font-weight: 600; font-size: .9rem; color: var(--brand); display: inline-flex; align-items: center; gap: .4rem; }
.card--link:hover .more { gap: .7rem; }

/* Service detail blocks --------------------------------------------------- */
.service-block { border-top: 1px solid var(--line); padding: clamp(36px, 5vw, 64px) 0; scroll-margin-top: 90px; }
.service-block:first-of-type { border-top: 0; }
.service-block .num { font-family: var(--font-display); font-weight: 700; color: var(--brand); font-size: .95rem; letter-spacing: .1em; }
.ia { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(20px, 3vw, 40px); margin-top: 1.5rem; }
.ia .tag { display: inline-block; font-family: var(--font-display); font-weight: 700; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--purple); margin-bottom: .6rem; }
.ia p { margin-bottom: 0; }

/* Communities / chips ----------------------------------------------------- */
.chips { display: flex; flex-wrap: wrap; gap: .6rem; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: var(--radius-sm); padding: .5rem 1.05rem; font-size: .9rem; font-weight: 500; color: var(--ink-2); transition: .2s; }
.chip:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); }

/* Clients logo grid ------------------------------------------------------- */
.logo-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.logo-grid .cell { background: #fff; aspect-ratio: 3/2; display: grid; place-items: center; padding: 1.4rem; transition: background .25s ease; }
.logo-grid .cell:hover { background: var(--surface); }
.logo-grid img { max-height: 56px; width: auto; filter: grayscale(1); opacity: .7; transition: .25s; }
.logo-grid .cell:hover img { filter: none; opacity: 1; }

/* Work / portfolio gallery ------------------------------------------------ */
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 1.6vw, 22px); }
.work-card { position: relative; border-radius: var(--radius-sm); overflow: hidden; cursor: pointer; background: var(--ink-2); aspect-ratio: 4/3; border: 0; padding: 0; }
.work-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.work-card:hover img { transform: scale(1.06); }
.work-card .meta { position: absolute; inset: auto 0 0 0; padding: 1.1rem; background: linear-gradient(to top, rgba(13,16,23,.92), transparent); color: #fff; text-align: left; transform: translateY(8px); opacity: 0; transition: .3s; }
.work-card:hover .meta { transform: none; opacity: 1; }
.work-card .meta .t { font-family: var(--font-display); font-weight: 600; font-size: 1rem; }
.work-card .meta .s { font-size: .82rem; color: #c4cbd6; }
.work-card .count { position: absolute; top: 12px; right: 12px; background: rgba(255,255,255,.92); color: var(--ink); font-size: .75rem; font-weight: 600; padding: .25rem .6rem; border-radius: var(--radius-sm); font-family: var(--font-display); }

/* CTA band ---------------------------------------------------------------- */
.cta { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--grad); color: #fff; padding: clamp(40px, 6vw, 80px); text-align: center; }
.cta h2 { color: #fff; }
.cta p { color: rgba(255,255,255,.9); max-width: 50ch; margin-inline: auto; }
.cta .hero-actions { justify-content: center; }

/* Contact ----------------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(18px, 2.5vw, 28px); }
.contact-card { border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 3vw, 36px); background: #fff; transition: .25s; }
.contact-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.contact-card a.mail { color: var(--brand); font-weight: 600; font-family: var(--font-display); }
.info-row { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 1.5rem; }
.info-row .it { font-family: var(--font-display); }
.info-row .it span { display: block; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-2); margin-bottom: .2rem; }

/* Legal / prose ----------------------------------------------------------- */
.prose { max-width: 760px; }
.prose h2 { font-size: clamp(1.3rem, 2vw, 1.7rem); margin-top: 2.5rem; }
.prose p { color: var(--ink-2); }

/* Footer ------------------------------------------------------------------ */
.site-footer { background: var(--brand); color: #ffe7c7; padding-top: clamp(56px, 7vw, 90px); }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; padding-bottom: 3rem; border-bottom: 1px solid rgba(255,255,255,.18); }
.site-footer p { color: #ffe7c7; }
.site-footer .brand { color: #fff; }
.site-footer .brand b { color: var(--gold); }
.site-footer h4 { color: #fff; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; font-family: var(--font-display); }
.site-footer ul li { margin-bottom: .55rem; }
.site-footer ul a:hover { color: var(--gold); }
.socials { display: flex; gap: .6rem; margin-top: 1.2rem; }
.socials a { width: 38px; height: 38px; border-radius: var(--radius-sm); display: grid; place-items: center; background: rgba(255,255,255,.14); transition: .2s; }
.socials a:hover { background: var(--gold); color: var(--brand); transform: translateY(-2px); }
.socials svg { width: 18px; height: 18px; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding: 1.6rem 0; font-size: .85rem; color: rgba(255,231,199,.85); }
.footer-bottom a:hover { color: var(--gold); }

/* Lightbox ---------------------------------------------------------------- */
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(8,10,15,.94); display: none; align-items: center; justify-content: center; padding: 4vw; }
.lb.open { display: flex; }
.lb img { max-width: 92vw; max-height: 84vh; border-radius: var(--radius); box-shadow: 0 30px 80px -20px rgba(0,0,0,.8); }
.lb-cap { position: absolute; bottom: 4vw; left: 0; right: 0; text-align: center; color: #fff; font-family: var(--font-display); font-size: .95rem; }
.lb-btn { position: absolute; background: rgba(255,255,255,.12); border: 0; color: #fff; width: 52px; height: 52px; border-radius: 50%; font-size: 1.4rem; cursor: pointer; display: grid; place-items: center; transition: .2s; }
.lb-btn:hover { background: var(--brand); }
.lb-close { top: 3vw; right: 3vw; }
.lb-prev { left: 3vw; top: 50%; transform: translateY(-50%); }
.lb-next { right: 3vw; top: 50%; transform: translateY(-50%); }

/* Reveal animation -------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Responsive -------------------------------------------------------------- */
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .split, .ia, .contact-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .logo-grid { grid-template-columns: repeat(3, 1fr); }
  .nav-links, .nav-actions .btn { display: none; }
  .nav-toggle { display: block; }
  .nav.open .nav-links { display: flex; position: absolute; top: 76px; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 0; background: #fff; border-bottom: 1px solid var(--line); padding: .5rem 24px 1.2rem; box-shadow: var(--shadow); }
  .nav.open .nav-links a { padding: .8rem 0; width: 100%; border-bottom: 1px solid var(--line); }
  .nav.open .nav-links a::after { display: none; }
}
@media (max-width: 560px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr; }
  .logo-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr; }
  .hero-stats { gap: 1.5rem 2rem; }
}
