/* ============================================
   SFN_MFG — stylesheet
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-bg: #faf9f7;
  --color-surface: #f2efe9;
  --color-border: #dedad3;
  --color-text: #1c1a17;
  --color-text-muted: #6b6358;
  --color-accent: #b8734a;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --max-width: 1200px;
  --spacing-section: 96px;
}

html { font-size: 16px; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* --- Skip link --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  padding: 12px 24px;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 200;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* --- Decorative italic --- */
.italic { font-style: italic; }

/* --- Typography --- */
h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5.5vw, 4.5rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.75rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); }

p { max-width: 65ch; }

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 64px);
}

.section { padding-block: var(--spacing-section); }
.section--surface { background-color: var(--color-surface); }
.section--dark { background-color: var(--color-text); color: #fff; }

/* --- Navigation --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.nav__logo-img {
  height: 32px;
  width: 32px;
  object-fit: contain;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav__toggle span {
  display: block;
  height: 1.5px;
  background-color: var(--color-text);
  transition: opacity 0.2s;
}

.nav__links {
  display: flex;
  list-style: none;
  gap: 40px;
}

.nav__links a {
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  transition: color 0.2s;
}

.nav__links a:hover {
  color: var(--color-text);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
  border: 1.5px solid transparent;
}

.btn--primary {
  background-color: var(--color-text);
  color: #ffffff;
  border-color: var(--color-text);
}

.btn--primary:hover { background-color: #444; border-color: #444; }

.btn--outline {
  background-color: transparent;
  color: var(--color-text);
  border-color: var(--color-text);
}

.btn--outline:hover {
  background-color: var(--color-text);
  color: #ffffff;
}

.btn--outline-light {
  background-color: transparent;
  color: #ffffff;
  border: 1.5px solid rgba(255,255,255,0.5);
}

.btn--outline-light:hover {
  background-color: #fff;
  color: var(--color-text);
  border-color: #fff;
}

/* --- Focus styles --- */
:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 3px;
}

.btn:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.hero .btn--primary:focus-visible,
.hero .btn--outline-light:focus-visible {
  outline-color: #fff;
}

/* --- Hero (full-width image) --- */
.hero {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.45) sepia(0.25);
}

.hero__content {
  position: relative;
  z-index: 1;
  padding-block: 96px;
  color: #ffffff;
}

.hero__eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  margin-bottom: 20px;
}

.hero__title { margin-bottom: 24px; color: #fff; }

.hero__subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 40px;
  max-width: 52ch;
}

.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* --- Section Headers --- */
.section-header { margin-bottom: 56px; }
.section-header--center { text-align: center; }
.section-header--center p { margin-inline: auto; }

.section-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 12px;
}

.section-header h2 { margin-bottom: 16px; }
.section-header p { color: var(--color-text-muted); font-size: 1.05rem; }

/* --- Feature Grid (why us / capabilities) --- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 48px;
}

.feature-item__icon {
  font-size: 1rem;
  margin-bottom: 16px;
  line-height: 1;
  color: var(--color-accent);
}

.feature-item h3 { margin-bottom: 10px; }

.feature-item p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

/* --- Two-column layout --- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

/* --- Split Section --- */
.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.split-section__image {
  min-height: 420px;
  overflow: hidden;
}

.split-section__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.split-section__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(40px, 6vw, 80px);
}

.split-section__content p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  margin-bottom: 24px;
}

/* --- Page Hero (inner pages) --- */
.page-hero {
  padding-block: clamp(60px, 10vw, 112px);
  border-bottom: 1px solid var(--color-border);
}

.page-hero__eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

.page-hero p {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  margin-top: 20px;
  max-width: 60ch;
}

/* --- Prose (body copy blocks) --- */
.prose {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 68ch;
}

.prose p {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  max-width: 100%;
}

.prose--wide { max-width: 80ch; }

/* --- Contact --- */
.contact-email {
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
  padding-block: 16px;
}

.contact-email__link {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 400;
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 6px;
  transition: color 0.2s;
}

.contact-email__link:hover { color: var(--color-text-muted); }

/* --- Form --- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.contact-info h2 { margin-bottom: 16px; }

.contact-info > p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  margin-bottom: 40px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: 1.5px solid var(--color-border);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.field input:focus-visible,
.field textarea:focus-visible,
.field select:focus-visible {
  border-color: var(--color-text);
  box-shadow: 0 0 0 3px rgba(26,26,26,0.12);
  outline: none;
}

.field textarea { resize: vertical; min-height: 140px; }

/* --- Footer --- */
.site-footer {
  background-color: var(--color-text);
  color: #ffffff;
  padding-block: 40px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.footer-logo__img {
  height: 28px;
  width: 28px;
  object-fit: contain;
  filter: invert(1);
}

.footer-copy {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  margin: 0;
  max-width: none;
}

/* --- Quote Widget iframe --- */
.quote-widget {
  display: block;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.quote-widget iframe {
  display: block;
  width: 900px;
  max-width: 100%;
  height: 700px;
  border: none;
}

/* --- Divider --- */
hr.divider {
  height: 1px;
  background-color: var(--color-border);
  border: none;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .split-section { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  :root { --spacing-section: 56px; }
  .nav__toggle { display: flex; }
  .nav__links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background-color: #fff;
    border-bottom: 1px solid var(--color-border);
    padding-block: 8px;
  }
  .nav__links--open { display: flex; }
  .nav__links li a {
    display: block;
    padding: 14px clamp(20px, 5vw, 64px);
  }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
