/* ==========================================================================
  Nesbitt Web — Design System
  Brand-led and clean. High-contrast ink with pink and yellow highlights.
  ========================================================================== */

/* ----- Fonts: loaded in head for a faster first paint ----- */

:root {
  /* Brand */
  --ink:        #1E1638;
  --ink-deep:   #120C26;
  --ink-soft:   #5E5577;
  --paper:      #FFFDF4;
  --paper-pure: #FFFFFF;
  --line:       #F0E9B5;
  --line-dark:  #3A2F64;

  --accent:      #FF66C4;
  --accent-deep: #E044AB;
  --accent-soft: #FFD4EE;
  --highlight:   #F9F871;
  --highlight-deep: #E2E053;

  /* Type scale */
  --display: 'Sora', 'Avenir Next', 'Segoe UI', sans-serif;
  --body:    'Manrope', 'Avenir Next', 'Segoe UI', sans-serif;

  /* Spacing & layout */
  --maxw: 1180px;
  --maxw-text: 720px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  --radius: 4px;
  --shadow: 0 1px 2px rgba(18,12,38,.05), 0 10px 32px rgba(18,12,38,.08);
  --shadow-lg: 0 8px 18px rgba(18,12,38,.10), 0 28px 72px rgba(255,102,196,.14);

  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ----- Reset ----- */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  background-image: linear-gradient(180deg, rgba(249,248,113,.16), rgba(249,248,113,0) 22%), radial-gradient(circle at top right, rgba(255,102,196,.10), transparent 28%);
  line-height: 1.6;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ----- Typography ----- */
h1,h2,h3,h4 { font-family: var(--display); font-weight: 700; line-height: 1.02; letter-spacing: -.035em; color: var(--ink); }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 800; }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); }
h4 { font-size: 1.15rem; }
p  { max-width: var(--maxw-text); }
.lead { font-size: clamp(1.2rem, 2vw, 1.45rem); line-height: 1.5; color: var(--ink-soft); font-weight: 500; }
strong { font-weight: 600; }
em { font-style: italic; }

/* Eyebrow / kicker */
.kicker {
  font-family: var(--body);
  font-size: .8rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-deep);
  display: inline-flex; align-items: center; gap: .6rem;
}
.kicker::before { content: ""; width: 28px; height: 1px; background: var(--accent); display: inline-block; }

/* ----- Layout ----- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-text { max-width: var(--maxw-text); margin-inline: auto; padding-inline: var(--gutter); }
section { padding-block: clamp(3.5rem, 8vw, 7rem); }
.section-dark {
  background: radial-gradient(circle at top left, rgba(255,102,196,.22), transparent 30%), radial-gradient(circle at top right, rgba(249,248,113,.14), transparent 24%), var(--ink-deep);
  color: var(--paper);
}
.section-dark h1,.section-dark h2,.section-dark h3,.section-dark h4 { color: var(--paper); }
.section-dark .lead { color: rgba(255,253,244,.78); }
.section-dark .kicker { color: var(--highlight); }

/* ----- Buttons ----- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--body); font-weight: 600; font-size: 1rem;
  padding: .9rem 1.6rem; border-radius: var(--radius);
  border: 1px solid transparent; cursor: pointer;
  transition: transform .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease);
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #FF8DD6);
  color: var(--ink-deep);
  box-shadow: 0 10px 28px rgba(255,102,196,.22);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--accent-deep), var(--accent)); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.section-dark .btn-ghost { color: var(--paper); border-color: var(--line-dark); }
.btn-ghost:hover { border-color: var(--accent); background: rgba(249,248,113,.18); transform: translateY(-2px); }
.section-dark .btn-ghost:hover { border-color: var(--paper); }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* ----- Header / Nav ----- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,253,244,.86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav-logo img { height: 34px; width: auto; }
.nav-logo .fallback { font-family: var(--display); font-weight: 600; font-size: 1.4rem; letter-spacing: -.02em; }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a { font-size: .95rem; font-weight: 500; color: var(--ink-soft); transition: color .2s; position: relative; }
.nav-links a:hover { color: var(--accent-deep); }
.nav-links a.active { color: var(--accent-deep); }
.nav-links .nav-cta,
.nav-links .nav-cta:hover,
.nav-links .nav-cta.active { color: var(--ink-deep); }
.nav-cta { padding: .6rem 1.1rem !important; font-size: .9rem !important; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .5rem; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: .3s; }

@media (max-width: 860px) {
  .nav-links {
    position: fixed; inset: 72px 0 auto 0;
    flex-direction: column; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 1rem var(--gutter) 2rem;
    transform: translateY(-120%); transition: transform .35s var(--ease);
    box-shadow: var(--shadow-lg);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { width: 100%; padding: .9rem 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav-links .nav-cta { margin-top: 1rem; width: 100%; justify-content: center; }
  .nav-toggle { display: block; }
}

/* ----- Hero ----- */
.hero { padding-block: clamp(4rem, 11vw, 9rem) clamp(3rem, 7vw, 6rem); position: relative; overflow: hidden; }
.hero h1 { max-width: 14ch; margin-bottom: 1.5rem; }
.hero .lead { max-width: 52ch; margin-bottom: 2.5rem; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-proof { margin-top: 3.5rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.hero-proof-label { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 1.2rem; font-weight: 600; }
.logo-strip { display: flex; align-items: center; gap: clamp(1.5rem, 4vw, 3rem); flex-wrap: wrap; }
.logo-strip img { height: 40px; width: auto; opacity: .55; filter: grayscale(1); transition: opacity .3s; }
.logo-strip img:hover { opacity: .85; }
/* subtle backdrop accent */
.hero::after {
  content:""; position: absolute; top: -20%; right: -10%;
  width: 50vw; height: 50vw; max-width: 640px; max-height: 640px;
  background: radial-gradient(circle, rgba(255,102,196,.16), transparent 65%);
  pointer-events: none; z-index: 0;
}
.hero::before {
  content:""; position: absolute; left: -6%; top: 8%;
  width: 28vw; height: 28vw; min-width: 220px; min-height: 220px;
  background: radial-gradient(circle, rgba(249,248,113,.22), transparent 68%);
  pointer-events: none; z-index: 0;
}
.hero .wrap { position: relative; z-index: 1; }

/* ----- Repel line (the qualifier) ----- */
.qualifier {
  font-family: var(--display); font-style: normal; font-weight: 500;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--ink-soft); max-width: 60ch; margin-top: 1.2rem;
}

/* ----- Service cards ----- */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .grid-2,.grid-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--paper-pure); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 2rem;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.card .card-num { font-family: var(--display); font-size: .9rem; color: var(--accent-deep); margin-bottom: 1rem; font-weight: 600; }
.card h3 { margin-bottom: .75rem; color: var(--ink); }
.card p { color: var(--ink-soft); font-size: 1rem; margin-bottom: 1.5rem; flex-grow: 1; }
.card .card-price { font-family: var(--display); font-size: 1.05rem; color: var(--ink); padding-top: 1rem; border-top: 1px solid var(--line); }
.card .card-link { color: var(--accent-deep); font-weight: 600; font-size: .95rem; margin-top: 1rem; display: inline-flex; gap: .4rem; }
.card .card-link .arrow { transition: transform .25s var(--ease); }
.card:hover .card-link .arrow { transform: translateX(4px); }
.section-dark .card,
.section-dark .card h3,
.section-dark .card .card-price { color: var(--ink); }
.section-dark .card p { color: var(--ink-soft); }
.section-dark .card .card-link,
.section-dark .card .card-num { color: var(--accent-deep); }

/* ----- Stats ----- */
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 2rem; }
@media (max-width: 700px){ .stats { grid-template-columns: repeat(2,1fr); } }
.stat .stat-num { font-family: var(--display); font-size: clamp(2.4rem,5vw,3.4rem); color: var(--accent); line-height: 1; }
.stat .stat-label { font-size: .9rem; color: var(--ink-soft); margin-top: .5rem; }
.section-dark .stat .stat-label { color: rgba(247,244,239,.65); }

/* ----- Process steps ----- */
.steps { counter-reset: step; display: grid; gap: 2.5rem; }
.step { display: grid; grid-template-columns: auto 1fr; gap: 1.5rem; align-items: start; }
.step .step-no {
  counter-increment: step;
  font-family: var(--display); font-size: 1.1rem; font-weight: 600;
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--accent); color: var(--accent-deep);
  background: linear-gradient(135deg, rgba(249,248,113,.28), rgba(255,102,196,.08));
  display: grid; place-items: center; flex-shrink: 0;
}
.step .step-no::before { content: counter(step); }
.step h4 { margin-bottom: .4rem; }
.step p { color: var(--ink-soft); font-size: 1rem; }

/* ----- Testimonials ----- */
.quote { background: var(--paper-pure); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; }
.quote .quote-text { font-family: var(--display); font-size: 1.15rem; line-height: 1.45; color: var(--ink); margin-bottom: 1.25rem; }
.quote .quote-by { font-size: .9rem; color: var(--ink-soft); font-weight: 600; }
.quote .quote-org { font-size: .85rem; color: var(--ink-soft); font-weight: 400; }
.section-dark .quote.quote-dark { background: transparent; border-color: var(--line-dark); }
.section-dark .quote.quote-dark .quote-text { color: var(--paper); }
.section-dark .quote.quote-dark .quote-by { color: rgba(255,253,244,.86); }
.section-dark .quote.quote-dark .quote-org { color: rgba(255,253,244,.68); }

/* ----- Work / portfolio grid ----- */
.work-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
@media (max-width: 900px){ .work-grid { grid-template-columns: repeat(2,1fr);} }
@media (max-width: 600px){ .work-grid { grid-template-columns: 1fr;} }
.work-item { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--paper-pure); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.work-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.work-item .work-img { aspect-ratio: 16/10; background: var(--line); overflow: hidden; }
.work-item .work-img img { width:100%; height:100%; object-fit: cover; }
.work-item .work-body { padding: 1.25rem 1.5rem 1.5rem; }
.work-item .work-tag { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-deep); font-weight: 600; }
.work-item h3 { font-size: 1.2rem; margin: .5rem 0 .35rem; color: var(--ink); }
.work-item p { font-size: .92rem; color: var(--ink-soft); }

/* ----- Blog list ----- */
.post-list { display: grid; gap: 0; max-width: 820px; margin-inline: auto; }
.post-row { display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: baseline; padding: 1.75rem 0; border-bottom: 1px solid var(--line); transition: padding-left .25s var(--ease); }
.post-row:hover { padding-left: .75rem; }
.post-row h3 { font-size: 1.4rem; margin-bottom: .4rem; color: var(--ink); }
.post-row .post-excerpt { color: var(--ink-soft); font-size: .98rem; }
.post-row .post-date { font-size: .85rem; color: var(--ink-soft); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ----- Article (blog post / case study body) ----- */
.article { padding-block: clamp(3rem,7vw,5rem); }
.article-head { max-width: var(--maxw-text); margin: 0 auto 3rem; text-align: center; padding-inline: var(--gutter); }
.article-head h1 { margin: 1rem 0; }
.article-meta { font-size: .9rem; color: var(--ink-soft); }
.article-body { max-width: var(--maxw-text); margin-inline: auto; padding-inline: var(--gutter); }
.article-body > * { margin-bottom: 1.4rem; }
.article-body h2 { margin-top: 2.5rem; }
.article-body h3 { margin-top: 2rem; }
.article-body p, .article-body li { font-size: 1.12rem; line-height: 1.7; color: #2A333E; }
.article-body ul { padding-left: 1.4rem; list-style: disc; }
.article-body li { margin-bottom: .6rem; }
.article-body blockquote { border-left: 3px solid var(--accent); padding-left: 1.5rem; font-family: var(--display); font-size: 1.25rem; color: var(--ink); }
.article-body a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 3px; }
.article-body img { border-radius: var(--radius); margin-block: 2rem; }
.article-body code { background: var(--ink); color: var(--paper); padding: .15em .4em; border-radius: 3px; font-size: .9em; }

/* ----- Contact form ----- */
.form { display: grid; gap: 1.25rem; max-width: 560px; }
.form-row { display: grid; gap: .4rem; }
.form label { font-size: .9rem; font-weight: 600; color: var(--ink); }
.form input, .form textarea, .form select {
  font-family: var(--body); font-size: 1rem; color: var(--ink);
  background: var(--paper-pure); border: 1px solid var(--line);
  border-radius: var(--radius); padding: .85rem 1rem; width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
.form input:focus, .form textarea:focus, .form select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,102,196,.18);
}
.form textarea { min-height: 140px; resize: vertical; }
.form-feedback {
  min-height: 1.4em;
  font-size: .95rem;
  font-weight: 600;
  margin-top: -.25rem;
}
.form-feedback.is-pending { color: var(--ink-soft); }
.form-feedback.is-success { color: #1c7f45; }
.form-feedback.is-error { color: #b73064; }
.form [type="submit"][disabled] {
  opacity: .72;
  cursor: not-allowed;
  transform: none;
}
.section-dark .form input, .section-dark .form textarea, .section-dark .form select { background: var(--ink); border-color: var(--line-dark); color: var(--paper); }
.section-dark .form label { color: var(--paper); }

/* ----- Footer ----- */
.site-footer { background: linear-gradient(180deg, rgba(255,102,196,.12), transparent 24%), var(--ink-deep); color: rgba(255,253,244,.72); padding-block: 4rem 2rem; }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; padding-bottom: 3rem; border-bottom: 1px solid var(--line-dark); }
@media (max-width: 760px){ .footer-top { grid-template-columns: 1fr; gap: 2.5rem; } }
.footer-top h4 { color: var(--paper); font-family: var(--body); font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 1rem; }
.footer-blurb { font-family: var(--display); font-size: 1.3rem; color: var(--paper); line-height: 1.3; max-width: 22ch; }
.footer-links a { display: block; padding: .35rem 0; color: rgba(255,253,244,.72); transition: color .2s; font-size: .95rem; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 2rem; font-size: .85rem; color: rgba(255,253,244,.56); }
.footer-social { display: flex; gap: 1.25rem; }
.footer-social a:hover { color: var(--accent); }

/* ----- Reveal-on-scroll ----- */
.reveal { opacity: 1; transform: none; }
html.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
html.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce){ html.js .reveal { opacity:1; transform:none; transition:none; } html{scroll-behavior:auto;} }

/* ----- Utilities ----- */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; } .mb-1 { margin-bottom: 1rem; }
.divider { height:1px; background: var(--line); border:0; margin-block: 0; }
.cta-band { text-align: center; }
.cta-band h2 { max-width: 18ch; margin: 0 auto 1rem; }
.cta-band .lead { margin: 0 auto 2rem; }

::selection { background: var(--highlight); color: var(--ink-deep); }
