/* ==========================================================================
   components.css — nav, buttons, cards and the rest of the UI
   Reads every colour, size and duration from tokens.css.
   ========================================================================== */

/* ---- Text helpers ------------------------------------------------------- */
.lead { font-size: var(--text-md); color: var(--color-ink-soft); }
.muted { color: var(--color-ink-soft); }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  padding: 0.72em 1.4em;
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  transition: transform var(--dur-fast) var(--ease),
              background var(--dur) var(--ease),
              color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 1em; height: 1em; }

.btn--primary { background: var(--color-ink); color: var(--color-bg); }
.btn--primary:hover { background: var(--color-accent-deep); box-shadow: var(--shadow-md); }

.btn--accent { background: var(--color-accent); color: var(--color-ink); }
.btn--accent:hover { background: var(--color-accent-deep); color: var(--color-white); box-shadow: var(--shadow-md); }

.btn--ghost { border-color: var(--color-line-strong); color: var(--color-ink); }
.btn--ghost:hover { background: var(--color-surface-alt); border-color: var(--color-ink); }

.btn--light { background: var(--color-bg); color: var(--color-ink); }
.btn--light:hover { background: var(--color-white); box-shadow: var(--shadow-md); }

.btn--lg { padding: 0.9em 1.7em; font-size: var(--text-base); }

/* Inline arrow link (e.g. the "Back" link, with a small chevron that nudges on hover). */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3xs);
  color: var(--color-accent-deep);
  font-weight: 500;
  font-size: var(--text-sm);
}
.link-arrow svg { width: 1em; height: 1em; transition: transform var(--dur) var(--ease); }
.link-arrow:hover svg { transform: translateX(3px); }
.link-arrow--back:hover svg { transform: translateX(-3px); }

/* Bulleted list used on the Division pages. */
.detail-list { list-style: disc; padding-left: var(--space-md); color: var(--color-ink-soft); }
.detail-list li { margin-top: var(--space-2xs); }
.detail-list li:first-child { margin-top: 0; }

/* ---- Header (the sticky bar at the top with the wordmark + Contact) ----- */
.header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: color-mix(in srgb, var(--color-bg) 85%, transparent);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.header[data-scrolled="true"] {
  border-bottom-color: var(--color-line);
  background: color-mix(in srgb, var(--color-bg) 93%, transparent);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  min-height: var(--header-h);
}

/* The company wordmark. white-space: nowrap keeps "Elevya Living Inc." on one
   line so the name never breaks mid-word (replaces old &nbsp; hacks). */
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  color: var(--color-ink);
}

/* ---- Hero: the large banner section at the very top of a page ----------- */
.hero { position: relative; overflow: hidden; }
.hero::before {
  /* Soft radial glow behind the hero content. */
  content: "";
  position: absolute;
  inset: -20% -10% auto auto;
  width: 46rem;
  height: 46rem;
  background: radial-gradient(circle at 70% 30%,
              color-mix(in srgb, var(--color-accent) 16%, transparent), transparent 62%);
  pointer-events: none;
  z-index: 0;
}
.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(var(--space-lg), 5vw, var(--space-2xl));
  align-items: center;
  padding-block: clamp(var(--space-xl), 8vw, var(--space-3xl)) var(--space-2xl);
}
.hero__content { max-width: 46rem; }
.hero h1 { margin-top: var(--space-sm); }
.hero__lead { margin-top: var(--space-md); max-width: 34rem; }
.hero__actions { margin-top: var(--space-lg); }

/* ---- Division cards: the clickable cards that link to each Division page - */
.division {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.division::before {
  /* The thin coloured stripe along the top edge of each card. */
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--divhue, var(--color-accent));
}
.division:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-line-strong);
}
.division h3 { font-size: var(--text-lg); }
.division p { color: var(--color-ink-soft); font-size: var(--text-sm); }
.division__more {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3xs);
  margin-top: auto;
  padding-top: var(--space-xs);
  color: var(--color-accent-deep);
  font-size: var(--text-sm);
  font-weight: 500;
}
.division__more svg { width: 1em; height: 1em; transition: transform var(--dur) var(--ease); }
.division:hover .division__more svg { transform: translateX(3px); }

/* Each modifier sets that card's top-stripe colour (--divhue). */
.division--real-estate-investment { --divhue: var(--hue-real-estate-investment); }
.division--software               { --divhue: var(--hue-software); }
.division--research               { --divhue: var(--hue-research); }

/* ---- Call-to-action (CTA): the closing "Get in Touch" invite band ------- */
.cta {
  position: relative;
  overflow: hidden;
  padding: clamp(var(--space-lg), 5vw, var(--space-2xl));
  background: var(--color-ink);
  color: var(--color-bg);
  border-radius: var(--radius-lg);
  text-align: center;
}
.cta::before {
  content: "";
  position: absolute;
  inset: auto auto -40% -10%;
  width: 34rem; height: 34rem;
  background: radial-gradient(circle,
              color-mix(in srgb, var(--color-accent) 40%, transparent), transparent 60%);
  opacity: 0.5;
  pointer-events: none;
}
.cta > * { position: relative; }
.cta h2 { color: var(--color-bg); }
.cta p { color: var(--color-cta-text); max-width: 42rem; margin: var(--space-sm) auto 0; }
.cta .cluster { justify-content: center; margin-top: var(--space-lg); }

/* ---- Contact + form ----------------------------------------------------- */
.contact-form-wrap { max-width: 42rem; margin-inline: auto; }

.card-panel {
  padding: clamp(var(--space-md), 4vw, var(--space-xl));
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.form { display: grid; gap: var(--space-md); }
.form__row { display: grid; gap: var(--space-md); }
@media (min-width: 600px) { .form__row { grid-template-columns: 1fr 1fr; } }   /* phone breakpoint: name + email side by side above it */
.field { display: grid; gap: var(--space-2xs); }
.field label { font-size: var(--text-sm); font-weight: 500; }
.field input,
.field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  background: var(--color-bg);
  border: 1px solid var(--color-line-strong);
  border-radius: var(--radius-md);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}
.field textarea { min-height: 8.5rem; resize: vertical; }
.field--error input,
.field--error textarea { border-color: var(--color-error-border); }
.field__error { display: none; font-size: var(--text-xs); color: var(--color-error); }
.field--error .field__error { display: block; }

.form__note { font-size: var(--text-xs); color: var(--color-ink-faint); }
.form-status { font-size: var(--text-sm); min-height: 1.25rem; }
.form-status[data-state="error"] { color: var(--color-error); }
.form-status[data-state="ok"] { color: var(--color-success); }

/* ---- Footer ------------------------------------------------------------- */
.footer {
  margin-top: var(--space-2xl);
  padding-block: var(--space-2xl) var(--space-lg);
  background: var(--color-ink);
  color: var(--color-on-dark);
}
.footer a { color: var(--color-on-dark); transition: color var(--dur-fast) var(--ease); }
.footer a:hover { color: var(--color-white); }
.footer__top {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: 1.5fr repeat(2, 1fr);
}
@media (max-width: 900px) { .footer__top { grid-template-columns: 1fr 1fr; } }   /* tablet breakpoint */
@media (max-width: 600px) { .footer__top { grid-template-columns: 1fr; } }        /* phone breakpoint */
.footer__brand { display: inline-flex; align-items: center; gap: var(--space-2xs); font-family: var(--font-display); font-size: var(--text-md); color: var(--color-white); }
.footer__col h4 {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--color-white);
  margin-bottom: var(--space-sm);
}
.footer__col a { display: block; padding: 3px 0; font-size: var(--text-sm); }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-xl);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-rule-on-dark);
  font-size: var(--text-xs);
  color: var(--color-on-dark-faint);
}
/* Legal disclaimer — same small print as the copyright line above it. */
.footer__legal {
  margin-top: var(--space-sm);
  font-size: var(--text-xs);
  color: var(--color-on-dark-faint);
}

/* ---- Reveal-on-scroll (progressive enhancement) ------------------------- */
/* Sections start hidden only when JS is present; without JS everything shows. */
.has-js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}
.has-js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .has-js .reveal { opacity: 1; transform: none; transition: none; }
}
