/* Brew-IT Software — site styles */

:root {
  --orange: #d8692b;
  --orange-strong: #b4511a;   /* text/links on light bg (AA) */
  --orange-btn: #c2581c;      /* button bg with white text (AA) */
  --charcoal: #262321;
  --ink: #2a2622;
  --muted: #645b53;
  --cream: #faf6f0;
  --sand: #f2eadf;
  --foam: #c4c0bb;
  --line: #e4dacd;
  --white: #fff;
  --dark: #1f1c1a;
  --dark-2: #2b2724;

  --font-head: "Outfit", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(38, 35, 33, .06), 0 8px 24px rgba(38, 35, 33, .07);
  --wrap: 1140px;
  --gutter: clamp(1rem, 4vw, 2rem);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
}

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--charcoal);
  line-height: 1.15;
  margin: 0 0 .6em;
  font-weight: 600;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.25rem, 5.2vw, 3.6rem); font-weight: 600; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

a { color: var(--orange-strong); text-underline-offset: 3px; }
a:hover { color: var(--charcoal); }

:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--charcoal); color: var(--white); padding: .6rem 1rem; z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; color: var(--white); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 246, 240, .92);
  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-bottom-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 1rem; }

.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--charcoal); }
.brand img { width: 40px; height: 40px; }
.brand-text { display: flex; flex-direction: column; line-height: 1; font-family: var(--font-head); }
.brand-name { font-size: 1.6rem; letter-spacing: -0.01em; }
.brand-name .b { color: var(--orange); }
.brand-sub { font-size: .62rem; letter-spacing: .48em; text-transform: lowercase; margin-top: .2rem; padding-left: .1rem; }

.nav-links { display: flex; align-items: center; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: .5rem .85rem; border-radius: var(--radius-sm);
  font-family: var(--font-head); font-weight: 500; text-decoration: none; color: var(--charcoal);
}
.nav-links a:hover { background: var(--sand); color: var(--charcoal); }
.nav-links a[aria-current="page"] { color: var(--orange-strong); }
.nav-links .btn { margin-left: .5rem; }

.nav-toggle {
  display: none; background: none; border: 0; padding: .5rem; cursor: pointer; color: var(--charcoal);
  border-radius: var(--radius-sm);
}
.nav-toggle svg { width: 28px; height: 28px; }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--cream); border-bottom: 1px solid var(--line);
    padding: .5rem var(--gutter) 1.25rem;
    box-shadow: 0 12px 24px rgba(38,35,33,.08);
  }
  .nav-links:not(.open) { display: none; }
  .nav-links a { padding: .85rem .5rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-links li:last-child a { border-bottom: 0; }
  .nav-links .btn { margin: 1rem 0 0; text-align: center; border-radius: var(--radius-sm); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.4rem; border-radius: 999px; border: 2px solid transparent;
  font-family: var(--font-head); font-weight: 600; font-size: 1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.btn-primary { background: var(--orange-btn); color: var(--white) !important; }
.btn-primary:hover { background: #a54814; }
.btn-ghost { border-color: var(--charcoal); color: var(--charcoal); background: transparent; }
.btn-ghost:hover { background: var(--charcoal); color: var(--white); }
.btn-light { background: var(--white); color: var(--charcoal); }
.btn-light:hover { background: var(--sand); color: var(--charcoal); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section-sand { background: var(--sand); }
.section-dark { background: var(--dark); color: #e9e2d9; }
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark a:not(.btn) { color: #f0a070; }

.eyebrow {
  display: inline-block; font-family: var(--font-head); font-weight: 600; font-size: .85rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--orange-strong); margin-bottom: .9rem;
}
.section-dark .eyebrow { color: #f0a070; }
.section-head { max-width: 680px; margin-bottom: 2.75rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.lead { font-size: 1.2rem; color: var(--muted); }
.section-dark .lead { color: #c9bfb3; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(3rem, 8vw, 6rem) clamp(3.5rem, 8vw, 6.5rem); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 .accent { color: var(--orange); }
.hero .lead { max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.hero-note { margin-top: 1.5rem; color: var(--muted); font-size: .95rem; display: flex; align-items: center; gap: .5rem; }
.hero-note svg { width: 18px; height: 18px; color: var(--orange); flex: none; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}

/* Stack illustration */
.stack {
  background: var(--white); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: var(--shadow); padding: 1.25rem; position: relative;
}
.stack-title {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-head); font-size: .85rem; color: var(--muted); padding: .25rem .25rem 1rem;
}
.stack-title .dots { display: flex; gap: 6px; }
.stack-title .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); display: block; }
.layer {
  display: flex; align-items: center; gap: 1rem;
  padding: .95rem 1.1rem; border-radius: 12px; background: var(--cream); border: 1px solid var(--line);
}
.layer + .layer { margin-top: .6rem; }
.layer-icon {
  width: 42px; height: 42px; border-radius: 10px; flex: none;
  display: grid; place-items: center; background: var(--sand); color: var(--orange-strong);
}
.layer-icon svg { width: 22px; height: 22px; }
.layer strong { display: block; font-family: var(--font-head); color: var(--charcoal); font-weight: 600; }
.layer span { font-size: .92rem; color: var(--muted); }
.layer .status {
  margin-left: auto; display: flex; align-items: center; gap: .4rem; font-size: .8rem; color: #2f7a4b;
  font-family: var(--font-head); font-weight: 500; white-space: nowrap;
}
.layer .status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #3aa864; box-shadow: 0 0 0 3px rgba(58,168,100,.18); }
.layer.cloud { background: var(--charcoal); border-color: var(--charcoal); }
.layer.cloud strong { color: var(--white); }
.layer.cloud span { color: #c9bfb3; }
.layer.cloud .layer-icon { background: var(--dark-2); color: #f0a070; }
@media (max-width: 460px) { .layer .status { display: none; } }

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

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.75rem; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.card p { color: var(--muted); }
.card ul { margin: 0 0 1.25rem; padding-left: 1.1rem; color: var(--muted); }
.card ul li + li { margin-top: .3rem; }
.more { font-family: var(--font-head); font-weight: 600; text-decoration: none; }
.more::after { content: " →"; }
.icon-badge {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: #fbe6d8; color: var(--orange-strong); margin-bottom: 1.25rem;
}
.icon-badge svg { width: 26px; height: 26px; }

/* Process steps */
.steps { counter-reset: step; }
.step { position: relative; padding-top: 3.25rem; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; top: 0; left: 0;
  font-family: var(--font-head); font-weight: 600; font-size: 1.1rem; color: var(--orange);
  width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 2px solid var(--orange);
  display: grid; place-items: center;
}
.step h3 { margin-bottom: .35rem; }
.step .brew { display: block; font-size: .85rem; font-family: var(--font-head); color: var(--orange-strong); letter-spacing: .04em; margin-bottom: .5rem; }
.step p { color: var(--muted); margin: 0; }
.section-dark .step p { color: #c9bfb3; }
.section-dark .step .brew { color: #f0a070; }

/* Tech tags */
.tags { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; padding: 0; margin: 0; }
.tags li {
  padding: .45rem .95rem; border-radius: 999px; background: var(--white); border: 1px solid var(--line);
  font-family: var(--font-head); font-weight: 500; font-size: .95rem; color: var(--charcoal);
}

/* Feature list (why us) */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem 3rem; }
@media (max-width: 720px) { .features { grid-template-columns: 1fr; } }
.feature { display: flex; gap: 1rem; }
.feature .check {
  flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--orange-btn); color: var(--white);
  display: grid; place-items: center; margin-top: .15rem;
}
.feature .check svg { width: 18px; height: 18px; }
.feature h3 { font-size: 1.15rem; margin-bottom: .3rem; }
.feature p { color: var(--muted); margin: 0; }

/* Case study teaser */
.case {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-radius: 20px; overflow: hidden;
  background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.case-body { padding: clamp(1.75rem, 4vw, 3rem); }
.case-visual {
  background: linear-gradient(160deg, var(--charcoal), #3a332e);
  padding: clamp(1.75rem, 4vw, 3rem); color: #e9e2d9; display: flex; flex-direction: column; justify-content: center; gap: .75rem;
}
@media (max-width: 820px) { .case { grid-template-columns: 1fr; } }

.flow { display: flex; flex-direction: column; gap: .55rem; }
.flow-item {
  display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; border-radius: 10px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); font-family: var(--font-head); font-size: .95rem;
}
.flow-item b { color: #f0a070; font-weight: 600; min-width: 1.5rem; }
.flow-item.done { border-color: rgba(58,168,100,.5); }
.flow-item.done::after { content: "Approved"; margin-left: auto; font-size: .8rem; color: #7fd6a0; }

/* CTA band */
.cta-band {
  background: var(--orange-btn); color: var(--white); border-radius: 22px;
  padding: clamp(2rem, 5vw, 3.5rem); display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
  background-image: radial-gradient(circle at 90% 10%, rgba(255,255,255,.14), transparent 45%);
}
.cta-band h2 { color: var(--white); margin-bottom: .35rem; }
.cta-band p { margin: 0; color: #fde8da; font-size: 1.1rem; max-width: 560px; }

/* Page header (interior pages) */
.page-hero { padding-block: clamp(3rem, 7vw, 5rem) clamp(2rem, 5vw, 3rem); }
.page-hero .lead { max-width: 720px; }

/* Service detail blocks */
.service {
  display: grid; grid-template-columns: 320px 1fr; gap: clamp(1.5rem, 4vw, 3.5rem);
  padding-block: clamp(2.5rem, 5vw, 3.5rem); border-top: 1px solid var(--line);
}
.service:first-of-type { border-top: 0; padding-top: 0; }
.service-intro p { color: var(--muted); }
.service-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.service-list .item { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1.1rem 1.25rem; }
.service-list h4 { font-size: 1.05rem; margin-bottom: .25rem; }
.service-list p { color: var(--muted); font-size: .97rem; margin: 0; }
@media (max-width: 860px) {
  .service { grid-template-columns: 1fr; }
}
@media (max-width: 560px) { .service-list { grid-template-columns: 1fr; } }

/* Case study page */
.prose { max-width: 760px; }
.prose h2 { margin-top: 2.5rem; font-size: 1.7rem; }
.prose ul { padding-left: 1.2rem; }
.prose li + li { margin-top: .4rem; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 2rem 0 0; }
.facts div { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem 1.2rem; }
.facts dt { font-family: var(--font-head); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: .2rem 0 0; font-family: var(--font-head); font-weight: 600; color: var(--charcoal); }
@media (max-width: 640px) { .facts { grid-template-columns: 1fr; } }

/* Products */
.product {
  display: grid; grid-template-columns: auto 1fr; gap: 1.5rem; align-items: start;
}
.pill {
  display: inline-block; font-family: var(--font-head); font-weight: 600; font-size: .78rem; letter-spacing: .08em;
  text-transform: uppercase; padding: .3rem .7rem; border-radius: 999px; background: #fbe6d8; color: var(--orange-strong);
  margin-bottom: .75rem;
}
@media (max-width: 560px) { .product { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-points { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1.25rem; }
.contact-points li { display: flex; gap: .9rem; align-items: flex-start; }
.contact-points .icon-badge { width: 44px; height: 44px; margin: 0; border-radius: 12px; flex: none; }
.contact-points .icon-badge svg { width: 22px; height: 22px; }
.contact-points strong { display: block; font-family: var(--font-head); color: var(--charcoal); }
.contact-points span, .contact-points a { color: var(--muted); }

.form { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: clamp(1.5rem, 4vw, 2.5rem); box-shadow: var(--shadow); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-family: var(--font-head); font-weight: 500; font-size: .95rem; margin-bottom: .35rem; color: var(--charcoal); }
.field label .opt { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  padding: .75rem .9rem; border: 1.5px solid #d6cabb; border-radius: var(--radius-sm); background: var(--cream);
  transition: border-color .15s, background .15s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--orange); background: var(--white); box-shadow: 0 0 0 3px rgba(216,105,43,.18); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: .88rem; color: var(--muted); margin: 1rem 0 0; }
.form-status { margin-top: 1rem; padding: .9rem 1.1rem; border-radius: var(--radius-sm); font-weight: 500; }
.form-status.ok { background: #e5f4ea; color: #1f5c36; }
.form-status.err { background: #fbe6e1; color: #8a2a17; }
.form button[disabled] { opacity: .7; cursor: progress; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: #b9afa4; padding-block: 3.5rem 2rem; font-size: .97rem; }
.site-footer a { color: #e9e2d9; text-decoration: none; }
.site-footer a:hover { color: #f0a070; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer .brand { color: var(--white); }
.site-footer .brand-name .it { color: var(--white); }
.site-footer h4 { color: var(--white); font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.footer-blurb { margin-top: 1rem; max-width: 340px; }
.footer-bottom { border-top: 1px solid #3a3430; margin-top: 2.5rem; padding-top: 1.5rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: .88rem; }

/* Utilities */
.mt-0 { margin-top: 0; }
.center { text-align: center; }
.muted { color: var(--muted); }
.stack-gap > * + * { margin-top: 1rem; }
.card .more { margin-top: auto; }
