/* ============================================
   O NAMA — about page (/o-nama)
   Builds on landing.css (tag, CTA, final block) and portfolio-layout.css (header, footer).
   ============================================ */

.on { position: relative; z-index: var(--z-content); color: var(--c-text); overflow-x: clip; }
.on-wrap { max-width: calc(var(--content-max) + 2 * var(--page-gutter)); margin: 0 auto; padding: 0 var(--page-gutter); }

.on h1, .on h2, .on h3 { font-family: var(--font-display); font-weight: 400; color: var(--c-text-strong); }
/* Instrument Serif italic: Cormorant's light italic misplaces the caron on č/ć */
.on h1 em, .on h2 em { font-family: var(--font-display); font-style: italic; color: var(--c-accent-light); }
.on p { font-size: 0.98rem; line-height: 1.85; }
.on a { color: var(--c-accent-light); }

/* ── Intro ── */
.on-hero {
  padding: calc(80px + clamp(2.5rem, 6vw, 5rem)) 0 clamp(2.5rem, 6vw, 4.5rem);
  background-color: #faf9f7;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.045) 1px, transparent 1px);
  background-size: 40px 40px;
  border-bottom: 1px solid var(--c-line);
}
.on h1 { font-size: clamp(2.5rem, 5.4vw, 4.8rem); line-height: 1.02; max-width: 15em; margin-bottom: 1.6rem; }
.on h1 em { display: block; }
.on .on-lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 1.75; max-width: 40em; color: var(--c-text); margin: 0; }

.on-stats {
  list-style: none;
  margin: clamp(2.5rem, 5vw, 4rem) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--c-text-strong);
}
.on-stats li { padding: 1.4rem 1.5rem 0 0; display: flex; flex-direction: column; gap: 0.35rem; }
.on-stats li + li { padding-left: 1.5rem; border-left: 1px solid var(--c-line); }
.on-stat-num { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.6rem, 4.5vw, 3.8rem); line-height: 1; color: var(--c-text-strong); font-variant-numeric: tabular-nums; }
.on-stats span { font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--c-text-dim); }

/* ── Sections ── */
.on-section { padding: clamp(4rem, 9vw, 7rem) 0; }
.on-section--grid {
  background-color: #faf9f7;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.035) 1px, transparent 1px);
  background-size: 40px 40px;
  border-top: 1px solid var(--c-line);
}
.on-head { max-width: 760px; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.on-head--center { max-width: 980px; margin-left: auto; margin-right: auto; text-align: center; }
.on-head--center .landing-tag { justify-content: center; }
.on-head--center .landing-tag::before { display: none; }
.on h2 { font-size: clamp(2rem, 4.2vw, 3.4rem); line-height: 1.1; margin-bottom: 1rem; }
.on .on-sub { color: var(--c-text-dim); font-size: 1.02rem; margin: 0; }

/* Services */
.on-services {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--c-line);
  border: 1px solid var(--c-line);
}
.on-service { position: relative; background: var(--c-bg); padding: clamp(1.8rem, 3vw, 2.6rem) clamp(1.3rem, 2vw, 1.8rem); transition: background 0.4s; }
.on-service:hover { background: #fdfbf8; }
.on-service-no { position: absolute; top: 1rem; right: 1.2rem; font-family: var(--font-display); font-size: 3.2rem; line-height: 1; color: var(--c-number-ghost); }
.on-icon { width: 52px; height: 52px; border: 1px solid var(--c-accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem; transition: background 0.4s; }
.on-icon svg { width: 26px; height: 26px; fill: none; stroke: var(--c-accent); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.4s; }
.on-service:hover .on-icon { background: var(--c-accent); }
.on-service:hover .on-icon svg { stroke: var(--c-bg); }
.on-service h3 { font-size: 1.5rem; margin-bottom: 0.6rem; }
.on-service p { font-size: 0.9rem; line-height: 1.7; color: var(--c-text-dim); margin: 0; }

/* Process */
.on-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); position: relative; }
.on-steps::before { content: ''; position: absolute; top: 26px; left: 26px; right: calc(100% / 6 - 26px); height: 1px; background: var(--c-accent); opacity: 0.5; }
.on-steps li { position: relative; padding-right: 1rem; }
.on-step-no { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--c-accent); background: #faf9f7; font-family: var(--font-display); font-size: 1.05rem; color: var(--c-accent); margin-bottom: 1.3rem; transition: background 0.4s, color 0.4s; }
.on-steps li:hover .on-step-no { background: var(--c-accent); color: var(--c-bg); }
.on-steps h3 { font-size: 1.25rem; margin-bottom: 0.35rem; }
.on-steps p { font-size: 0.86rem; line-height: 1.6; color: var(--c-text-dim); margin: 0; }

/* Final */
.on-final { margin: 0; padding-left: var(--gutter-x); padding-right: var(--gutter-x); }
.on-final-tag { justify-content: center; }
.on-final-tag::before { display: none; }
.on-final h2 { font-size: clamp(2rem, 4.5vw, 3.4rem); max-width: 18em; margin: 0 auto 1.2rem; }
.on-final > p:not(.landing-contact) { max-width: 38em; margin: 0 auto 2rem; color: var(--c-text-dim); }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .on-services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .on-steps { grid-template-columns: 1fr; }
  .on-steps::before { top: 26px; bottom: 26px; left: 26px; right: auto; width: 1px; height: auto; }
  .on-steps li { display: grid; grid-template-columns: 52px 1fr; column-gap: 1.4rem; padding: 0 0 1.8rem; }
  .on-steps li:last-child { padding-bottom: 0; }
  .on-step-no { grid-row: span 2; margin-bottom: 0; }
  .on-steps h3 { margin-top: 0.6rem; }
}
@media (max-width: 900px) {
  :root { --page-gutter: 1.5rem; }
  .on-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .on-stats li:nth-child(3) { padding-left: 0; border-left: 0; }
  .on-stats li:nth-child(n+3) { padding-top: 1.4rem; }
}
@media (max-width: 640px) {
  :root { --page-gutter: 1rem; }
  .on-services { grid-template-columns: 1fr; }
}

/* ── Family firm story ── */
.on-story { border-bottom: 1px solid var(--c-line); }
.on-story-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.on-story-head h2 { margin-bottom: 0; }
.on-story-head h2 em { display: block; }
.on .on-story-lead { font-size: clamp(1.08rem, 1.5vw, 1.22rem); line-height: 1.75; color: var(--c-text-strong); margin: 0 0 1.2rem; }
.on-story-text p { margin: 0 0 1.2rem; color: var(--c-text); }
.on-quote {
  margin: 2rem 0 0;
  padding: 0.2rem 0 0.2rem 1.4rem;
  border-left: 2px solid var(--c-accent);
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  line-height: 1.3;
  color: var(--c-accent-light);
}
@media (max-width: 900px) {
  .on-story-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* ── Footer: everything stacked ── */
/* Left: city links, right: tagline + copyright (right-aligned) */
footer.on-footer { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto 1fr; justify-content: space-between; align-items: start; column-gap: 3rem; row-gap: 0.15rem; padding-top: 2.5rem; padding-bottom: 2.5rem; }
footer.on-footer p { margin: 0; grid-column: 2; text-align: right; line-height: 1.4; }
.on-footer-links li { line-height: 1.3; }
.on-footer-links { grid-column: 1; grid-row: 1 / span 3; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 0.15rem; text-align: left; }
@media (max-width: 640px) {
  footer.on-footer { grid-template-columns: 1fr; text-align: left; }
  footer.on-footer p { grid-column: 1; text-align: left; }
  .on-footer-links { grid-column: 1; grid-row: auto; align-items: flex-start; text-align: left; margin-top: 0.6rem; }
}
.on-footer-links a, footer.on-footer .on-footer-arch a { font-size: 0.78rem; letter-spacing: 0.04em; color: var(--c-text-dim); text-decoration: none; border-bottom: 1px solid var(--c-line); padding-bottom: 1px; transition: color 0.3s, border-color 0.3s; }
.on-footer-links a:hover, footer.on-footer .on-footer-arch a:hover { color: var(--c-accent); border-color: var(--c-accent); }
footer.on-footer .on-footer-arch { align-self: end; margin-top: 0.5rem; }
@media (max-width: 640px) { footer.on-footer .on-footer-arch { order: 3; margin-top: 0.8rem; } }
