/* ============================================
   Alphaeus Technologies — brand stylesheet
   ============================================ */

:root {
  --sage:        #A8C3A0;
  --mint:        #D8F1DE;
  --coral:       #F27D72;
  --cream:       #FAF8F2;
  --forest:      #28443A;
  --forest-soft: #3a5a4e;
  --line:        rgba(40, 68, 58, 0.12);

  --f-display: 'Poppins', system-ui, sans-serif;
  --f-body:    'Inter', system-ui, sans-serif;

  --max: 1180px;
  --pad:  clamp(1.25rem, 4vw, 2.5rem);

  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--f-body);
  color: var(--forest);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--coral); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Layout ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

section { padding: clamp(4rem, 8vw, 7rem) 0; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; color: var(--forest); }

h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.2rem; font-weight: 600; }

p { color: var(--forest-soft); }

.eyebrow {
  font-family: var(--f-display);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--coral);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}
.eyebrow::before {
  content: '';
  width: 28px; height: 1.5px;
  background: var(--coral);
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 248, 242, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 0;
}
.brand { display: flex; align-items: center; color: #0a0a0a; text-decoration: none; }
.brand:hover { text-decoration: none; }
/* Full lockup: mark + ALPHAEUS + TECHNOLOGIES, drawn as SVG outlines */
.brand .lockup { height: 40px; width: auto; display: block; }
@media (max-width: 560px) { .brand .lockup { height: 32px; } }
.site-footer .brand { color: var(--cream); }
.site-footer .brand .lockup { height: 52px; }

.nav-links { display: flex; gap: 2rem; list-style: none; align-items: center; }
.nav-links a {
  color: var(--forest); font-weight: 500; font-size: 0.95rem;
  position: relative; padding: 0.35rem 0;
}
.nav-links a:hover { text-decoration: none; color: var(--coral); }
.nav-links a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -3px;
  height: 2px; background: var(--coral); border-radius: 2px;
}

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  width: 40px; height: 40px; align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ''; display: block; width: 22px; height: 2px; background: var(--forest);
  border-radius: 2px; transition: transform .3s var(--ease), opacity .2s;
}
.nav-toggle span { position: relative; }
.nav-toggle span::before { position: absolute; top: -7px; }
.nav-toggle span::after  { position: absolute; top:  7px; }
.nav-toggle.open span { background: transparent; }
.nav-toggle.open span::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span::after  { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 0.5rem 0;
    background: var(--cream); border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height .35s var(--ease);
  }
  .nav-links.open { max-height: 400px; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 0.9rem var(--pad); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--f-display); font-weight: 500; font-size: 0.95rem;
  padding: 0.85rem 1.5rem; border-radius: 999px;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform .2s var(--ease), background .2s, color .2s, border-color .2s;
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn-primary { background: var(--coral); color: var(--cream); }
.btn-primary:hover { background: var(--forest); color: var(--cream); }
.btn-ghost { background: transparent; color: var(--forest); border-color: var(--forest); }
.btn-ghost:hover { background: var(--forest); color: var(--cream); }
.btn .arrow { transition: transform .2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Hero ---------- */
.hero {
  padding: clamp(4rem, 9vw, 8rem) 0 clamp(4rem, 8vw, 7rem);
  position: relative; overflow: hidden;
}
.hero-grid {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.hero h1 { margin: 1.2rem 0 1.5rem; }
.hero h1 .accent { color: var(--coral); }
.hero-lead { font-size: 1.15rem; margin-bottom: 2rem; max-width: 42ch; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-visual {
  aspect-ratio: 1 / 1; max-width: 460px; margin-left: auto; width: 100%;
  position: relative;
}
@media (max-width: 900px) { .hero-visual { margin: 0 auto; } }

/* ---------- Circuit motif ---------- */
.circuit-divider {
  display: flex; align-items: center; gap: 0.5rem;
  margin: 0.5rem 0 0;
}
.circuit-divider .node {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--cream); border: 1.5px solid var(--coral);
}
.circuit-divider .trace {
  flex: 1; height: 1.5px; background: var(--coral); max-width: 80px;
}

/* ---------- Services ---------- */
.services-intro {
  display: grid; grid-template-columns: 1fr 1.8fr; gap: clamp(2rem, 5vw, 5rem);
  margin-bottom: 3.5rem; align-items: end;
}
@media (max-width: 780px) { .services-intro { grid-template-columns: 1fr; } }

.service-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.service {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.75rem 1.75rem 2rem;
  transition: transform .3s var(--ease), border-color .3s, background .3s;
  position: relative; overflow: hidden;
}
.service::before {
  content: ''; position: absolute; top: 0; left: 1.75rem; right: 1.75rem; height: 3px;
  background: linear-gradient(90deg, var(--sage), var(--coral));
  transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease);
}
.service:hover { transform: translateY(-4px); border-color: var(--sage); background: #fff; }
.service:hover::before { transform: scaleX(1); }

.service-num {
  font-family: var(--f-display); font-size: 0.75rem; letter-spacing: 0.2em;
  color: var(--coral); font-weight: 600; margin-bottom: 1.25rem;
}
.service h3 { margin-bottom: 0.6rem; }
.service p { font-size: 0.95rem; }

.service-detail { padding: 2.5rem 2rem; }
.service-detail h3 { font-size: 1.5rem; margin-bottom: 1rem; }
.service-detail ul { list-style: none; padding: 0; }
.service-detail li {
  padding: 0.5rem 0 0.5rem 1.5rem; position: relative;
  color: var(--forest-soft); font-size: 0.98rem;
  border-bottom: 1px dashed var(--line);
}
.service-detail li:last-child { border-bottom: 0; }
.service-detail li::before {
  content: ''; position: absolute; left: 0; top: 1.05rem;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--cream); border: 1.5px solid var(--coral);
}

/* ---------- Bands (alternating backgrounds) ---------- */
.band-mint { background: var(--mint); }
.band-forest { background: var(--forest); color: var(--cream); }
.band-forest h1, .band-forest h2, .band-forest h3 { color: var(--cream); }
.band-forest p { color: rgba(250, 248, 242, 0.75); }
.band-forest .eyebrow { color: var(--sage); }
.band-forest .eyebrow::before { background: var(--sage); }

/* ---------- Why us ---------- */
.why-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
  margin-top: 3rem;
}
@media (max-width: 780px) { .why-grid { grid-template-columns: 1fr; } }
.why {
  padding: 2rem 1.75rem;
  background: rgba(250, 248, 242, 0.06);
  border: 1px solid rgba(250, 248, 242, 0.14);
  border-radius: 20px;
}
.why-marker {
  font-family: var(--f-display); font-weight: 700; font-size: 2.2rem;
  color: var(--coral); margin-bottom: 0.75rem; line-height: 1;
}
.why h3 { margin-bottom: 0.6rem; }

/* ---------- About ---------- */
.about-hero {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
@media (max-width: 900px) { .about-hero { grid-template-columns: 1fr; } }

.about-card {
  background: #fff; border: 1px solid var(--line); border-radius: 24px;
  padding: 2rem; box-shadow: 0 30px 60px -30px rgba(40, 68, 58, 0.2);
}
.about-card .role { font-family: var(--f-display); font-weight: 600; color: var(--forest); }
.about-card .years { color: var(--coral); font-size: 0.9rem; letter-spacing: 0.15em; text-transform: uppercase; font-weight: 600; }
.about-card ul { list-style: none; margin-top: 1.25rem; }
.about-card li {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.75rem 0; border-top: 1px dashed var(--line);
  font-size: 0.95rem;
}
.about-card li:first-of-type { border-top: 1px solid var(--line); margin-top: 1rem; }
.about-card li span:last-child { color: var(--coral); font-weight: 500; font-family: var(--f-display); }

.principles {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  margin-top: 3rem; border-top: 1px solid var(--line);
}
@media (max-width: 780px) { .principles { grid-template-columns: 1fr; } }
.principle {
  padding: 2.5rem 1.75rem 2rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.principle:last-child { border-right: 0; }
@media (max-width: 780px) { .principle { border-right: 0; } }
.principle-num {
  font-family: var(--f-display); font-weight: 700; font-size: 3rem;
  color: var(--coral); line-height: 1; margin-bottom: 1rem;
  display: inline-block; position: relative;
}
.principle-num::after {
  content: ''; position: absolute; right: -18px; bottom: 8px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--cream); border: 1.5px solid var(--coral);
}
.principle h3 { margin-bottom: 0.75rem; font-size: 1.35rem; }

.stack-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem; margin-top: 2rem;
}
.stack-item {
  padding: 0.85rem 1rem; background: var(--cream); border: 1px solid var(--line);
  border-radius: 12px; font-size: 0.9rem; font-weight: 500;
  color: var(--forest); font-family: var(--f-display);
}
.stack-item::before {
  content: '•'; color: var(--coral); font-weight: 700; margin-right: 0.5rem;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem);
}
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-list { list-style: none; margin-top: 2rem; }
.contact-list li { padding: 1.25rem 0; border-bottom: 1px solid var(--line); display: flex; gap: 1rem; align-items: flex-start; }
.contact-list .label {
  font-family: var(--f-display); font-size: 0.75rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--coral); font-weight: 600; min-width: 90px; padding-top: 4px;
}
.contact-list .value { font-size: 1.05rem; color: var(--forest); font-weight: 500; }
.contact-list a.value:hover { color: var(--coral); text-decoration: none; }

.form { display: grid; gap: 1.1rem; }
.form label { font-family: var(--f-display); font-size: 0.78rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--forest); font-weight: 600; }
.form input, .form textarea, .form select {
  width: 100%; padding: 0.9rem 1rem;
  background: var(--cream); border: 1.5px solid var(--line);
  border-radius: 12px; font-family: var(--f-body); font-size: 1rem;
  color: var(--forest); transition: border-color .2s, background .2s;
}
.form input:focus, .form textarea:focus, .form select:focus {
  outline: none; border-color: var(--coral); background: #fff;
}
.form textarea { min-height: 140px; resize: vertical; }
.form-field { display: grid; gap: 0.5rem; }
.form-status { font-size: 0.9rem; color: var(--forest-soft); min-height: 1.2em; }
.form-status.success { color: var(--forest); font-weight: 500; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--forest); color: var(--cream);
  padding: 3.5rem 0 1.5rem;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem;
  padding-bottom: 2.5rem; border-bottom: 1px solid rgba(250, 248, 242, 0.14);
}
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: var(--sage); font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase; margin-bottom: 1.25rem; }
.site-footer ul { list-style: none; }
.site-footer ul li { padding: 0.35rem 0; }
.site-footer a { color: var(--cream); opacity: 0.85; }
.site-footer a:hover { color: var(--coral); opacity: 1; text-decoration: none; }
.footer-tag { max-width: 32ch; margin-top: 0.75rem; color: rgba(250, 248, 242, 0.7); font-size: 0.95rem; }
.footer-bottom { padding-top: 1.5rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: 0.85rem; color: rgba(250, 248, 242, 0.6); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; transition: none !important; }
}

/* ---------- Hero visual: animated logo mark ---------- */
.hero-mark { width: 100%; height: 100%; }
.hero-mark .trace-anim {
  stroke-dasharray: 330; stroke-dashoffset: 330;
  animation: draw 1.9s var(--ease) 0.3s forwards;
}
.hero-mark .node-anim { opacity: 0; animation: fadeIn .5s var(--ease) forwards; }
.hero-mark .node-anim.n1 { animation-delay: 0.3s; }
.hero-mark .node-anim.n2 { animation-delay: 2.0s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeIn { to { opacity: 1; } }

/* ---------- Utility ---------- */
.center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

/* ---------- Home services: new patterns ---------- */

/* Cards stack vertically so tags & badges pin to the bottom evenly */
#services .service { display: flex; flex-direction: column; }
#services .service p { margin-bottom: 0.9rem; }
#services .service .consult,
#services .service .partner-badge { margin-top: auto; }

/* Small "Build or advise" marker on cards that also offer consultancy */
.service .consult {
  display: inline-block; align-self: flex-start;
  font-family: var(--f-display); font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--coral);
}

/* Official partner badge (Bitdefender) */
.partner-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--f-display); font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--forest); background: var(--mint);
  border: 1px solid var(--sage);
  padding: 0.3rem 0.65rem; border-radius: 999px;
  align-self: flex-start; white-space: nowrap;
}
.partner-badge::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--coral);
}

/* Wider heading column for the new longer headline */
#services .services-intro { grid-template-columns: 1.55fr 1fr; align-items: end; }
#services .services-intro h2 { font-size: clamp(1.7rem, 3.1vw, 2.45rem); }
@media (max-width: 900px) {
  #services .services-intro { grid-template-columns: 1fr; }
  #services .services-intro h2 br { display: none; }
}

/* Consultancy · white-label band at the end of the services section */
.consultancy {
  margin-top: 4.5rem;
  padding: 2.75rem clamp(1.75rem, 4vw, 3rem);
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 24px;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
}
@media (max-width: 820px) { .consultancy { grid-template-columns: 1fr; gap: 1rem; } }
.consultancy h3 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  margin-top: 0.65rem;
  line-height: 1.15;
}
.consultancy p { font-size: 1rem; }
.consultancy .accent { color: var(--coral); }

/* ---------- Floating WhatsApp chat button ---------- */
.wa-chat {
  position: fixed;
  right: clamp(1rem, 2vw, 1.75rem);
  bottom: clamp(1rem, 2vw, 1.75rem);
  z-index: 100;
  display: inline-flex; align-items: center;
  padding: 0.42rem 1rem 0.42rem 0.42rem;
  background: #25D366;
  color: #fff;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(20, 60, 40, 0.22);
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1;
  transition: padding .35s var(--ease), background .2s, box-shadow .2s, transform .2s;
  overflow: hidden;
}
.wa-chat:hover {
  background: #1EBE5D;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(20, 60, 40, 0.28);
}
.wa-chat:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 3px;
}
.wa-icon {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; color: #25D366;
  border-radius: 50%;
  flex-shrink: 0;
}
.wa-icon svg { width: 22px; height: 22px; display: block; }
.wa-label {
  display: inline-block;
  max-width: 140px;
  margin-left: 0.75rem;
  opacity: 1;
  white-space: nowrap;
  transition: max-width .35s var(--ease), opacity .2s, margin-left .35s var(--ease);
}
/* Collapsed state — after the user scrolls past the hero */
.wa-chat.compact { padding: 0.42rem; }
.wa-chat.compact .wa-label {
  max-width: 0;
  opacity: 0;
  margin-left: 0;
}
@media (prefers-reduced-motion: reduce) {
  .wa-chat, .wa-label { transition: none; }
  .wa-chat:hover { transform: none; }
}
