/* GLS Systems — brand stylesheet (palette from the brand color manual v1.0) */
:root {
  color-scheme: light;
  --amber-50: #FFF8E1;  --amber-200: #FFE082; --amber-400: #FFCA28; --amber-500: #FFC107; --amber-700: #C68A00; --amber-900: #8A5F00;
  --blue-50: #E7EFFA;   --blue-200: #9FC0E8;  --blue-400: #4A8AD4;  --blue-500: #1565C0;  --blue-700: #0F4C92; --blue-900: #0A3564;
  --green-50: #E3F4EC;  --green-500: #2E9E6B; --green-700: #217A51;
  --ink: #1C1B18;
  --ink-2: #55524C;
  --line: #E7E4DD;
  --bg: #F6F5F1;
  --surface: #FFFFFF;
  --radius: 20px;
  --radius-sm: 14px;
  --shadow-sm: 0 1px 2px rgba(28, 27, 24, .04), 0 2px 8px rgba(28, 27, 24, .04);
  --shadow: 0 2px 4px rgba(28, 27, 24, .03), 0 12px 32px rgba(15, 76, 146, .08);
  --shadow-lg: 0 4px 8px rgba(28, 27, 24, .04), 0 20px 48px rgba(15, 76, 146, .14);
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.65 var(--font); }
img, svg { display: block; max-width: 100%; }
a { color: var(--blue-500); text-underline-offset: .18em; }
a:hover { color: var(--blue-700); }
:focus-visible { outline: 3px solid var(--blue-400); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; margin: 0; letter-spacing: -.015em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: .5rem 1rem; z-index: 100; border-radius: 8px; }
.skip:focus { left: 16px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 245, 241, .85); backdrop-filter: saturate(1.4) blur(12px);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.05rem; }
.brand:hover { color: var(--ink); }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.site-header nav { margin-left: auto; }
.contact-btn { border: 0; padding: 0; cursor: pointer; font: inherit; color: var(--ink); }

/* Contact dialog */
.contact-dialog {
  width: min(520px, 100% - 32px); max-height: calc(100% - 32px); padding: 0; border: 0;
  border-radius: var(--radius); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg);
}
.contact-dialog::backdrop { background: rgba(10, 53, 100, .35); backdrop-filter: blur(3px); }
.contact-form { display: grid; gap: 1rem; padding: clamp(1.25rem, 4vw, 2rem); }
.contact-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.contact-head .eyebrow { margin-bottom: .3rem; }
.contact-head h2 { font-size: 1.6rem; }
.contact-intro { color: var(--ink-2); font-size: .95rem; margin-top: .35rem; }
.icon-btn {
  flex: none; display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 10px; cursor: pointer;
  background: var(--bg); color: var(--ink);
}
.icon-btn:hover { background: var(--blue-50); color: var(--blue-700); }
.icon-btn svg { width: 18px; height: 18px; }
.field { display: grid; gap: .35rem; }
.field span { font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg);
  border: 2px solid transparent; border-radius: var(--radius-sm); padding: .7rem .9rem;
  transition: border-color .15s, background-color .15s;
}
.field textarea { resize: vertical; min-height: 7.5rem; }
.field input::placeholder { color: #8E8A82; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue-400); background: var(--surface); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { font-size: .92rem; font-weight: 600; min-height: 1.4em; }
.form-status:empty { display: none; }
.form-status.is-ok { color: var(--green-700); background: var(--green-50); padding: .7rem .9rem; border-radius: var(--radius-sm); }
.form-status.is-error { color: #A12B1E; background: #FCEBE8; padding: .7rem .9rem; border-radius: var(--radius-sm); }
.contact-actions { display: flex; justify-content: flex-end; gap: .6rem; flex-wrap: wrap; }
.contact-actions .btn { cursor: pointer; font-family: inherit; }
.contact-actions .btn:disabled { opacity: .6; cursor: progress; transform: none; }

/* Hero */
.hero { padding: clamp(1.5rem, 5vw, 3.5rem) 0 clamp(1rem, 3vw, 2rem); }
.hero-card {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(200px, 330px) 1fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: center;
  background: var(--surface); border-radius: calc(var(--radius) + 8px);
  padding: clamp(1.5rem, 4vw, 3.25rem); box-shadow: var(--shadow);
}
.hero-card::after {
  content: ""; position: absolute; right: -120px; top: -120px; width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, var(--blue-50) 0%, rgba(231, 239, 250, 0) 70%); pointer-events: none;
}
.hero-card > * { position: relative; z-index: 1; }
.hero-logo { width: 100%; height: auto; aspect-ratio: 1; justify-self: center; margin-inline: auto; }
.eyebrow { font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--blue-500); margin-bottom: .75rem; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; }
.motto { margin: 1.5rem 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.motto li {
  display: grid; justify-items: start; gap: .35rem;
  font-family: var(--font-display); font-size: clamp(1.05rem, 2.4vw, 1.4rem); font-weight: 700;
  padding: .9rem 1rem; border-radius: var(--radius-sm); background: var(--bg);
}
.motto .emoji { font-size: 1.5em; line-height: 1; }
.motto .m-idea { background: var(--amber-50); }
.motto .m-build { background: var(--blue-50); }
.motto .m-grow { background: var(--green-50); }

.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .75rem 1.2rem; border-radius: 999px; font-weight: 700; font-size: .95rem; text-decoration: none;
  border: 0; transition: background-color .15s, color .15s, box-shadow .15s, transform .15s;
}
.btn svg { width: 1.15em; height: 1.15em; fill: currentColor; flex: none; }
.btn-primary { background: var(--amber-500); color: var(--ink); box-shadow: 0 6px 18px rgba(198, 138, 0, .25); }
.btn-primary:hover { background: var(--amber-400); color: var(--ink); transform: translateY(-1px); }
.btn-ghost { background: var(--blue-50); color: var(--blue-700); }
.btn-ghost:hover { background: var(--blue-500); color: #fff; }

/* Sections */
section.block { padding: clamp(2rem, 5vw, 3.5rem) 0; }
.section-head { margin-bottom: 1.75rem; max-width: 70ch; }
.section-head .eyebrow { margin-bottom: .4rem; }
.section-head h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); color: var(--ink); }
.section-head p { color: var(--ink-2); margin-top: .5rem; font-size: 1.05rem; }

/* Projects */
.projects { display: grid; gap: 1.75rem; }
.project {
  display: grid; grid-template-columns: minmax(250px, 320px) minmax(0, 1fr);
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.project-card {
  padding: 1.75rem; display: flex; flex-direction: column; gap: 1.1rem;
  background: linear-gradient(160deg, var(--blue-50) 0%, #F3F7FD 60%, var(--surface) 100%);
}
.project-logo {
  width: 100%; max-width: 220px; height: 92px; display: grid; place-items: center; align-self: center;
  background: var(--surface); border-radius: var(--radius-sm); padding: 12px 16px; box-shadow: var(--shadow-sm);
}
.project-logo img { max-height: 100%; width: auto; object-fit: contain; }
.project-logo.mono { width: 92px; }
.project-logo.mono svg { width: 42px; height: 42px; fill: none; stroke: var(--blue-500); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.project-num { display: inline-block; font-size: .74rem; font-weight: 800; letter-spacing: .12em; color: var(--blue-700); text-transform: uppercase; }
.project-card h3 { font-size: clamp(1.25rem, 2.4vw, 1.5rem); margin-top: .2rem; }
.project-org { color: var(--ink-2); font-size: .92rem; margin-top: .25rem; }

.facts { display: grid; gap: .7rem; margin: 0; }
.facts div { display: grid; gap: .1rem; }
.facts dt { font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--blue-500); }
.facts dd { margin: 0; font-size: .92rem; font-weight: 600; color: var(--ink); }
.facts dd a { font-weight: 700; text-decoration: none; }
.facts dd a:hover { text-decoration: underline; }

.project-body { padding: 1.75rem; display: grid; gap: 1.25rem; align-content: start; }
.project-body > p { max-width: 75ch; color: var(--ink); }
.subhead { font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); margin-bottom: .6rem; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .6rem; counter-reset: step; }
.steps li { position: relative; background: var(--bg); border-radius: var(--radius-sm); padding: .85rem .9rem .9rem; font-size: .9rem; font-weight: 600; line-height: 1.35; }
.steps li::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 1.75rem; height: 1.75rem; margin-bottom: .5rem;
  border-radius: 50%; background: var(--blue-500); color: #fff; font-size: .82rem; font-weight: 800;
}
.steps li.decision { background: var(--amber-50); }
.steps li.decision::before { background: var(--amber-500); color: var(--ink); }

.highlights { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .6rem; }
.highlights li { display: flex; gap: .6rem; align-items: flex-start; background: var(--bg); border-radius: var(--radius-sm); padding: .8rem .9rem; font-size: .92rem; font-weight: 600; line-height: 1.4; }
.highlights li::before {
  content: ""; flex: none; width: 1.3rem; height: 1.3rem; margin-top: .05rem; border-radius: 50%;
  background: var(--green-500) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 70% no-repeat;
}

.tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tags li { font-size: .78rem; font-weight: 700; color: var(--blue-700); background: var(--blue-50); border-radius: 999px; padding: .25rem .7rem; }

.subprojects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.subproject {
  background: var(--bg); border-radius: var(--radius-sm); padding: 1.35rem; display: flex; flex-direction: column; gap: .9rem;
  transition: background-color .15s, box-shadow .15s, transform .15s;
}
.subproject:hover { background: var(--surface); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.subproject-top { display: flex; align-items: center; gap: .75rem; }
.subproject-num {
  flex: none; width: 2.75rem; height: 2.75rem; display: grid; place-items: center; border-radius: 12px;
  background: var(--blue-500); color: #fff; font-weight: 800; font-size: .95rem;
}
.subproject h4 { font-size: 1.08rem; }
.subproject p { font-size: .93rem; color: var(--ink); flex: 1; }
.subproject .btn { align-self: flex-start; padding: .45rem .9rem; font-size: .85rem; }

/* Footer */
.site-footer { padding: 2.25rem 0 2.5rem; margin-top: 1rem; }
.site-footer .wrap {
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border-radius: var(--radius); padding: 1.25rem 1.5rem; box-shadow: var(--shadow-sm);
}
.site-footer p { color: var(--ink-2); font-size: .92rem; }

/* Header social links */
.header-social { display: flex; gap: .4rem; flex-wrap: wrap; }
.header-social a, .header-social .contact-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-sm); transition: background-color .15s; }
.header-social a:hover { background: var(--blue-500); }
.header-social svg { width: 18px; height: 18px; fill: var(--ink); }
.header-social a:hover svg { fill: #fff; }
.header-social .contact-btn { background: var(--amber-500); }
.header-social .contact-btn:hover { background: var(--amber-400); }

/* 404 */
.notfound { min-height: 100vh; display: grid; place-items: center; padding: 1rem; text-align: center; }
.notfound img { width: 140px; height: 140px; margin: 0 auto 1rem; }
.notfound .code { font-size: clamp(3rem, 12vw, 5rem); font-weight: 800; color: var(--blue-200); line-height: 1; }
.notfound h1 { font-size: clamp(1.4rem, 4vw, 2rem); margin: .5rem 0; }
.notfound p { color: var(--ink-2); margin-bottom: 1.5rem; }

@media (max-width: 1100px) {
  .steps { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}
@media (max-width: 900px) {
  .project { grid-template-columns: 1fr; }
  .project-card { background: linear-gradient(180deg, var(--blue-50) 0%, var(--surface) 100%); }
  .facts { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}
@media (max-width: 820px) {
  .hero-card { grid-template-columns: 1fr; }
  .hero-card::after { display: none; }
  .hero-logo { max-width: 200px; }
  .subprojects { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .brand span { display: none; }
  .motto { grid-template-columns: 1fr; }
  .motto li { display: flex; align-items: center; gap: .75rem; }
  .project-card, .project-body { padding: 1.25rem; }
  .header-social { gap: .3rem; }
  .header-social a, .header-social .contact-btn { width: 36px; height: 36px; }
  .site-header .wrap { gap: .5rem; }
}
@media (max-width: 400px) {
  .header-social { gap: .2rem; }
  .header-social a, .header-social .contact-btn { width: 32px; height: 32px; border-radius: 10px; }
  .header-social svg { width: 16px; height: 16px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
