/* RFL Engineering — site stylesheet
   Flat colour, hairline rules, no shadows, no gradients.
   ------------------------------------------------------------------ */

:root {
  --white: #ffffff;
  --panel: #f3f4f5;
  --rule: #c9cdd2;
  --rule-strong: #1f2326;
  --graphite: #1f2326;
  --graphite-2: #2b3034;
  --ink: #1f2326;
  --ink-2: #4a5056;
  --ink-3: #6b7075;
  --blue: #1c4f8a;
  --blue-dark: #163f6e;
  --on-dark: #e9ebed;
  --on-dark-2: #aeb4ba;

  --sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", Consolas, "Liberation Mono", monospace;

  --wrap: 1240px;
  --gutter: 32px;
  --col-gap: 32px;
}

/* Base ------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

h1 { font-size: 52px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; }
h2 { font-size: 32px; }
h3 { font-size: 18px; }

.body-lg { font-size: 19px; line-height: 1.5; color: var(--ink); }
.lede { font-size: 20px; line-height: 1.45; color: var(--ink-2); max-width: 34em; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 20px;
}

/* Layout ----------------------------------------------------------- */

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--col-gap);
  row-gap: 40px;
  align-items: start;
}
.col-4 { grid-column-end: span 4; }
.col-5 { grid-column-end: span 5; }
.col-6 { grid-column-end: span 6; }
.col-7 { grid-column-end: span 7; }
.col-start-6 { grid-column-start: 6; }
.col-start-7 { grid-column-start: 7; }
.col-start-8 { grid-column-start: 8; }
.col-start-9 { grid-column-start: 9; }

.section { padding: 88px 0; border-top: 1px solid var(--rule); }
.section-alt { background: var(--panel); }
.section-dark { background: var(--graphite); color: var(--on-dark); border-top: 0; }
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark .body-lg { color: var(--on-dark); }
.section-dark a { color: var(--white); }
.section-dark .btn-light { color: var(--ink); }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 24px;
  padding-bottom: 20px;
  margin-bottom: 44px;
  border-bottom: 1px solid var(--rule-strong);
}
.index {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  flex: 0 0 auto;
}
.index-light { display: block; color: var(--on-dark-2); margin-bottom: 20px; }

/* Buttons ---------------------------------------------------------- */

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  padding: 14px 22px;
  border: 1px solid transparent;
  border-radius: 0;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.btn-secondary { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--white); }
.btn-light { background: var(--white); border-color: var(--white); color: var(--ink); }
.btn-light:hover { background: var(--on-dark); border-color: var(--on-dark); }
.btn-sm { font-size: 14px; padding: 10px 16px; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 32px; }

/* Header ----------------------------------------------------------- */

.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--white);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand img { height: 40px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a { color: var(--ink); font-weight: 500; font-size: 15px; }
.site-nav a:hover { color: var(--blue); text-decoration: none; }
.site-nav a.btn { color: var(--white); margin-left: 8px; }
.site-nav a.btn:hover { color: var(--white); }

.nav-toggle {
  display: none;
  font: 600 14px var(--sans);
  background: none;
  border: 1px solid var(--ink);
  padding: 8px 14px;
  color: var(--ink);
  cursor: pointer;
}

/* Hero ------------------------------------------------------------- */

.hero { padding: 72px 0 0; }
.hero .grid { align-items: start; }
.hero-text { padding-top: 24px; }
.hero h1 { max-width: 12em; margin-bottom: 24px; }

.hero-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0 8px;
  margin: 56px 0 0;
  padding: 18px 0;
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
}
.hero-strip span + span::before { content: "\00B7"; margin-right: 8px; color: var(--ink-3); }

/* Photography placeholders ----------------------------------------- */

.ph {
  margin: 0;
  position: relative;
  background: #e6e8ea;
  border: 1px solid var(--rule);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.ph::before {
  /* thin diagonal to make the placeholder obviously not a photo */
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top right, transparent calc(50% - 0.5px), var(--rule) calc(50% - 0.5px), var(--rule) calc(50% + 0.5px), transparent calc(50% + 0.5px));
  pointer-events: none;
}
.ph-label {
  position: relative;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.45;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  padding: 10px 12px;
  background: rgba(255,255,255,0.85);
  border-top: 1px solid var(--rule);
  width: 100%;
}
.ph-hero { aspect-ratio: 5 / 4; }
.ph-tall { aspect-ratio: 3 / 4; margin-top: 40px; }
.ph-dark { aspect-ratio: 4 / 5; background: var(--graphite-2); border-color: #3b4146; }
.ph-dark::before {
  background: linear-gradient(to top right, transparent calc(50% - 0.5px), #3b4146 calc(50% - 0.5px), #3b4146 calc(50% + 0.5px), transparent calc(50% + 0.5px));
}
.ph-dark .ph-label { background: rgba(31,35,38,0.9); color: var(--on-dark-2); border-top-color: #3b4146; }

/* Real photographs (replace placeholders once uploaded) */
.photo { margin: 0; border: 1px solid var(--rule); overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo.ph-hero { aspect-ratio: 5 / 4; }
.photo.ph-tall { aspect-ratio: 3 / 4; margin-top: 40px; }
.photo.ph-dark { aspect-ratio: 4 / 5; border-color: #3b4146; }

/* Form states */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-sent { font-size: 19px; color: var(--ink); padding: 24px 0; border-top: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule); }
.form-error { font-size: 14px; color: #7a1f1f; border: 1px solid #a33; padding: 10px 12px; margin-bottom: 16px; }

/* Ruled list (section 01) ------------------------------------------ */

.ruled-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.ruled-list li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
}
.rl-key {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-top: 4px;
}
.rl-body h3 { margin-bottom: 8px; }
.rl-body p { color: var(--ink-2); }

/* Routes table (section 02) ---------------------------------------- */

.routes { border-top: 1px solid var(--rule-strong); }
.route {
  display: grid;
  grid-template-columns: 48px 3fr 5fr 4fr;
  column-gap: var(--col-gap);
  padding: 32px 0;
  border-bottom: 1px solid var(--rule);
}
.route-no { font-family: var(--mono); font-size: 13px; color: var(--ink-3); padding-top: 4px; }
.route-title h3 { font-size: 22px; }
.route-desc p { color: var(--ink-2); }
.route-meta { margin: 0; font-size: 14px; }
.route-meta dt {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.route-meta dd { margin: 0 0 14px; color: var(--ink-2); }
.route-meta dd:last-child { margin-bottom: 0; }

/* Send it to us (section 03) --------------------------------------- */

.section-dark .h-large { font-size: 40px; margin-bottom: 24px; }
.send-what { margin-top: 36px; padding-top: 24px; border-top: 1px solid #3b4146; }
.send-what h3 { font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--on-dark-2); margin-bottom: 12px; }
.plain-list { margin: 0; padding: 0; list-style: none; }
.plain-list li { padding: 6px 0 6px 20px; position: relative; color: var(--on-dark); }
.plain-list li::before { content: ""; position: absolute; left: 0; top: 16px; width: 10px; height: 1px; background: var(--on-dark-2); }

/* Capabilities (section 04) ---------------------------------------- */

.cap-list { margin: 0; border-top: 1px solid var(--rule); }
.cap {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
}
.cap dt { font-weight: 600; font-size: 17px; }
.cap dd { margin: 0; color: var(--ink-2); }

/* Process (section 05) --------------------------------------------- */

.steps-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.steps-table th {
  text-align: left;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 0 16px 10px 0;
  border-bottom: 1px solid var(--rule-strong);
  vertical-align: bottom;
}
.steps-table td {
  padding: 16px 16px 16px 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  color: var(--ink-2);
}
.steps-table .t-no { width: 40px; font-family: var(--mono); font-size: 13px; color: var(--ink-3); }
.steps-table td.t-step { width: 120px; font-weight: 600; color: var(--ink); }
.steps-table .t-out { width: 26%; padding-right: 0; }

/* Why (section 06) ------------------------------------------------- */

.why-prose { column-gap: var(--col-gap); }
.why-prose p { margin-bottom: 1.1em; color: var(--ink-2); max-width: 40em; }
.why-prose p:nth-child(even) { margin-left: 14%; }
.why-prose strong { color: var(--ink); font-weight: 600; }

/* RFQ (section 07) ------------------------------------------------- */

.rfq-form { display: flex; flex-direction: column; gap: 18px; }
.form-note { color: var(--ink-2); margin-bottom: 4px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.rfq-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
}
.rfq-form input, .rfq-form select, .rfq-form textarea {
  font: 15px var(--sans);
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 0;
  padding: 10px 12px;
  width: 100%;
}
.rfq-form input[type="file"] { padding: 8px; background: transparent; font-size: 14px; }
.rfq-form input:focus, .rfq-form select:focus, .rfq-form textarea:focus {
  outline: none;
  border-color: var(--blue);
}
.rfq-form textarea { resize: vertical; }
.rfq-form .actions { margin-top: 8px; gap: 20px; }
.form-side { font-size: 14px; color: var(--ink-3); }

.contact-col h3 { font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; }
.contact-col h3 + p, .contact-col p { color: var(--ink-2); font-size: 15px; }
.contact { margin: 0 0 40px; border-top: 1px solid var(--rule); }
.contact dt {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-top: 12px;
}
.contact dd { margin: 2px 0 12px; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }

/* Footer ----------------------------------------------------------- */

.site-footer { background: var(--graphite); color: var(--on-dark-2); padding: 40px 0; font-size: 13px; }
.footer-row { display: grid; grid-template-columns: auto 1fr auto; gap: 32px; align-items: center; }
.footer-row img { height: 30px; width: auto; }
.footer-line, .footer-meta { margin: 0; }
.footer-meta a { color: var(--on-dark-2); }

/* Responsive ------------------------------------------------------- */

@media (max-width: 1024px) {
  h1 { font-size: 44px; }
  .section { padding: 72px 0; }
  .cap { grid-template-columns: 160px 1fr; }
  .route { grid-template-columns: 40px 1fr 1fr; }
  .route-meta { grid-column: 2 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; margin-top: 16px; }
  .route-meta dd { margin-bottom: 0; }
  .route-meta dt:nth-of-type(2) { grid-column: 2; grid-row: 1; }
  .route-meta dd:nth-of-type(2) { grid-column: 2; grid-row: 2; }
}

@media (max-width: 820px) {
  :root { --gutter: 20px; --col-gap: 20px; }

  .nav-toggle { display: inline-block; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0; right: 0;
    top: 72px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--rule);
    z-index: 10;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 16px var(--gutter); border-top: 1px solid var(--rule); }
  .site-nav a.btn { margin: 16px var(--gutter); border-top: 0; text-align: center; }
  .site-header { position: relative; }

  h1 { font-size: 38px; }
  h2 { font-size: 26px; }
  .body-lg { font-size: 17px; }
  .lede { font-size: 18px; }
  .section { padding: 56px 0; }
  .section-head { margin-bottom: 32px; }

  /* Hero: text first, image becomes a shallow band under the strip */
  .hero { padding-top: 48px; }
  .hero .grid { row-gap: 32px; }
  .hero .col-7, .hero .col-5 { grid-column: 1 / -1; }
  .ph-hero { aspect-ratio: 16 / 7; order: 2; }
  .photo.ph-hero { aspect-ratio: 16 / 9; order: 2; }
  .hero-strip { margin-top: 32px; }

  .grid > [class*="col-"] { grid-column: 1 / -1; }

  /* 01: keep the two-column key/body relationship, tighten key */
  .ruled-list li { grid-template-columns: 88px 1fr; gap: 16px; }

  /* 02: routes become stacked entries with the letter as a running head */
  .route { grid-template-columns: 1fr; row-gap: 12px; padding: 24px 0; }
  .route-no { grid-row: 1; }
  .route-title h3 { font-size: 20px; }
  .route-meta { grid-column: auto; margin-top: 4px; grid-template-columns: 1fr; gap: 10px; }
  .route-meta dt:nth-of-type(2), .route-meta dd:nth-of-type(2) { grid-column: auto; grid-row: auto; }

  /* 03: image goes below text, shallower */
  .ph-dark, .photo.ph-dark { aspect-ratio: 16 / 9; }
  .section-dark .h-large { font-size: 32px; }

  /* 04: definition list keeps term above description */
  .cap { grid-template-columns: 1fr; gap: 6px; padding: 18px 0; }
  .ph-tall, .photo.ph-tall { aspect-ratio: 16 / 9; margin: 32px 0 8px; }

  /* 05: table collapses to stacked rows, header hidden */
  .steps-table, .steps-table tbody { display: block; width: 100%; }
  .steps-table thead { display: none; }
  .steps-table tr { display: grid; grid-template-columns: 40px 1fr; column-gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--rule); }
  .steps-table tr:first-child { border-top: 1px solid var(--rule-strong); }
  .steps-table td { display: block; padding: 0; border: 0; }
  .steps-table td.t-no { grid-row: 1 / span 3; }
  .steps-table td.t-step { width: auto; margin-bottom: 4px; }
  .steps-table .t-out { width: auto; margin-top: 6px; font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
  .steps-table .t-out::before { content: "You receive: "; }

  /* 06: prose loses its indents */
  .why-prose p:nth-child(even) { margin-left: 0; }

  /* 07: form */
  .field-row { grid-template-columns: 1fr; }
  .contact-col { padding-top: 8px; border-top: 1px solid var(--rule-strong); }
  .contact-col > h3:first-child { margin-top: 24px; }

  .footer-row { grid-template-columns: 1fr; gap: 16px; }
}

@media (max-width: 420px) {
  h1 { font-size: 34px; }
  .actions .btn { width: 100%; text-align: center; }
  .ruled-list li { grid-template-columns: 1fr; gap: 6px; }
}
