/* ==========================================================
   FASGEN SP Z O O – Architectural / earthy editorial design
   Palette: sand, forest green, terracotta
   ========================================================== */

:root {
  --sand: #F4EFE4;
  --sand-2: #E9E1CF;
  --paper: #FBF8F1;
  --forest: #1F3A2E;
  --forest-2: #2B4C3C;
  --terra: #C4622D;
  --terra-dark: #A84E1E;
  --ink: #1B1F1C;
  --muted: #5C645D;
  --line: #D6CDB6;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", "Segoe UI", Helvetica, Arial, sans-serif;
  --container: 1280px;
  --header-h: 80px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--sand);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, dl, dd, address { margin: 0; font-style: normal; }

.container { width: min(100% - 48px, var(--container)); margin-inline: auto; }

:focus-visible { outline: 3px solid var(--terra); outline-offset: 3px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 15px 28px;
  background: var(--terra);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .02em;
  text-decoration: none;
  border: 2px solid var(--terra);
  border-radius: 0;
  cursor: pointer;
  font-family: inherit;
  transition: background .25s ease, color .25s ease, transform .25s ease, border-color .25s ease;
}
.btn:hover { background: var(--terra-dark); border-color: var(--terra-dark); transform: translateY(-2px); }
.btn-small { padding: 11px 20px; font-size: 14px; }
.btn-ghost { background: transparent; color: var(--forest); border-color: var(--forest); }
.btn-ghost:hover { background: var(--forest); color: var(--sand); border-color: var(--forest); }
.btn-light { background: var(--sand); color: var(--forest); border-color: var(--sand); }
.btn-light:hover { background: #fff; color: var(--forest); border-color: #fff; }
.btn-block { width: 100%; text-align: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(244, 239, 228, .96);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s ease;
}
.site-header.scrolled { box-shadow: 0 6px 24px rgba(31, 58, 46, .08); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--forest); }
.brand-text { font-family: var(--serif); font-weight: 600; font-size: 22px; letter-spacing: .08em; line-height: 1; display: flex; flex-direction: column; }
.brand-text small { font-family: var(--sans); font-size: 10px; letter-spacing: .32em; font-weight: 500; margin-top: 5px; color: var(--terra); }

.main-nav { display: flex; align-items: center; gap: 36px; }
.main-nav ul { display: flex; gap: 32px; }
.main-nav ul a {
  text-decoration: none; font-size: 15px; font-weight: 500; color: var(--forest);
  position: relative; padding: 6px 0;
}
.main-nav ul a::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px;
  background: var(--terra); transform: scaleX(0); transform-origin: left; transition: transform .3s ease;
}
.main-nav ul a:hover::after { transform: scaleX(1); }

.nav-toggle { display: none; width: 44px; height: 44px; background: none; border: 1px solid var(--forest); cursor: pointer; padding: 0; position: relative; }
.nav-toggle span { position: absolute; left: 11px; width: 20px; height: 2px; background: var(--forest); transition: transform .3s ease, opacity .3s ease; }
.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 28px; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding-top: 72px; background: var(--sand); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 72px; align-items: center; padding-bottom: 88px; }

.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--terra); margin-bottom: 26px; }
.eyebrow .dot { width: 8px; height: 8px; background: var(--terra); display: inline-block; }

.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.8rem, 6vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -.02em;
  color: var(--forest);
}
.hero h1 em { font-style: italic; color: var(--terra); }
.hero .lead { margin-top: 30px; max-width: 580px; font-size: 19px; color: var(--muted); }
.hero-actions { margin-top: 38px; display: flex; flex-wrap: wrap; gap: 14px; }

.hero-tags { margin-top: 48px; display: flex; flex-wrap: wrap; gap: 14px 36px; padding-top: 26px; border-top: 1px solid var(--line); }
.hero-tags li { font-size: 14px; color: var(--muted); display: flex; flex-direction: column; }
.hero-tags strong { font-family: var(--serif); font-size: 17px; color: var(--forest); font-weight: 600; }

.hero-visual { position: relative; padding-bottom: 40px; padding-right: 0; }
.visual-main { aspect-ratio: 7 / 8; overflow: hidden; border: 1px solid var(--forest); }
.visual-main svg { width: 100%; height: 100%; }
.visual-panel {
  position: absolute; left: -40px; bottom: 0; max-width: 290px;
  background: var(--forest); color: var(--sand); padding: 22px 24px;
  box-shadow: 0 18px 40px rgba(31, 58, 46, .25);
}
.panel-label { display: block; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: #E6A27D; margin-bottom: 8px; font-weight: 600; }
.visual-panel p { font-size: 14.5px; line-height: 1.55; }
.visual-badge {
  position: absolute; top: 28px; right: -22px; width: 112px; height: 112px; border-radius: 50%;
  background: var(--sand); border: 1px solid var(--forest); display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; color: var(--forest);
}
.visual-badge span { font-family: var(--serif); font-size: 28px; font-weight: 600; line-height: 1; }
.visual-badge small { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; margin-top: 4px; line-height: 1.3; }

.ticker { background: var(--forest); color: var(--sand); overflow: hidden; padding: 18px 0; }
.ticker-track { display: flex; gap: 0; width: max-content; animation: ticker 40s linear infinite; }
.ticker-track span { font-family: var(--serif); font-size: 22px; font-style: italic; padding: 0 28px; position: relative; white-space: nowrap; }
.ticker-track span::after { content: "✦"; position: absolute; right: -6px; color: var(--terra); font-style: normal; font-size: 14px; top: 50%; transform: translateY(-50%); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Generic section ---------- */
.section { padding: 120px 0; }
.section-head { max-width: 860px; margin-bottom: 64px; }
.section-no { font-size: 13px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--terra); margin-bottom: 18px; }
.section-no.light { color: #E6A27D; }
.section h2 {
  font-family: var(--serif); font-weight: 500; letter-spacing: -.015em;
  font-size: clamp(2rem, 3.8vw, 3.2rem); line-height: 1.12; color: var(--forest);
}
.section-sub { margin-top: 20px; color: var(--muted); font-size: 18px; max-width: 640px; }

/* ---------- About ---------- */
.about { background: var(--paper); }
.about-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 80px; align-items: start; }
.about-text p { color: var(--muted); margin-bottom: 20px; }
.about-text p.big { font-family: var(--serif); font-size: 1.55rem; line-height: 1.4; color: var(--forest); margin-bottom: 28px; }

.info-panel { border: 1px solid var(--forest); padding: 32px; background: var(--sand); }
.info-panel h3 { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; color: var(--forest); margin-bottom: 20px; }
.info-panel dl div { padding: 14px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 130px 1fr; gap: 12px; }
.info-panel dt { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding-top: 3px; }
.info-panel dd { font-size: 15.5px; color: var(--ink); }
.info-panel a { color: var(--terra-dark); text-underline-offset: 3px; }
.image-block { margin-top: 24px; height: 200px; overflow: hidden; }
.image-block svg { width: 100%; height: 100%; }

.pillars { margin-top: 88px; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 2px solid var(--forest); }
.pillar { padding: 36px 36px 8px 0; position: relative; transition: transform .3s ease; }
.pillar + .pillar { padding-left: 36px; border-left: 1px solid var(--line); }
.pillar:hover { transform: translateY(-4px); }
.pillar-index { font-family: var(--serif); font-style: italic; color: var(--terra); font-size: 1.6rem; display: block; margin-bottom: 10px; }
.pillar h3 { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; color: var(--forest); margin-bottom: 10px; }
.pillar p { color: var(--muted); font-size: 16px; }

/* ---------- Services ---------- */
.services { background: var(--sand); }
.service-list { border-top: 2px solid var(--forest); }
.service {
  display: grid; grid-template-columns: 90px 1fr auto; gap: 32px; align-items: center;
  padding: 38px 24px; border-bottom: 1px solid var(--line);
  transition: background .3s ease, padding-left .3s ease;
}
.service:hover { background: var(--paper); padding-left: 40px; }
.service-num { font-family: var(--serif); font-size: 2.6rem; color: var(--terra); font-weight: 400; line-height: 1; }
.service h3 { font-family: var(--serif); font-size: clamp(1.4rem, 2.4vw, 2rem); font-weight: 500; color: var(--forest); margin-bottom: 8px; }
.service p { color: var(--muted); max-width: 720px; font-size: 16.5px; }
.service-tag { font-size: 12px; letter-spacing: .14em; font-weight: 600; text-transform: uppercase; color: var(--forest); border: 1px solid var(--forest); padding: 7px 14px; white-space: nowrap; }

/* ---------- Why us ---------- */
.why { background: var(--forest); color: var(--sand); }
.why h2 { color: var(--sand); }
.why-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: 88px; align-items: start; }
.why-intro { position: sticky; top: calc(var(--header-h) + 40px); }
.why-intro p { margin: 24px 0 36px; color: #C9D3C8; font-size: 18px; }

.why-point { display: grid; grid-template-columns: 64px 1fr; gap: 24px; padding: 30px 0; border-bottom: 1px solid rgba(244, 239, 228, .18); transition: transform .3s ease; }
.why-point:first-child { padding-top: 0; }
.why-point:hover { transform: translateX(8px); }
.why-icon { width: 56px; height: 56px; border: 1px solid #E6A27D; color: #E6A27D; display: flex; align-items: center; justify-content: center; }
.why-point h3 { font-family: var(--serif); font-weight: 500; font-size: 1.45rem; margin-bottom: 8px; color: var(--sand); }
.why-point p { color: #C9D3C8; font-size: 16.5px; }

/* ---------- Contact ---------- */
.contact { background: var(--paper); }
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 72px; align-items: start; }
.detail-card { background: var(--forest); color: var(--sand); padding: 40px; }
.detail-card h3 { font-family: var(--serif); font-size: 1.7rem; font-weight: 500; margin-bottom: 18px; }
.detail-card address { font-size: 17px; line-height: 1.7; color: #D9E0D6; margin-bottom: 22px; }
.detail-line { display: flex; flex-direction: column; gap: 4px; padding-top: 20px; border-top: 1px solid rgba(244, 239, 228, .2); }
.detail-line span { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: #E6A27D; font-weight: 600; }
.detail-line a { font-size: 19px; text-underline-offset: 4px; word-break: break-all; }
.detail-note { margin-top: 24px; padding: 28px 32px; border: 1px solid var(--line); background: var(--sand); }
.detail-note h4 { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; color: var(--forest); margin-bottom: 12px; }
.detail-note li { padding-left: 22px; position: relative; color: var(--muted); font-size: 15.5px; margin-bottom: 6px; }
.detail-note li::before { content: ""; position: absolute; left: 0; top: .7em; width: 10px; height: 2px; background: var(--terra); }
.detail-note p { margin-top: 14px; font-size: 14px; color: var(--muted); font-style: italic; }

.contact-form { background: var(--sand); border: 1px solid var(--forest); padding: 40px; }
.field { margin-bottom: 22px; display: flex; flex-direction: column; flex: 1; }
.field-row { display: flex; gap: 20px; }
.field label { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; color: var(--forest); margin-bottom: 8px; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 16px; padding: 14px 16px; background: var(--paper); color: var(--ink);
  border: 1px solid var(--line); border-radius: 0; transition: border-color .25s ease, box-shadow .25s ease; width: 100%;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--forest); box-shadow: 0 0 0 3px rgba(196, 98, 45, .25); }
.field.invalid input, .field.invalid textarea { border-color: #B3261E; }
.error { color: #B3261E; font-size: 13.5px; min-height: 0; margin-top: 6px; }
.form-status { margin-top: 18px; font-size: 15px; font-weight: 500; min-height: 1.2em; }
.form-status.ok { color: var(--forest-2); }
.form-status.fail { color: #B3261E; }

/* ---------- Footer ---------- */
.site-footer { background: #15281F; color: #C9D3C8; padding-top: 72px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr .7fr 1fr; gap: 64px; padding-bottom: 56px; }
.footer-brand .brand-text { color: var(--sand); margin-bottom: 18px; }
.footer-brand p { max-width: 360px; font-size: 15.5px; }
.site-footer h4 { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: #E6A27D; margin-bottom: 18px; font-weight: 600; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { text-decoration: none; transition: color .2s ease; }
.footer-col a:hover { color: #fff; }
.footer-col address { line-height: 1.8; font-size: 15.5px; }
.footer-bottom { border-top: 1px solid rgba(244, 239, 228, .15); padding: 24px 0; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 14px; }
.footer-bottom a { text-decoration: none; }
.footer-bottom a:hover { color: #fff; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s ease; }
.reveal.visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .hero-grid { gap: 48px; }
  .visual-panel { left: -16px; }
  .about-grid, .why-layout, .contact-grid { gap: 48px; }
}

@media (max-width: 900px) {
  :root { --header-h: 72px; }
  .section { padding: 84px 0; }
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0; background: var(--sand);
    flex-direction: column; align-items: stretch; gap: 0; padding: 12px 24px 28px;
    border-bottom: 1px solid var(--line); box-shadow: 0 16px 30px rgba(31, 58, 46, .12);
    max-height: 0; overflow: hidden; opacity: 0; visibility: hidden; padding-top: 0; padding-bottom: 0;
    transition: max-height .35s ease, opacity .25s ease, padding .35s ease, visibility .35s;
  }
  .main-nav.open { max-height: 440px; opacity: 1; visibility: visible; padding-top: 12px; padding-bottom: 28px; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav ul a { display: block; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
  .main-nav ul a::after { display: none; }
  .main-nav .btn { margin-top: 22px; text-align: center; }

  .hero { padding-top: 48px; }
  .hero-grid { grid-template-columns: 1fr; padding-bottom: 64px; }
  .hero-visual { max-width: 560px; }
  .visual-panel { left: 0; }
  .visual-badge { right: 12px; }

  .about-grid, .why-layout, .contact-grid { grid-template-columns: 1fr; }
  .why-intro { position: static; }
  .pillars { grid-template-columns: 1fr; margin-top: 64px; }
  .pillar, .pillar + .pillar { padding: 28px 0; border-left: none; border-bottom: 1px solid var(--line); }
  .service { grid-template-columns: 56px 1fr; gap: 20px; padding: 30px 8px; }
  .service:hover { padding-left: 8px; }
  .service-num { font-size: 2rem; }
  .service-tag { grid-column: 2; justify-self: start; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 40px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .container { width: min(100% - 32px, var(--container)); }
  .section { padding: 68px 0; }
  .section-head { margin-bottom: 44px; }
  .hero .lead { font-size: 17px; }
  .hero-actions .btn { flex: 1 1 100%; text-align: center; }
  .visual-panel { position: relative; max-width: none; margin-top: -1px; box-shadow: none; }
  .hero-visual { padding-bottom: 0; }
  .visual-badge { top: 16px; right: 16px; width: 92px; height: 92px; }
  .visual-badge span { font-size: 22px; }
  .info-panel, .contact-form, .detail-card { padding: 26px 22px; }
  .info-panel dl div { grid-template-columns: 1fr; gap: 2px; }
  .field-row { flex-direction: column; gap: 0; }
  .why-point { grid-template-columns: 48px 1fr; gap: 16px; }
  .why-icon { width: 46px; height: 46px; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker-track { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
