/* ==========================================================================
   SEC 2026 — Reset, typography, layout primitives, buttons
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--space-4));
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-4);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
}

p { margin: 0 0 var(--space-4); }
p:last-child { margin-bottom: 0; }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

/*
 * The hidden attribute comes from the browser's own stylesheet, so ANY author
 * rule that sets display — .sec-chat__panel{display:flex}, .project-item{
 * display:flex} — silently beats it and the element stays on screen. This is
 * why the assistant could not be closed and why the project filters appeared to
 * do nothing. !important is the correct tool here: "hidden" is not a style
 * suggestion.
 */
[hidden] { display: none !important; }

img, video, svg { max-width: 100%; }
/* <picture> is a grouping element only — let the <img> inherit the parent layout box. */
picture { display: contents; }
img { height: auto; display: block; border: 0; }

ul, ol { margin: 0 0 var(--space-4); padding-inline-start: 1.2em; }

button, input, select, textarea { font: inherit; color: inherit; }

hr {
  border: 0;
  border-top: 1px solid var(--color-line);
  margin: var(--space-7) 0;
}

/* --- Focus ---------------------------------------------------------------- */
:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}
:focus:not(:focus-visible) { outline: none; }

/* --- Utilities ------------------------------------------------------------ */
.u-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  inset-inline-start: var(--space-4);
  top: -100px;
  z-index: var(--z-top);
  padding: var(--space-3) var(--space-5);
  background: var(--color-ink);
  color: var(--color-bg);
  font-weight: var(--fw-bold);
  text-decoration: none;
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: var(--space-3); }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: max(var(--gutter-min), var(--gutter));
}
.container--narrow { max-width: var(--container-narrow); }
.container--flush { max-width: none; padding-inline: 0; }

.section { padding-block: var(--section-y); }
.section--dark {
  background: var(--color-surface-dark);
  color: var(--color-ink-invert);
}
.section--dark .section__intro,
.section--dark p { color: var(--color-muted-invert); }
.section--tint { background: var(--color-surface); }

/* --- Section headings ----------------------------------------------------- */
.eyebrow {
  margin: 0 0 var(--space-3);
  font-size: var(--step--1);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--color-muted);
}
.section--dark .eyebrow { color: var(--sec-gray); }

.section__head {
  display: grid;
  gap: var(--space-5);
  margin-bottom: var(--space-8);
}
@media (min-width: 900px) {
  .section__head--split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: var(--space-9);
    align-items: end;
  }
}
.section__title {
  margin: 0;
  font-size: var(--step-4);
  text-transform: uppercase;
}
.section__intro {
  margin: 0;
  max-width: 62ch;
  color: var(--color-muted);
  font-size: var(--step-1);
  font-weight: var(--fw-light);
}

.lead {
  font-size: var(--step-2);
  font-weight: var(--fw-light);
  line-height: var(--lh-snug);
}

/* --- Buttons -------------------------------------------------------------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--color-ink);
  --btn-bd: currentColor;
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0.85em 1.6em;
  border: 1px solid var(--btn-bd);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: var(--step--1);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}
.btn:hover,
.btn:focus-visible {
  --btn-bg: var(--color-ink);
  --btn-fg: var(--color-bg);
  --btn-bd: var(--color-ink);
}
.btn .icon { width: 0.7em; height: 0.7em; flex: none; transition: transform var(--dur) var(--ease); }
.btn:hover .icon { transform: translateX(3px); }
[dir="rtl"] .btn:hover .icon { transform: translateX(-3px); }

.btn--solid { --btn-bg: var(--color-ink); --btn-fg: var(--color-bg); --btn-bd: var(--color-ink); }
.btn--solid:hover,
.btn--solid:focus-visible { --btn-bg: transparent; --btn-fg: var(--color-ink); --btn-bd: var(--color-ink); }

.btn--invert { --btn-fg: var(--sec-white); --btn-bd: rgba(255, 255, 255, 0.55); }
.btn--invert:hover,
.btn--invert:focus-visible { --btn-bg: var(--sec-white); --btn-fg: var(--sec-black); --btn-bd: var(--sec-white); }

.btn--sm { padding: 0.65em 1.2em; font-size: var(--step--2); }
.btn--block { width: 100%; justify-content: center; }

/* Text link with a trailing chevron — the reference's plain CTA */
.link-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--step--1);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: gap var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.link-cta:hover { gap: var(--space-4); }
.link-cta .icon { width: 0.65em; height: 0.65em; }

/* --- Icons ---------------------------------------------------------------- */
.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  fill: currentColor;
  vertical-align: middle;
}
[dir="rtl"] .icon--flip { transform: scaleX(-1); }

/* --- Media ---------------------------------------------------------------- */
.media {
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--color-surface-dark);
}
.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease);
}

/* --- Reduced motion ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
