/* withflank.com — shared base: tokens, type, buttons, nav, footer.
   Page-specific CSS stays in each page's own <style> block. If a rule is used
   by more than one page it belongs here, so the nav and footer cannot drift. */

:root {
  --cream: #F2EBE0;
  --paper: #FCFAF4;
  --paper-2: #F7F1E6;
  --wheat: #ECE0C8;
  --ink: #1A1714;
  --t-ink: #1A1714;
  --t-ink-2: #4A4339;
  --t-cream: #F2EBE0;
  --t-cream-2: #B3AA9B;
  --smoke: #6B645B;
  --line: #DCD2BF;
  --line-soft: #E7DECC;
  --line-ink: rgba(242,235,224,.12);
  --pine: #2C4A3C;
  --sage: #86AD95;
  --pine-deep: #2F5042;
  --serif: 'DM Serif Display', 'New York', Georgia, serif;
  --sans: 'DM Sans', system-ui, -apple-system, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;
  --e-out: cubic-bezier(.2,.7,.3,1);
  --e-in-out: cubic-bezier(.6,.05,.3,.95);
  --e-pop: cubic-bezier(.34,1.56,.64,1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--cream); color: var(--t-ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
::selection { background: var(--pine); color: var(--cream); }
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 32px; }
.wrap-wide { max-width: 1280px; margin: 0 auto; padding: 0 32px; }

.wm { font-family: var(--serif); font-weight: 400; letter-spacing: -.03em; line-height: 1; display: inline-flex; align-items: baseline; }
.wm .dot { color: var(--pine); }
footer .wm .dot, .dark .wm .dot { color: var(--t-cream); }

.section { padding: 140px 0; }
.kicker { display: flex; align-items: baseline; gap: 13px; margin-bottom: 22px; }
.kicker .label { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: #5A534A; }
.s-title { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 4.2vw, 54px); line-height: 1.04; letter-spacing: -.028em; }
.dark { background: var(--ink); color: var(--t-cream); }
.dark .kicker .label { color: var(--t-cream-2); }
.dark .s-title { color: var(--t-cream); }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--e-out), transform .8s var(--e-out); }
.reveal.in { opacity: 1; transform: none; }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--sans); font-weight: 500; font-size: 14.5px; letter-spacing: -.005em; padding: 13px 22px; border-radius: 10px; transition: transform .15s var(--e-out), background .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease; cursor: pointer; border: 1px solid transparent; white-space: nowrap; }
.btn .arr { transition: transform .18s var(--e-out); display: inline-block; }
.btn:hover .arr { transform: translateX(4px); }
.btn-primary { background: var(--ink); color: var(--t-cream); }
.btn-primary:hover { background: #000; transform: translateY(-1px); box-shadow: 0 14px 30px -16px rgba(26,23,20,.5); }
.btn-pine { background: var(--pine); color: var(--cream); }
.btn-pine:hover { background: #35594A; transform: translateY(-1px); box-shadow: 0 14px 30px -16px rgba(44,74,60,.45); }
.btn-ghost { background: transparent; color: var(--t-ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--t-ink); transform: translateY(-1px); }
.dark .btn-ghost { color: var(--t-cream); border-color: var(--line-ink); }
.dark .btn-ghost:hover { border-color: var(--t-cream); }

/* ---------- Nav ---------- */
nav { position: sticky; top: 0; z-index: 60; background: rgba(242,235,224,.78); backdrop-filter: saturate(140%) blur(16px); -webkit-backdrop-filter: saturate(140%) blur(16px); border-bottom: 1px solid transparent; transition: border-color .25s ease; }
nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { max-width: 1180px; margin: 0 auto; padding: 18px 32px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
nav .wm { font-size: 26px; color: var(--t-ink); }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links > a, .nav-drop > button { font-family: var(--sans); font-size: 14.5px; font-weight: 400; color: var(--t-ink-2); background: none; border: none; cursor: pointer; padding: 0; display: inline-flex; align-items: center; gap: 6px; transition: color .15s ease; white-space: nowrap; letter-spacing: -.005em; }
.nav-links > a:hover, .nav-drop > button:hover, .nav-drop.open > button { color: var(--t-ink); }
.nav-drop { position: relative; }
.nav-drop > button svg { width: 10px; height: 10px; transition: transform .22s var(--e-out); }
.nav-drop.open > button svg { transform: rotate(180deg); }

/* the What-we-build panel */
.nav-panel { position: absolute; top: calc(100% + 18px); left: 50%; transform: translateX(-50%) translateY(-6px); width: 620px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 14px; box-shadow: 0 30px 70px -34px rgba(26,23,20,.42); display: grid; grid-template-columns: 1fr 1fr; gap: 2px; opacity: 0; visibility: hidden; transition: opacity .2s ease, transform .22s var(--e-out), visibility .2s; }
.nav-drop.open .nav-panel { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.np-item { display: block; padding: 11px 13px; border-radius: 10px; transition: background .15s ease; }
.np-item:hover { background: var(--cream); }
.np-item b { display: block; font-size: 14px; font-weight: 600; color: var(--t-ink); letter-spacing: -.01em; }
.np-item span { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.4; color: var(--smoke); }
.np-foot { grid-column: 1 / -1; margin-top: 8px; padding: 12px 13px 4px; border-top: 1px solid var(--line-soft); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.np-foot span { font-size: 12.5px; color: var(--smoke); }
.np-foot a { font-size: 13px; font-weight: 500; color: var(--pine-deep); white-space: nowrap; }

.nav-cta .btn { padding: 9px 16px; font-size: 13.5px; }
.nav-burger { display: none; width: 40px; height: 40px; align-items: center; justify-content: center; background: none; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.nav-burger i { display: block; width: 16px; height: 1.5px; background: var(--t-ink); position: relative; transition: background .2s ease; }
.nav-burger i::before, .nav-burger i::after { content: ''; position: absolute; left: 0; width: 16px; height: 1.5px; background: var(--t-ink); transition: transform .25s var(--e-out); }
.nav-burger i::before { top: -5px; }
.nav-burger i::after { top: 5px; }
body.menu-open .nav-burger i { background: transparent; }
body.menu-open .nav-burger i::before { transform: translateY(5px) rotate(45deg); }
body.menu-open .nav-burger i::after { transform: translateY(-5px) rotate(-45deg); }

.nav-sheet { display: none; position: fixed; inset: 63px 0 0; z-index: 55; background: var(--cream); padding: 14px 22px 40px; overflow-y: auto; opacity: 0; transform: translateY(-8px); transition: opacity .22s ease, transform .26s var(--e-out); }
.nav-sheet a { display: block; padding: 14px 0; font-size: 17px; color: var(--t-ink); border-bottom: 1px solid var(--line-soft); }
.nav-sheet a small { display: block; font-size: 13px; color: var(--smoke); margin-top: 2px; }
/* the collapsible What-we-build section */
.ns-acc { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: none; border: none; border-bottom: 1px solid var(--line-soft); padding: 14px 0; font-family: var(--sans); font-size: 17px; color: var(--t-ink); text-align: left; cursor: pointer; }
.ns-acc svg { width: 13px; height: 13px; color: var(--smoke); transition: transform .24s var(--e-out); flex-shrink: 0; }
.ns-acc[aria-expanded="true"] svg { transform: rotate(180deg); }
.ns-list { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .32s var(--e-out); }
.ns-list > div { overflow: hidden; min-height: 0; }
.nav-sheet.products-open .ns-list { grid-template-rows: 1fr; }
.ns-list a { padding: 12px 0 12px 16px; font-size: 15.5px; }
.ns-list a small { font-size: 12.5px; }
/* The CTA must restate everything .nav-sheet a sets, or it inherits ink text on
   an ink background and renders as a blank dark slab (specificity: .nav-sheet a
   is 0,1,1 and out-specifies .btn-pine at 0,1,0). A utility class inside the
   sheet has to be declared as a sheet rule or it silently loses. */
.nav-sheet a.btn { display: flex; justify-content: center; width: 100%; margin-top: 26px; padding: 15px; font-size: 15px; border-bottom: 0; border-radius: 12px; background: var(--pine); color: var(--cream); }
body.menu-open { overflow: hidden; }
body.menu-open .nav-sheet { display: block; opacity: 1; transform: none; }

@media (max-width: 1060px) {
  .nav-links { gap: 20px; }
  .nav-links > a, .nav-drop > button { font-size: 13.5px; }
  .nav-panel { width: 520px; }
}
@media (max-width: 880px) {
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: flex; }
  .nav-inner { padding: 14px 22px; }
}

/* ---------- Footer ---------- */
footer { background: var(--ink); color: var(--t-cream); border-top: 1px solid var(--line-ink); }
.footer-inner { padding: 72px 32px 40px; }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 56px 40px; padding-bottom: 52px; border-bottom: 1px solid var(--line-ink); }
.footer-brand { max-width: 32ch; }
.footer-brand .wm { font-size: 30px; color: var(--t-cream); margin-bottom: 16px; }
.footer-brand p { font-size: 14.5px; color: var(--t-cream-2); line-height: 1.55; }
.footer-addr { font-style: normal; margin-top: 18px; font-size: 13.5px; line-height: 1.6; color: var(--t-cream-2); }
.footer-social { display: inline-flex; align-items: center; gap: 9px; margin-top: 18px; padding: 8px 13px 8px 11px; border: 1px solid var(--line-ink); border-radius: 9px; font-size: 13.5px; color: var(--t-cream); opacity: .82; transition: opacity .15s ease, border-color .15s ease; }
.footer-social:hover { opacity: 1; border-color: rgba(242,235,224,.34); }
.footer-social svg { flex-shrink: 0; }
.footer-col h5 { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--t-cream-2); margin-bottom: 16px; }
.footer-col a { display: block; font-size: 14.5px; color: var(--t-cream); opacity: .82; padding: 5px 0; transition: opacity .15s ease; }
.footer-col a:hover { opacity: 1; }
.footer-bottom { padding-top: 28px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-bottom .mono { color: var(--t-cream-2); font-family: var(--mono); font-size: 12px; }

@media (max-width: 960px) {
  .footer-top { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; max-width: none; }
}
@media (max-width: 720px) {
  .wrap, .wrap-wide { padding: 0 22px; }
  .section { padding: 80px 0; }
  /* .wrap's mobile shorthand zeroes the top padding, so restate it here */
  .footer-inner { padding: 56px 22px 34px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 36px 24px; padding-bottom: 36px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-col a { padding: 9px 0; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .nav-panel, .nav-sheet { transition: none; }
}

/* ---------------- contact section (every page) ---------------- */
.contact-sec { padding: 132px 0 128px; }
.contact-col { max-width: 620px; margin: 0 auto; }
.contact-col h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(38px, 4.4vw, 58px); line-height: 1.03; letter-spacing: -.03em; color: var(--t-cream); text-align: center; margin-bottom: 40px; }
.contact-col h2 .dot { color: var(--sage); }
.form-note { margin-top: 28px; text-align: center; font-size: 14.5px; color: var(--t-cream-2); }

.cform { background: var(--paper); border-radius: 20px; padding: 32px; box-shadow: 0 50px 100px -50px rgba(0,0,0,.7); }
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cf-field { margin-bottom: 16px; }
.cf-field label { display: block; font-family: var(--mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--smoke); margin-bottom: 8px; }
.cf-field input, .cf-field textarea { width: 100%; font-family: var(--sans); font-size: 15px; color: var(--t-ink); background: var(--cream); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; outline: none; transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.cf-field textarea { min-height: 122px; resize: vertical; line-height: 1.55; }
.cf-field input:focus, .cf-field textarea:focus { border-color: var(--pine); background: #fff; box-shadow: 0 0 0 3px rgba(44,74,60,.11); }
.cf-field input::placeholder, .cf-field textarea::placeholder { color: #A79E90; }
.cf-field.bad input, .cf-field.bad textarea { border-color: #A8493A; background: #FDF4F1; }
.cf-msg { display: none; margin-top: 7px; font-size: 12.5px; line-height: 1.45; color: #A8493A; }
.cf-field.bad .cf-msg { display: block; }
.cf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cf-send { width: 100%; margin-top: 6px; justify-content: center; font-size: 15px; padding: 15px 22px; }
.cf-note { margin-top: 14px; text-align: center; font-size: 12.5px; color: var(--smoke); }
.cf-err { display: none; margin-top: 14px; font-size: 13.5px; color: #A8493A; text-align: center; }
.cf-err.on { display: block; }
.cform.sent .cf-body { display: none; }
.cf-done { display: none; text-align: center; padding: 46px 10px; }
.cform.sent .cf-done { display: block; }
.cform.sent + .form-note { display: none; }
.cf-done-ic { width: 54px; height: 54px; margin: 0 auto 20px; border-radius: 50%; background: var(--pine); display: flex; align-items: center; justify-content: center; }
.cf-done-ic svg { width: 24px; height: 24px; color: var(--cream); }
.cf-done .big { font-family: var(--serif); font-size: clamp(30px, 4.5vw, 40px); letter-spacing: -.03em; color: var(--t-ink); }
.cf-done p { margin-top: 12px; font-size: 15.5px; color: var(--t-ink-2); line-height: 1.55; max-width: 44ch; margin-left: auto; margin-right: auto; }
.cf-done .cf-done-spam { margin-top: 14px; font-size: 14px; font-weight: 600; color: var(--t-ink); }

@media (max-width: 720px) {
  .contact-sec { padding: 84px 0 78px; }
  .contact-col h2 { margin-bottom: 28px; }
  .cform { padding: 22px; border-radius: 16px; }
  .cf-row { grid-template-columns: 1fr; gap: 0; }
}
