/* ==========================================================================
   amanueltilahun.com — design system
   Palette: brand red from the AT logo, Ethiopian coffee brown, teff gold.
   Type: Bricolage Grotesque (display) + Instrument Sans (text) + Noto Sans Ethiopic.
   ========================================================================== */

:root {
  --red: #b22926;
  --red-deep: #8e1f1d;
  --red-tint: #fbeeed;
  --coffee: #2a1c15;
  --coffee-2: #3a2a21;
  --gold: #d9a441;
  --ink: #221b17;
  --text: #3d3530;
  --muted: #6f655e;
  --line: #e7e1db;
  --fog: #f5f3f0;
  --paper: #ffffff;

  --f-display: "Bricolage Grotesque", "Noto Sans Ethiopic", system-ui, sans-serif;
  --f-text: "Instrument Sans", "Noto Sans Ethiopic", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: clamp(.83rem, .8rem + .15vw, .9rem);
  --step-0: clamp(1rem, .96rem + .2vw, 1.0625rem);
  --step-1: clamp(1.2rem, 1.1rem + .45vw, 1.4rem);
  --step-2: clamp(1.45rem, 1.25rem + .9vw, 1.9rem);
  --step-3: clamp(1.8rem, 1.4rem + 1.8vw, 2.75rem);
  --step-4: clamp(2.3rem, 1.6rem + 3.2vw, 4.1rem);

  --wrap: 1180px;
  --gutter: clamp(1.1rem, 4vw, 2.5rem);
  --r-sm: 6px;
  --r-md: 12px;
  --shadow: 0 1px 2px rgba(42, 28, 21, .06), 0 8px 24px -12px rgba(42, 28, 21, .18);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0; font-family: var(--f-text); font-size: var(--step-0); line-height: 1.65;
  color: var(--text); background: var(--paper); text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--red-deep); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3, h4 { font-family: var(--f-display); color: var(--ink); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.015em; font-weight: 700; }
h1 { font-size: var(--step-4); letter-spacing: -.03em; }
h2 { font-size: var(--step-3); letter-spacing: -.025em; }
h3 { font-size: var(--step-1); }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; }
:lang(am), .am { line-height: 1.8; }
:lang(am) h1, :lang(am) h2, :lang(am) h3 { letter-spacing: 0; line-height: 1.3; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: .7rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2 * var(--gutter), 760px); margin-inline: auto; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem; font: 600 1rem/1 var(--f-text);
  padding: .95rem 1.35rem; border-radius: var(--r-sm); border: 2px solid transparent;
  text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-deep); color: #fff; }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-light { background: #fff; color: var(--coffee); }
.btn-light:hover { background: var(--gold); color: var(--coffee); }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- tibeb: woven Ethiopian border band ---------- */
.tibeb {
  height: 12px; border: 0; margin: 0;
  background:
    linear-gradient(45deg, transparent 33%, var(--gold) 33% 40%, transparent 40% 60%, var(--gold) 60% 67%, transparent 67%) 0 0 / 12px 12px,
    linear-gradient(-45deg, transparent 33%, var(--red) 33% 40%, transparent 40% 60%, var(--red) 60% 67%, transparent 67%) 0 0 / 12px 12px,
    var(--coffee);
}
.tibeb-thin { height: 6px; background-size: 6px 6px, 6px 6px, auto; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.site-header.scrolled { border-color: var(--line); }
.nav { display: flex; align-items: center; gap: 1.5rem; min-height: 72px; }
.brand { display: flex; align-items: center; flex: none; }
.brand img { height: 40px; width: auto; }
.menu { display: flex; align-items: center; gap: .25rem; margin: 0 0 0 auto; padding: 0; list-style: none; }
.menu > li > a, .menu summary {
  display: block; padding: .6rem .8rem; color: var(--ink); font-weight: 500; text-decoration: none;
  border-radius: var(--r-sm); cursor: pointer; list-style: none;
}
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: ""; display: inline-block; width: .42em; height: .42em; margin-left: .45em; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-.2em) rotate(45deg); }
.menu > li > a:hover, .menu summary:hover, .menu [aria-current="page"] { color: var(--red); }
.menu details { position: relative; }
.mega {
  position: absolute; top: calc(100% + .6rem); left: 50%; transform: translateX(-50%); width: min(760px, 92vw);
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow);
  padding: 1.4rem; display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.5rem;
}
.mega h3 { font: 600 .82rem/1 var(--f-text); color: var(--muted); margin: 0 0 .7rem; letter-spacing: 0; }
.mega ul { list-style: none; margin: 0; padding: 0; }
.mega .cols-2 { columns: 2; column-gap: 1rem; }
.mega li a { display: block; padding: .4rem 0; color: var(--ink); text-decoration: none; font-weight: 500; break-inside: avoid; }
.mega li a:hover { color: var(--red); }
.nav-cta { display: flex; align-items: center; gap: .9rem; }
.nav-phone { color: var(--ink); font-weight: 600; text-decoration: none; white-space: nowrap; font-size: .95rem; }
.nav-cta .btn { padding: .75rem 1.1rem; }
.menu-toggle { display: none; margin-left: auto; background: none; border: 0; padding: .6rem; cursor: pointer; color: var(--ink); }
.menu-toggle svg { width: 28px; height: 28px; }

@media (max-width: 1060px) {
  .nav-phone { display: none; }
}
@media (max-width: 900px) {
  /* backdrop-filter would trap the fixed menu inside the header, so use a solid header on mobile */
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: #fff; }
  .menu-toggle { display: block; }
  .menu-toggle .i-close { display: none; }
  .nav-open .menu-toggle .i-open { display: none; }
  .nav-open .menu-toggle .i-close { display: block; }
  .nav-cta { display: none; }
  .menu {
    display: none; position: fixed; inset: 72px 0 0 0; background: #fff; flex-direction: column; align-items: stretch;
    gap: 0; padding: 1rem var(--gutter) 2rem; overflow-y: auto; margin: 0;
  }
  .nav-open .menu { display: flex; }
  .nav-open { overflow: hidden; }
  .menu > li > a, .menu summary { padding: 1rem .2rem; font-size: 1.15rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .mega { position: static; transform: none; width: auto; box-shadow: none; border: 0; padding: .5rem 0 1rem; grid-template-columns: 1fr; gap: 1rem; }
  .mega .cols-2 { columns: 1; }
  .menu .menu-cta { display: block; margin-top: 1.5rem; }
  .menu .menu-cta .btn { width: 100%; justify-content: center; }
}
@media (min-width: 901px) { .menu .menu-cta { display: none; } }

/* ---------- sections ---------- */
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section-tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.bg-fog { background: var(--fog); }
.bg-coffee { background: var(--coffee); color: #e9dfd7; }
.bg-coffee h2, .bg-coffee h3 { color: #fff; }
.bg-coffee a:not(.btn) { color: var(--gold); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem 4rem; align-items: end; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head h2 { margin: 0; max-width: 16ch; }
.section-head p { margin: 0; color: var(--muted); max-width: 52ch; }
.bg-coffee .section-head p { color: #cbbdb2; }
@media (max-width: 760px) { .section-head { grid-template-columns: 1fr; } }
.lede { font-size: var(--step-1); line-height: 1.55; color: var(--text); max-width: 62ch; }

/* ---------- hero ---------- */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 6vw, 5rem); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 1.4rem + 3.3vw, 4.05rem); max-width: 17ch; margin-bottom: .45em; }
.hero-by { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.6rem; color: var(--muted); font-weight: 500; }
.hero-by img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; object-position: top; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.hero-by strong { color: var(--ink); display: block; line-height: 1.2; }
.hero .lede { margin-bottom: 1.8rem; }
.hero-proof { display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; margin: 2rem 0 0; padding: 0; list-style: none; color: var(--muted); font-size: var(--step--1); }
.hero-proof li { display: flex; align-items: center; gap: .45rem; }
.hero-proof svg { width: 18px; height: 18px; color: var(--red); flex: none; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

/* ERP module board: the signature element */
.board { background: var(--coffee); border-radius: var(--r-md); padding: clamp(1rem, 2.4vw, 1.5rem); color: #fff; position: relative; box-shadow: 0 30px 60px -30px rgba(42, 28, 21, .55); }
.board-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; font-size: .85rem; color: #cbbdb2; }
.board-top b { color: #fff; font-family: var(--f-display); font-size: 1.05rem; font-weight: 600; }
.board-live { display: inline-flex; align-items: center; gap: .45rem; }
.board-live i { width: 8px; height: 8px; border-radius: 50%; background: #5ad17a; box-shadow: 0 0 0 0 rgba(90, 209, 122, .6); animation: live 2.4s infinite; }
.board-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; margin: 0; padding: 0; list-style: none; }
.board-grid a {
  display: flex; flex-direction: column; justify-content: space-between; min-height: 86px; padding: .75rem .8rem;
  border-radius: 8px; background: var(--coffee-2); border: 1px solid rgba(255, 255, 255, .07); color: #fff; text-decoration: none;
  transition: background .15s, border-color .15s;
  animation: boot .9s ease-out; animation-delay: calc(var(--i) * 110ms + 300ms);
}
.board-grid a:hover { background: var(--red); border-color: var(--red); }
.board-grid svg { width: 22px; height: 22px; color: var(--gold); }
.board-grid a:hover svg { color: #fff; }
.board-grid span { font-weight: 600; font-size: .92rem; line-height: 1.2; }
.board-grid small { display: block; color: #cbbdb2; font-size: .74rem; font-weight: 400; margin-top: .15rem; }
.board-grid a:hover small { color: #fde7e5; }
.board-foot { margin-top: 1rem; font-size: .85rem; color: #cbbdb2; display: flex; gap: .5rem; align-items: center; }
.board-foot a { color: var(--gold); }
@keyframes boot { 0% { background: var(--coffee-2); } 35% { background: var(--red); border-color: var(--red); } 100% { background: var(--coffee-2); } }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(90, 209, 122, .55); } 70% { box-shadow: 0 0 0 9px rgba(90, 209, 122, 0); } 100% { box-shadow: 0 0 0 0 rgba(90, 209, 122, 0); } }
@media (max-width: 480px) { .board-grid { grid-template-columns: repeat(2, 1fr); } .board-grid a { min-height: 64px; } .board-grid small { display: none; } }

/* ---------- clients ---------- */
.clients { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 2.5rem; }
.clients-label { flex-basis: 100%; margin: 0 0 .25rem; color: var(--muted); font-size: var(--step--1); }
.clients img { height: 52px; width: auto; filter: grayscale(1); opacity: .75; transition: filter .2s, opacity .2s; }
.clients img:hover { filter: none; opacity: 1; }

/* ---------- service lists ---------- */
.svc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem 4rem; }
.svc-col h3 { font-size: var(--step-2); display: flex; align-items: baseline; gap: .7rem; padding-bottom: .8rem; border-bottom: 2px solid var(--ink); margin-bottom: 0; }
.svc-col h3 small { font: 500 var(--step--1) var(--f-text); color: var(--muted); letter-spacing: 0; }
.svc-list { list-style: none; margin: 0; padding: 0; }
.svc-list a { display: grid; grid-template-columns: 1fr auto; gap: .2rem 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); }
.svc-list a strong { color: var(--ink); font-family: var(--f-display); font-weight: 600; font-size: 1.13rem; }
.svc-list a span { grid-column: 1; color: var(--muted); font-size: .95rem; line-height: 1.5; }
.svc-list a svg { grid-row: 1 / 3; grid-column: 2; align-self: center; width: 20px; height: 20px; color: var(--line); transition: color .15s, transform .15s; }
.svc-list a:hover strong { color: var(--red); }
.svc-list a:hover svg { color: var(--red); transform: translateX(3px); }
.bg-coffee .svc-col h3 { border-color: var(--gold); }
@media (max-width: 860px) { .svc-cols { grid-template-columns: 1fr; } }

/* ---------- work / projects ---------- */
.work-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(1rem, 2.5vw, 1.75rem); }
.work { grid-column: span 4; display: flex; flex-direction: column; text-decoration: none; color: var(--text); }
.work.wide { grid-column: span 8; }
.work.half { grid-column: span 6; }
.work.tall .work-media { aspect-ratio: auto; flex: 1 1 auto; min-height: 240px; }
.work-media { position: relative; aspect-ratio: 16 / 10; border-radius: var(--r-md); overflow: hidden; background: var(--fog); border: 1px solid var(--line); }
.work-media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .4s ease; }
.work:hover .work-media img { transform: scale(1.025); }
.work-body { padding: 1rem .1rem 0; }
.work-meta { font-size: .82rem; color: var(--muted); margin-bottom: .3rem; }
.work h2, .work h3 { font-size: 1.2rem; margin: 0 0 .35rem; letter-spacing: -.01em; }
.work:hover h2, .work:hover h3 { color: var(--red); }
.work p { color: var(--muted); font-size: .95rem; margin: 0; line-height: 1.55; }
@media (max-width: 900px) { .work, .work.wide, .work.half { grid-column: span 6; }
.work.tall .work-media { aspect-ratio: auto; flex: 1 1 auto; min-height: 240px; } }
@media (max-width: 600px) { .work, .work.wide, .work.half { grid-column: span 12; } }

/* branded cover for projects without screenshots */
.cover {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(1rem, 3vw, 1.6rem);
  background: var(--c-bg, var(--coffee)); color: #fff; overflow: hidden;
}
.cover::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 10px;
  background:
    linear-gradient(45deg, transparent 33%, var(--gold) 33% 40%, transparent 40% 60%, var(--gold) 60% 67%, transparent 67%) 0 0 / 10px 10px,
    linear-gradient(-45deg, transparent 33%, rgba(255,255,255,.55) 33% 40%, transparent 40% 60%, rgba(255,255,255,.55) 60% 67%, transparent 67%) 0 0 / 10px 10px;
}
.cover-cat { display: flex; align-items: center; gap: .5rem; font-size: .8rem; color: rgba(255, 255, 255, .78); font-weight: 500; }
.cover-cat svg { width: 18px; height: 18px; color: var(--gold); }
.cover-name { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.25rem, 1rem + 1.2vw, 1.9rem); line-height: 1.1; letter-spacing: -.02em; max-width: 14ch; position: relative; z-index: 1; }
.cover-logo { position: absolute; right: clamp(1rem, 3vw, 1.6rem); top: clamp(1rem, 3vw, 1.6rem); width: 26%; max-width: 116px; background: #fff; border-radius: 10px; padding: .5rem; }
.cover-logo img { width: 100%; height: auto; }
.cover-glyph { position: absolute; right: -6%; bottom: -14%; width: 52%; color: rgba(255, 255, 255, .06); }
.c-erp { --c-bg: #2a1c15; } .c-hospitality { --c-bg: #7a2a1d; } .c-delivery { --c-bg: #1f3a33; } .c-tourism { --c-bg: #24365a; }
.c-fintech { --c-bg: #3b2a5a; } .c-telegram { --c-bg: #1d4f73; } .c-ecommerce { --c-bg: #8e1f1d; } .c-education { --c-bg: #4c3a12; } .c-website { --c-bg: #33302d; }

.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.filters button { font: 500 .95rem var(--f-text); padding: .55rem 1rem; border-radius: 99px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.filters button:hover:not([aria-pressed="true"]) { border-color: var(--ink); }

/* ---------- process (real sequence) ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: step; list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.steps li { padding: 1.4rem 1.4rem 0 0; counter-increment: step; }
.steps li::before { content: counter(step); display: block; font: 700 2.4rem/1 var(--f-display); color: var(--red); margin-bottom: .8rem; }
.steps h3 { font-size: 1.15rem; margin-bottom: .4rem; }
.steps p { color: var(--muted); font-size: .95rem; margin: 0; }
.bg-coffee .steps { border-color: var(--gold); }
.bg-coffee .steps li::before { color: var(--gold); }
.bg-coffee .steps p { color: #cbbdb2; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; gap: 1.5rem 0; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* ---------- proof / awards ---------- */
.proof { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.proof-photo { position: relative; }
.proof-photo img { border-radius: var(--r-md); width: 100%; max-width: 420px; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; }
.proof-photo .tibeb { position: absolute; left: 1rem; right: 1rem; bottom: -6px; max-width: 388px; border-radius: 2px; }
.facts { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.facts li { background: #fff; padding: 1.1rem 1.2rem; }
.facts b { display: block; font-family: var(--f-display); color: var(--ink); font-size: 1.1rem; line-height: 1.25; }
.facts span { color: var(--muted); font-size: .9rem; }
@media (max-width: 820px) { .proof { grid-template-columns: 1fr; } .facts { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 1.5rem; padding: 1.25rem 0; font: 600 1.12rem/1.4 var(--f-display); color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 1.6rem/1 var(--f-text); color: var(--red); transition: transform .2s; flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 0 1.3rem; max-width: 70ch; color: var(--text); }
.bg-coffee .faq, .bg-coffee .faq details { border-color: rgba(255, 255, 255, .14); }
.bg-coffee .faq summary { color: #fff; }
.bg-coffee .faq summary::after { color: var(--gold); }
.bg-coffee .faq details > div { color: #e2d6cc; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--coffee); color: #e9dfd7; }
.cta-inner { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 2rem 4rem; align-items: center; padding-block: clamp(3rem, 7vw, 5rem); }
.cta-inner h2 { color: #fff; margin-bottom: .4em; max-width: 18ch; }
.cta-inner p { color: #cbbdb2; margin: 0; max-width: 52ch; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.contact-list a { display: flex; align-items: center; gap: .9rem; padding: .95rem 1.1rem; background: var(--coffee-2); border: 1px solid rgba(255,255,255,.08); border-radius: var(--r-sm); color: #fff; text-decoration: none; font-weight: 600; }
.contact-list a:hover { background: var(--red); border-color: var(--red); color: #fff; }
.contact-list svg { width: 22px; height: 22px; color: var(--gold); flex: none; }
.contact-list a:hover svg { color: #fff; }
.contact-list small { display: block; font-weight: 400; color: #cbbdb2; font-size: .82rem; }
.contact-list a:hover small { color: #fde7e5; }
@media (max-width: 820px) { .cta-inner { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.site-footer { background: var(--coffee); color: #cbbdb2; font-size: .95rem; border-top: 1px solid rgba(255,255,255,.08); }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 2rem; padding-block: 3.5rem 2.5rem; }
.foot-grid h2 { font: 600 .95rem var(--f-text); color: #fff; margin: 0 0 .9rem; letter-spacing: 0; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin-bottom: .45rem; }
.foot-grid a { color: #cbbdb2; text-decoration: none; }
.foot-grid a:hover { color: #fff; text-decoration: underline; }
.foot-brand img { height: 40px; width: auto; margin-bottom: 1rem; }
.foot-brand p { max-width: 34ch; }
.socials { display: flex; gap: .5rem; margin-top: 1rem; }
.socials a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--coffee-2); color: #fff; }
.socials a:hover { background: var(--red); }
.socials svg { width: 18px; height: 18px; }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-block: 1.4rem; border-top: 1px solid rgba(255,255,255,.08); font-size: .85rem; }
.foot-bottom a { color: #cbbdb2; }
@media (max-width: 980px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }

/* ---------- page header (inner pages) ---------- */
.page-head { padding-block: clamp(2rem, 5vw, 3.5rem) clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: var(--step-4); max-width: 20ch; }
.crumbs { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0 0 1.3rem; padding: 0; font-size: .87rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: .4rem; color: var(--line); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--red); }

/* answer box: direct answer for search & AI engines */
.answer { border-left: 4px solid var(--red); background: var(--red-tint); padding: 1.2rem 1.4rem; border-radius: 0 var(--r-sm) var(--r-sm) 0; margin: 1.6rem 0 0; max-width: 72ch; }
.answer p { margin: 0; color: var(--ink); font-size: 1.06rem; line-height: 1.6; }
.answer strong { display: block; font-family: var(--f-display); font-size: .9rem; color: var(--red-deep); margin-bottom: .35rem; }

/* free tool highlight */
.tool-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; margin-top: 1.2rem; max-width: 72ch; padding: 1.2rem 1.4rem; border-radius: var(--r-md); background: var(--coffee); color: #e9dfd7; }
.tool-box strong { display: block; color: #fff; font-family: var(--f-display); font-size: 1.15rem; margin-bottom: .2rem; }
.tool-box p { margin: 0; color: #cbbdb2; font-size: .97rem; max-width: 46ch; }
.tool-box .btn-primary { background: var(--gold); color: var(--coffee); }
.tool-box .btn-primary:hover { background: #fff; color: var(--coffee); }

/* service page layout */
.svc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.svc-aside { position: sticky; top: 96px; display: grid; gap: 1rem; }
.aside-card { border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.4rem; background: #fff; }
.aside-card h2 { font-size: 1.2rem; margin-bottom: .6rem; }
.aside-card p { font-size: .95rem; color: var(--muted); }
.aside-card .btn { width: 100%; justify-content: center; }
.aside-card .btn + .btn { margin-top: .5rem; }
.aside-card ul { margin: 0; padding: 0; list-style: none; font-size: .95rem; }
.aside-card li { padding: .45rem 0; border-bottom: 1px solid var(--line); }
.aside-card li:last-child { border: 0; }
.aside-card li a { color: var(--ink); text-decoration: none; }
.aside-card li a:hover { color: var(--red); }
@media (max-width: 960px) { .svc-layout { grid-template-columns: 1fr; } .svc-aside { position: static; } }

.prose { max-width: 70ch; }
.prose h2 { font-size: var(--step-2); margin-top: 2.2em; }
.prose h3 { font-size: var(--step-1); margin-top: 1.8em; }
.prose img { border-radius: var(--r-md); margin: 1.5rem 0; }
.prose li { margin-bottom: .4em; }
.prose blockquote { margin: 1.5rem 0; padding: .2rem 0 .2rem 1.2rem; border-left: 3px solid var(--gold); color: var(--ink); font-size: 1.08rem; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--fog); color: var(--ink); }
.prose code { background: var(--fog); padding: .1em .35em; border-radius: 4px; font-size: .9em; }
.prose pre { background: var(--coffee); color: #f1e8e1; padding: 1rem; border-radius: var(--r-sm); overflow-x: auto; }
.prose pre code { background: none; padding: 0; }

.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2.5rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.feature-grid li { padding: 1.2rem 0; border-top: 1px solid var(--line); }
.feature-grid h3 { font-size: 1.1rem; margin-bottom: .3rem; display: flex; gap: .6rem; align-items: baseline; }
.feature-grid h3::before { content: ""; width: 9px; height: 9px; background: var(--red); transform: rotate(45deg); flex: none; translate: 0 -.1em; }
.feature-grid p { margin: 0; color: var(--muted); font-size: .97rem; }
@media (max-width: 640px) { .feature-grid { grid-template-columns: 1fr; } }

.tags { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0; padding: 0; }
.tags li, .tags a { font-size: .85rem; padding: .3rem .7rem; border-radius: 99px; background: var(--fog); color: var(--ink); text-decoration: none; border: 1px solid var(--line); }
.tags a:hover { border-color: var(--red); color: var(--red); }
.checklist { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 2rem; }
.checklist li { position: relative; padding-left: 1.6rem; margin-bottom: .6rem; break-inside: avoid; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .45em; width: .9rem; height: .5rem; border: solid var(--red); border-width: 0 0 2px 2px; transform: rotate(-45deg); }
@media (max-width: 600px) { .checklist { columns: 1; } }

.module-list { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; margin: 1.5rem 0; padding: 0; list-style: none; }
.module-list li { background: #fff; padding: 1.2rem 1.3rem; scroll-margin-top: 100px; }
.module-list li:target { background: var(--red-tint); }
.module-list h3 { font-size: 1.08rem; margin-bottom: .3rem; }
.module-list p { margin: 0; color: var(--muted); font-size: .95rem; }
@media (max-width: 640px) { .module-list { grid-template-columns: 1fr; } }

.flow { list-style: none; counter-reset: flow; margin: 1.5rem 0; padding: 0; }
.flow li { counter-increment: flow; position: relative; padding: 0 0 1.5rem 3.2rem; }
.flow li::before { content: counter(flow); position: absolute; left: 0; top: 0; width: 2.2rem; height: 2.2rem; display: grid; place-items: center; border-radius: 50%; background: var(--coffee); color: #fff; font: 700 1rem var(--f-display); }
.flow li::after { content: ""; position: absolute; left: 1.08rem; top: 2.4rem; bottom: .2rem; width: 2px; background: var(--line); }
.flow li:last-child::after { display: none; }
.flow h3 { font-size: 1.1rem; margin: .3rem 0 .2rem; }
.flow p { margin: 0; color: var(--muted); }

.compare { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .95rem; }
.compare-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); }
.compare th, .compare td { padding: .9rem 1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { background: var(--fog); color: var(--ink); font-family: var(--f-display); }
.compare thead th:nth-child(2) { background: var(--coffee); color: #fff; }
.compare td:nth-child(2) { background: var(--red-tint); color: var(--ink); font-weight: 600; }
.compare tr:last-child td { border-bottom: 0; }
.sites-table thead th:nth-child(2) { background: var(--fog); color: var(--ink); }
.sites-table td:nth-child(2) { background: none; font-weight: 500; }
.sites-table th[scope="row"] { font-weight: 600; color: var(--ink); }

/* timeline (career is a real sequence) */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 2rem 1.8rem; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: .45rem; width: 12px; height: 12px; background: var(--red); transform: rotate(45deg); }
.timeline .when { font-size: .87rem; color: var(--muted); }
.timeline h3 { font-size: 1.15rem; margin: .1rem 0 .1rem; }
.timeline .org { color: var(--ink); font-weight: 600; margin-bottom: .5rem; }
.timeline ul { margin: .4rem 0 0; color: var(--text); font-size: .97rem; }
.timeline ul li { padding: 0; margin-bottom: .35rem; }
.timeline ul li::before { display: none; }
.tl-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
@media (max-width: 860px) { .tl-cols { grid-template-columns: 1fr; } }

/* project page */
.project-hero { aspect-ratio: 16 / 8; position: relative; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); background: var(--fog); margin-top: 2rem; }
.project-hero img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.project-hero .cover-name { font-size: var(--step-3); max-width: 18ch; }
.spec { list-style: none; margin: 0; padding: 0; }
.spec li { display: grid; grid-template-columns: 110px 1fr; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.spec li span:first-child { color: var(--muted); }
.spec li span:last-child { color: var(--ink); font-weight: 500; }

/* blog */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.2rem, 3vw, 2rem); }
.post-card { display: flex; flex-direction: column; text-decoration: none; color: var(--text); }
.post-card .work-media { aspect-ratio: 16 / 9; }
.post-card h3 { font-size: 1.15rem; margin: .9rem 0 .4rem; line-height: 1.3; }
.post-card:hover h3 { color: var(--red); }
.post-card p { font-size: .95rem; color: var(--muted); margin: 0; }
.post-card .work-meta { margin-top: .9rem; }
@media (max-width: 900px) { .post-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .post-grid { grid-template-columns: 1fr; } }
.post-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.post-list li a { display: grid; grid-template-columns: 1fr auto; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 500; }
.post-list li a:hover { color: var(--red); }
.post-list time { color: var(--muted); font-size: .87rem; white-space: nowrap; font-weight: 400; }
.blog-tools { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.search { position: relative; flex: 1 1 280px; max-width: 420px; }
.search input { width: 100%; font: inherit; padding: .8rem 1rem .8rem 2.6rem; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; }
.search svg { position: absolute; left: .85rem; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--muted); }
.article-head { padding-block: clamp(2rem, 5vw, 3.5rem) 1.5rem; }
.article-head h1 { font-size: var(--step-3); max-width: 24ch; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.4rem; color: var(--muted); font-size: .92rem; }
.article-meta img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; object-position: top; }
.article-meta .who { display: flex; align-items: center; gap: .6rem; color: var(--ink); font-weight: 600; }
.article-cover { margin: 0 0 2.5rem; border-radius: var(--r-md); overflow: hidden; aspect-ratio: 16 / 8; position: relative; margin-bottom: 2.5rem; background: var(--fog); }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.toc { position: sticky; top: 96px; font-size: .92rem; }
.toc h2 { font: 600 .95rem var(--f-text); margin-bottom: .6rem; color: var(--ink); }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.toc a { display: block; padding: .3rem 0 .3rem .9rem; color: var(--muted); text-decoration: none; margin-left: -2px; border-left: 2px solid transparent; }
.toc a:hover, .toc a.on { color: var(--red); border-color: var(--red); }
@media (max-width: 960px) { .article-layout { grid-template-columns: 1fr; } .toc { position: static; display: none; } }
.author-box { display: grid; grid-template-columns: 88px 1fr; gap: 1.2rem; align-items: center; padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--r-md); margin-top: 3rem; }
.author-box img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; object-position: top; }
.author-box h2 { font-size: 1.15rem; margin-bottom: .2rem; }
.author-box p { margin: 0; font-size: .95rem; color: var(--muted); }
.lang-switch { display: inline-flex; align-items: center; gap: .4rem; font-size: .9rem; padding: .4rem .8rem; border: 1px solid var(--line); border-radius: 99px; text-decoration: none; color: var(--ink); }
.lang-switch:hover { border-color: var(--red); color: var(--red); }
.lang-switch svg { width: 16px; height: 16px; flex: none; }
.lang-switch { white-space: nowrap; }
.ad-slot { margin: 2.5rem 0; min-height: 100px; }

/* newsletter */
.subscribe { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.2rem 2.5rem; align-items: center; padding: clamp(1.4rem, 3vw, 2rem); border-radius: var(--r-md); background: var(--coffee); color: #e9dfd7; margin: 2.5rem 0 0; }
.subscribe h2 { color: #fff; font-size: var(--step-2); margin-bottom: .35rem; }
.subscribe p { margin: 0; color: #cbbdb2; font-size: .97rem; }
.subscribe-form { display: flex; gap: .5rem; flex-wrap: wrap; }
.subscribe-form input[type=email] { flex: 1 1 220px; font: inherit; padding: .9rem 1rem; border-radius: var(--r-sm); border: 1px solid transparent; }
.subscribe-form input[type=email]:focus { outline: 3px solid var(--gold); }
.subscribe .btn-primary { background: var(--gold); color: var(--coffee); }
.subscribe .btn-primary:hover { background: #fff; color: var(--coffee); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
@media (max-width: 760px) { .subscribe { grid-template-columns: 1fr; } }

/* forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.2rem; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-weight: 600; color: var(--ink); margin-bottom: .35rem; font-size: .95rem; }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; padding: .85rem 1rem; border: 1px solid #d6cec6; border-radius: var(--r-sm); background: #fff; color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(178, 41, 38, .15); }
.field textarea { min-height: 140px; resize: vertical; }
.field .hint { font-size: .85rem; color: var(--muted); margin-top: .3rem; }
.alert { padding: 1rem 1.2rem; border-radius: var(--r-sm); margin-bottom: 1.5rem; font-weight: 500; }
.alert-ok { background: #e8f6ec; color: #1d5b2e; border: 1px solid #bfe3c9; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.contact-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact-split .contact-list a { background: #fff; color: var(--ink); border-color: var(--line); }
.contact-split .contact-list a:hover { background: var(--red); color: #fff; }
.contact-split .contact-list small { color: var(--muted); }
.contact-split .contact-list svg { color: var(--red); }
.contact-split .contact-list a:hover svg, .contact-split .contact-list a:hover small { color: #fff; }
@media (max-width: 860px) { .contact-split { grid-template-columns: 1fr; } }

/* floating contact (mobile) */
.float-cta { position: fixed; right: 1rem; bottom: 1rem; z-index: 40; display: none; gap: .5rem; }
.float-cta a { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: 0 8px 20px -6px rgba(0,0,0,.35); }
.float-cta .tg { background: #229ed9; } .float-cta .ph { background: var(--red); }
.float-cta svg { width: 26px; height: 26px; }
@media (max-width: 900px) { .float-cta { display: flex; } }

.pagination { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: 2.5rem; list-style: none; padding: 0; }
.pagination a, .pagination span { display: block; padding: .5rem .9rem; border: 1px solid var(--line); border-radius: var(--r-sm); text-decoration: none; color: var(--ink); }
.pagination .active span { background: var(--ink); color: #fff; border-color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print { .site-header, .site-footer, .float-cta, .cta-band, .toc { display: none !important; } }
