/* ==========================================================================
   HindMicro Systems — shared stylesheet
   Brand: green #235147  |  purple #794E84
   ========================================================================== */

:root {
  /* --- brand ------------------------------------------------------------ */
  --green-900: #12302A;   /* deep shade of the brand green, for dark bands   */
  --green-800: #1A413A;
  --green-700: #235147;   /* BRAND GREEN                                     */
  --green-500: #2E6759;   /* lighter green for small text and accents        */
  --green-100: #E7F0ED;   /* tint background                                 */

  --purple-900: #4A2C53;
  --purple-700: #794E84;  /* BRAND PURPLE                                    */
  --purple-500: #8E6398;
  --accent-400: #C9AFD1;  /* light lavender — used on dark backgrounds       */
  --accent-300: #E7D9EC;
  --accent-100: #F8F3FA;  /* tinted section background                       */

  /* --- neutrals --------------------------------------------------------- */
  --ink: #16241F;
  --body: #3C4A45;
  --muted: #74827C;
  --line: #E4E9E7;
  --paper: #FFFFFF;
  --paper-alt: #FAFBFA;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(18, 48, 42, .06), 0 2px 8px rgba(18, 48, 42, .05);
  --shadow-md: 0 4px 12px rgba(18, 48, 42, .08), 0 12px 32px rgba(18, 48, 42, .07);

  --wrap: 1140px;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Georgia", "Iowan Old Style", "Times New Roman", serif;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--body);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--green-700); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 .6em; font-weight: 650; letter-spacing: -.015em; }
h1 { font-size: clamp(2rem, 4.4vw, 3.15rem); }
h2 { font-size: clamp(1.55rem, 2.9vw, 2.15rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.02rem; }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.25em; }
li { margin-bottom: .4em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 3rem 0; }
:focus-visible { outline: 3px solid var(--green-500); outline-offset: 2px; border-radius: 4px; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.section { padding: 76px 0; }
.section--tight { padding: 52px 0; }
.section--alt { background: var(--paper-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--tint { background: var(--accent-100); border-top: 1px solid var(--accent-300); border-bottom: 1px solid var(--accent-300); }
.section--dark { background: var(--green-900); color: #CFE0D8; }
.section--dark h2, .section--dark h3 { color: #fff; }
.section--dark a { color: var(--accent-400); }
.section--dark a.btn-accent, .section--dark a.btn-accent:hover { color: var(--purple-900); }
.section--dark a.btn-primary, .section--dark a.btn-primary:hover { color: #fff; }
.section--dark a.btn-ghost { border-color: var(--accent-400); color: var(--accent-400); }
.section--dark a.btn-ghost:hover { background: var(--accent-400); color: var(--purple-900); }
.section--tint a.btn-primary, .section--tint a.btn-primary:hover { color: #fff; }

.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.narrow { max-width: 760px; }
.center { text-align: center; }
.center.narrow { margin-left: auto; margin-right: auto; }

/* ---------- bits ---------- */
.eyebrow {
  display: inline-block;
  font-size: .74rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--green-500);
  margin-bottom: .9rem;
}
.section--dark .eyebrow { color: var(--accent-400); }
.lead { font-size: 1.14rem; color: var(--body); }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .97rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, color .15s ease, border-color .15s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--green-700); color: #fff; }
.btn-primary:hover { background: var(--green-900); color: #fff; }
.btn-ghost { border-color: var(--green-700); color: var(--green-700); background: transparent; }
.btn-ghost:hover { background: var(--green-700); color: #fff; }
.btn-accent { background: var(--accent-300); color: var(--purple-900); }
.btn-accent:hover { background: var(--accent-400); color: var(--purple-900); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 1.6rem; }

.tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--green-100);
  color: var(--green-700);
}
.tag--accent { background: var(--accent-300); color: var(--purple-900); }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card h3 { margin-bottom: .45em; }
.card p:last-child { margin-bottom: 0; }
.card--link:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card__num {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--purple-700);
  font-weight: 700;
  display: block;
  margin-bottom: .8rem;
}

.stat { text-align: center; }
.stat__value { font-size: 2.2rem; font-weight: 700; color: var(--green-700); line-height: 1.1; }
.section--dark .stat__value { color: var(--accent-400); }
.stat__label { font-size: .88rem; color: var(--muted); }
.section--dark .stat__label { color: #A9C2B7; }

.placeholder {
  background: #FFF4D6;
  border-bottom: 1.5px dashed #C99A2E;
  color: #7A5A11;
  font-weight: 600;
  padding: 0 3px;
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand__mark {
  height: 40px; width: auto; flex: 0 0 auto; display: block;
}
/* the logo is a green-to-purple gradient mark: on the dark footer it needs a
   light plate behind it to stay legible */
.brand__mark--plate {
  height: 46px; padding: 6px 9px; border-radius: 10px;
  background: #fff; box-sizing: content-box;
}
.brand__name { font-weight: 700; color: var(--ink); font-size: 1.06rem; letter-spacing: -.02em; line-height: 1.15; }
.brand__sub { display: block; font-size: .7rem; font-weight: 500; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 9px 13px; border-radius: 8px;
  font-size: .95rem; font-weight: 500; color: var(--body); text-decoration: none;
}
.nav a:hover { background: var(--green-100); color: var(--green-700); text-decoration: none; }
.nav a.is-active { color: var(--green-700); font-weight: 650; }
.nav a.btn { margin-left: 10px; padding: 10px 22px; border-radius: 999px; color: #fff; }
.nav a.btn:hover { background: var(--green-900); color: #fff; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line);
  border-radius: 8px; width: 44px; height: 40px; cursor: pointer; padding: 0;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 19px; height: 2px; background: var(--ink); margin: 0 auto; position: relative; border-radius: 2px;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

/* ---------- hero ---------- */
.hero {
  background:
    radial-gradient(900px 420px at 90% -12%, rgba(121,78,132,.16), transparent 64%),
    radial-gradient(760px 400px at 8% 108%, rgba(35,81,71,.10), transparent 62%),
    linear-gradient(180deg, #FAFBFA 0%, #FFFFFF 100%);
  border-bottom: 1px solid var(--line);
  padding: 92px 0 84px;
}
.hero h1 { max-width: 16ch; }
.hero .lead { max-width: 56ch; font-size: 1.18rem; }
.hero--inner { padding: 62px 0 54px; }
.hero--inner h1 { max-width: 22ch; }

.rule {
  width: 54px; height: 4px; border-radius: 2px;
  background: var(--purple-700); margin: 0 0 1.6rem;
}
.center .rule { margin-left: auto; margin-right: auto; }

/* ---------- lists ---------- */
.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding-left: 30px; margin-bottom: .7em; }
.checklist li::before {
  content: ""; position: absolute; left: 4px; top: .55em;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--purple-500); box-shadow: 0 0 0 3px var(--accent-300);
}

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 650; color: var(--ink); list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--purple-700); font-weight: 700; }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { margin: .8em 0 0; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 650; color: var(--ink); background: var(--paper-alt); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }

/* ---------- forms ---------- */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-size: .88rem; font-weight: 600; color: var(--ink); }
.field input, .field select, .field textarea {
  font: inherit; font-size: .97rem; color: var(--ink);
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; width: 100%;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--green-500); outline: none; box-shadow: 0 0 0 3px rgba(11,110,83,.14); }
.form__note { font-size: .84rem; color: var(--muted); }
.form__status { font-size: .92rem; font-weight: 600; min-height: 1.2em; }
.form__status.ok { color: var(--green-700); }
.form__status.err { color: #A3402F; }

.inline-form { display: flex; gap: 10px; flex-wrap: wrap; }
.inline-form input { flex: 1 1 240px; }

/* ---------- article ---------- */
.article { max-width: 720px; margin: 0 auto; }
.article h2 { margin-top: 2.2rem; }
.article h3 { margin-top: 1.8rem; }
.article__meta { font-size: .88rem; color: var(--muted); margin-bottom: 1.6rem; }
.article blockquote {
  margin: 1.8rem 0; padding: 4px 0 4px 22px;
  border-left: 3px solid var(--purple-500);
  font-family: var(--font-serif); font-size: 1.1rem; color: var(--ink);
}
.article code { background: var(--accent-100); padding: 2px 6px; border-radius: 5px; font-size: .9em; }

.post-list { display: grid; gap: 22px; }
.post {
  display: grid; grid-template-columns: 150px 1fr; gap: 26px;
  padding: 24px; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; transition: box-shadow .15s ease, transform .15s ease;
}
.post:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.post__side { font-size: .84rem; color: var(--muted); }
.post h3 { margin-bottom: .4em; }
.post h3 a { color: var(--ink); }
.post p:last-child { margin-bottom: 0; }

/* ---------- footer ---------- */
.site-footer { background: var(--green-900); color: #A9C2B7; padding: 64px 0 30px; font-size: .93rem; }
.site-footer h4 { color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 1.1em; }
.site-footer a { color: #CFE0D8; }
.site-footer a:hover { color: var(--accent-400); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .55em; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand .brand__name { color: #fff; }
.footer-brand .brand__sub { color: #8FAAA0; }
.footer-bottom {
  margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.12);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .86rem;
}

/* ---------- responsive ---------- */
@media (max-width: 940px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 34px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .section { padding: 56px 0; }
  .hero { padding: 64px 0 56px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .post { grid-template-columns: 1fr; gap: 12px; }
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 74px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 10px 18px 20px; box-shadow: var(--shadow-md);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 8px; border-radius: 6px; }
  .nav a.btn { margin: 10px 0 0; text-align: center; }
}

@media (max-width: 480px) {
  .site-header__inner { height: 66px; }
  .brand__mark { height: 32px; }
  .brand__name { font-size: .95rem; }
  .brand__sub { display: none; }
  .nav { top: 66px; }
}

@media print {
  .site-header, .site-footer, .btn { display: none; }
}
