/* Fortine site styles.
   Loads after tokens.css and components.css (from the brand handoff; keep those
   files unedited so they can be replaced when the brand package updates). */

/* Site surface colors used by the approved website design (brand handoff site/index.html).
   Brand palette and UI colors come from tokens.css. */
:root {
  --butter: #FFF3B8;            /* navbar and hero band */
  --text: var(--color-woodsmoke);
  --text-muted: #5C4A3E;        /* secondary text on Birch, 8.5:1 */
  --text-label: var(--neutral-solid);
  --line: #DDD8CC;
  --line-soft: rgba(51, 35, 26, 0.10);
  --surface: #FFFFFF;
  --link-hover: #C2410C;
  --dark-text-muted: #C9C4BB;
  --dark-line: #2E3036;
  --dark-text-dim: #8E939B;
  --wrap: 1200px;
  --gutter: 24px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--color-birch);
  color: var(--text);
  font: 400 17px/1.6 var(--font-body);
}
img, svg { max-width: 100%; }
img { height: auto; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; color: inherit; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); line-height: 1.08; letter-spacing: -0.045em; margin: 0; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.15; letter-spacing: -0.04em; margin: 0; }
h3 { font-size: 1.25rem; line-height: 1.3; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }

code, pre, kbd { font-family: var(--font-display); font-size: 0.875em; }
:not(pre) > code { background: var(--neutral-tint); padding: 0.12em 0.4em; border-radius: 4px; }
pre {
  background: var(--color-charcoal); color: #D6D3CC;
  padding: 18px 20px; border-radius: 8px; overflow-x: auto; line-height: 1.7;
}

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.narrow { width: min(760px, 100% - 2 * var(--gutter)); }
.muted { color: var(--text-muted); }
.lede { font-size: 1.15rem; color: var(--text-muted); max-width: 600px; }
.eyebrow {
  margin: 0; font: 500 12px/1.5 var(--font-display); letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-label);
}
.eyebrow a { color: inherit; font-weight: inherit; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--surface); padding: 8px 12px; z-index: 10; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--color-fireside-orange); outline-offset: 3px; }

.mono-link { font: 500 14px/1.5 var(--font-display); color: var(--text); text-decoration: none; padding: 8px 0; }
.mono-link:hover { color: var(--link-hover); }

/* Bands */
.band-butter { background: var(--butter); }
.band-dark { background: var(--color-charcoal); color: var(--color-birch); }
.band-orange { background: var(--color-fireside-orange); color: var(--color-ember); }
.rule-top { border-top: 1px solid var(--line); }
.section { padding-block: clamp(64px, 9vw, 96px); display: flex; flex-direction: column; gap: 40px; }

.section-head { display: flex; flex-direction: column; gap: 14px; max-width: 680px; }
.section-head > p:not(.eyebrow) { color: var(--text-muted); }
.section-head.split { max-width: none; flex-flow: row wrap; align-items: end; justify-content: space-between; gap: 16px 40px; }
.section-head.split > h2 { max-width: 560px; }
.section-head.split > p { max-width: 460px; }
.section-head.split > div { display: flex; flex-direction: column; gap: 14px; }

/* Header */
.site-header { background: var(--butter); border-bottom: 1px solid var(--line-soft); }
.header-inner {
  padding-block: 18px; display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 12px 32px;
}
.brand { display: block; padding: 6px 0 10px; }
.brand img { display: block; height: 36px; width: auto; }
.site-header ul {
  list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center;
  gap: 4px 26px; font: 500 13px/1.5 var(--font-display);
}
.site-header nav a { display: block; padding: 12px 0; color: var(--text); text-decoration: none; font-weight: 500; }
.site-header nav a:hover { color: var(--link-hover); }
.site-header nav a[aria-current] { text-decoration: underline; text-decoration-color: var(--color-fireside-orange); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.site-header nav .nav-cta { padding: 12px 18px; background: var(--color-woodsmoke); color: var(--color-birch); border-radius: 4px; }
.site-header nav .nav-cta:hover { color: var(--color-birch); background: var(--color-ember); }
.site-header nav .nav-cta[aria-current] { text-decoration: none; }

/* Buttons (marketing CTAs; app-style buttons use .btn from components.css) */
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 24px;
  background: var(--color-fireside-orange); color: var(--color-ember);
  border: 2px solid var(--color-fireside-orange); border-radius: 4px;
  font: 700 17px/1.2 var(--font-body); text-decoration: none; cursor: pointer;
}
.button:hover { color: var(--color-ember); filter: brightness(1.06); }
.button.outline { background: transparent; border-color: var(--color-woodsmoke); color: var(--color-woodsmoke); font-weight: 600; padding: 0 22px; }
.button.outline:hover { background: var(--color-woodsmoke); color: var(--color-birch); filter: none; }
.button.dark { background: var(--color-ember); border-color: var(--color-ember); color: var(--color-birch); min-height: 52px; padding: 0 28px; }
.button.dark:hover { color: var(--color-birch); filter: brightness(1.4); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Hero */
.hero { padding-block: clamp(56px, 9vw, 88px) clamp(64px, 10vw, 96px); display: flex; flex-wrap: wrap; align-items: center; gap: 56px; }
.hero-copy { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 4rem); }
.hero .lede { font-size: 19px; max-width: 560px; }
.hero-terminal { flex: 1 1 360px; min-width: 0; }
.terminal { background: var(--color-charcoal); border-radius: 10px; overflow: hidden; box-shadow: 0 18px 40px -24px rgba(20, 22, 26, 0.6); }
.terminal-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid #2A2C31; }
.terminal-bar span { width: 10px; height: 10px; border-radius: 50%; background: #3A3D44; }
.terminal-bar em { margin-left: 8px; font: normal 11px var(--font-display); color: var(--dark-text-dim); }
.terminal-body { padding: 22px 20px 26px; font: 13px/1.9 var(--font-display); color: #D6D3CC; overflow-x: auto; }
.terminal-body div { white-space: pre; }
.terminal-body .dim { color: var(--dark-text-dim); }
.terminal-body b { color: var(--color-fireside-orange); font-weight: 400; }
.cursor { display: inline-block; width: 0.6em; height: 1.1em; vertical-align: -0.2em; background: var(--color-fireside-orange); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }

/* What we build */
.band-dark .section-head p { color: var(--dark-text-muted); }
.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1px;
  background: var(--dark-line); border: 1px solid var(--dark-line);
}
.feature-grid article { background: var(--color-charcoal); padding: 30px 26px; display: flex; flex-direction: column; gap: 12px; }
.feature-grid svg { color: var(--color-fireside-orange); }
.feature-grid h3 { font-family: var(--font-body); font-size: 20px; letter-spacing: 0; }
.feature-grid p { color: var(--dark-text-muted); font-size: 16px; }
.specialties { color: var(--dark-text-muted); font-size: 15px; }
.specialties a { color: var(--color-birch); font-weight: 500; }
.specialties a:hover { color: var(--color-fireside-orange); }

/* Products */
.product-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.product { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 30px; display: flex; flex-direction: column; gap: 14px; }
.product-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.product h3 { padding-bottom: 4px; line-height: 0; }
.product h3 img { height: 30px; width: auto; }
.product p { color: var(--text-muted); font-size: 16px; }
.product .mono-link { margin-top: auto; }
.pill {
  font: 500 11px/1.5 var(--font-display); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
  color: var(--text-label); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px;
}
.install { align-self: flex-start; font-size: 13px; background: var(--color-charcoal); color: var(--color-birch); border-radius: 4px; padding: 6px 10px; }
.install b { color: var(--color-fireside-orange); font-weight: 400; }
@media (max-width: 720px) {
  .product-row {
    display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-inline: calc(-1 * var(--gutter)); padding: 0 var(--gutter) 8px; scroll-padding-inline: var(--gutter);
  }
  .product-row::-webkit-scrollbar { display: none; }
  .product { flex: 0 0 84%; min-width: 0; padding: 24px; scroll-snap-align: start; }
  .product-top { flex-wrap: wrap; }
}

/* Process */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 28px; }
.steps li { display: flex; flex-direction: column; gap: 10px; padding-top: 18px; border-top: 3px solid var(--color-fireside-orange); }
.steps span { font: 700 13px/1.5 var(--font-display); }
.steps p { font-size: 16px; color: var(--text-muted); }
#process { padding-top: 24px; }

/* Principles */
.principles { flex-flow: row wrap; gap: 40px 64px; }
.principles > div { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.principles > div p { color: var(--text-muted); max-width: 420px; }
.principles dl { flex: 2 1 520px; min-width: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px 36px; }
.principles dl div { display: flex; flex-direction: column; gap: 6px; }
.principles dt { font-weight: 700; font-size: 18px; }
.principles dd { margin: 0; color: var(--text-muted); font-size: 16px; }

/* Post lists */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { display: flex; flex-direction: column; gap: 6px; padding: 24px 0; border-top: 1px solid var(--line); }
.post-list li:last-child { border-bottom: 1px solid var(--line); }
.post-list h3 a { color: var(--text); text-decoration: none; font-weight: 700; }
.post-list h3 a:hover { color: var(--link-hover); }
.post-list p:not(.meta) { color: var(--text-muted); font-size: 16px; }
.meta { font: 500 12px/1.5 var(--font-display); letter-spacing: 0.04em; color: var(--text-label); }
.post-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.post-grid li, .post-grid li:last-child {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 26px; position: relative;
}
.post-grid li:hover { border-color: var(--color-woodsmoke); }
.post-grid h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 8px; }

/* Page and post headers */
.page-head { padding-block: clamp(48px, 7vw, 72px); display: flex; flex-direction: column; gap: 18px; }
.page-head h1 { max-width: 20ch; }
.post-head h1 { max-width: none; font-size: clamp(2rem, 4.4vw, 3rem); }

/* Long-form content */
.prose { padding-block: 48px 64px; font-size: 18px; line-height: 1.7; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: clamp(1.4rem, 2.6vw, 1.75rem); margin-top: 2em; }
.prose h3 { font-size: 1.2rem; margin-top: 1.75em; }
.prose h2 + *, .prose h3 + * { margin-top: 0.6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.35em; }
.prose li::marker { color: var(--color-fireside-orange); }
.prose blockquote { margin-inline: 0; padding-left: 20px; border-left: 3px solid var(--color-fireside-orange); color: var(--text-muted); }
.prose img { border-radius: 8px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: 2.5em; }
.prose table { border-collapse: collapse; width: 100%; font-size: 16px; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.prose .alert { font-size: 15px; }
.post-footer { margin-top: 56px !important; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }

/* Cards inside markdown pages (services) */
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: 24px; color: var(--text); text-decoration: none; font-weight: 400;
}
.card:hover { border-color: var(--color-woodsmoke); color: var(--text); }
.card h3 { margin: 0 !important; }
.card p { margin: 0 !important; color: var(--text-muted); font-size: 16px; }
.more-services { padding-bottom: 72px; display: flex; flex-direction: column; gap: 18px; }
.more-services h2 { font-size: 1.25rem; }
.link-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.link-grid a {
  display: flex; justify-content: space-between; padding: 14px 18px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--text); text-decoration: none; font-weight: 500;
}
.link-grid a:hover { border-color: var(--color-woodsmoke); }

/* CTA band */
.cta { padding-block: 80px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px 48px; }
.cta > div:first-child { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.cta h2 { font-size: clamp(1.6rem, 3.4vw, 2.6rem); line-height: 1.12; color: var(--color-ember); }
.cta p { color: #2A1A10; max-width: 520px; }
.cta-actions { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.cta-email { font: 500 13px var(--font-display); color: var(--color-ember); text-decoration: none; }
.cta-email:hover { color: var(--color-ember); text-decoration: underline; }
.band-orange a:focus-visible { outline-color: var(--color-ember); }

/* Contact form */
.contact-form { display: grid; gap: 18px; }
.contact-form label { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
.contact-form input, .contact-form select, .contact-form textarea {
  font: 400 16px/1.5 var(--font-body); color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-control); padding: 10px 12px; width: 100%;
}
.contact-form .button { justify-self: start; }
.hp { position: absolute; left: -9999px; }

/* Footer */
.site-footer { background: var(--color-charcoal); color: var(--dark-text-muted); font-size: 15px; }
.footer-inner { padding-block: 56px 32px; display: grid; gap: 32px; grid-template-columns: 1.4fr repeat(3, 1fr); }
@media (max-width: 860px) { .footer-inner { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } }
.footer-brand { display: flex; flex-direction: column; gap: 10px; }
.footer-brand img { display: block; height: 30px; width: auto; margin-bottom: 8px; }
.footer-brand p { font: 400 12px/1.6 var(--font-display); }
.footer-heading { font: 500 12px/1.5 var(--font-display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--dark-text-dim); margin: 0 0 12px; }
.plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--color-birch); font-weight: 400; text-decoration: none; }
.site-footer a:hover { color: var(--color-fireside-orange); }
.copyright { padding-block: 20px 40px; border-top: 1px solid var(--dark-line); font: 12px/1.6 var(--font-display); color: var(--dark-text-dim); }
