/* CTO Corner. Brand colors come from the badge: night navy, day cream, ink, orange. */

@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #080c10;
  --cream: #fff2de;
  --orange: #f6aa2e;
  --night: #07111c;

  /* Day theme (default) */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-tint: #fff2de;
  --text: #0b1117;
  --text-muted: #555b63;
  --border: rgb(8 12 16 / 0.1);
  --border-strong: rgb(8 12 16 / 0.18);
  --field-border: rgb(8 12 16 / 0.5); /* 3.6:1, form fields need 3:1 to be seen */
  --accent: var(--orange);
  --on-accent: var(--ink);
  --focus: #b86e00; /* darker orange: 4:1 on --bg, orange itself is only 1.8:1 */
  --error: #b42318;
  --shadow: 0 1px 2px rgb(8 12 16 / 0.04), 0 8px 24px -12px rgb(8 12 16 / 0.12);
  --header-bg: rgb(255 255 255 / 0.8);

  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 16px;
  --radius-small: 10px;
  --container: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --section-space: clamp(72px, 10vw, 128px);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--night);
    --surface: #0c1926;
    --surface-tint: #102033;
    --text: var(--cream);
    --text-muted: #b7b0a5;
    --border: rgb(255 242 222 / 0.1);
    --border-strong: rgb(255 242 222 / 0.2);
    --field-border: rgb(255 242 222 / 0.4);
    --focus: var(--orange);
    --error: #ff8a80;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 12px 32px -16px rgb(0 0 0 / 0.6);
    --header-bg: rgb(7 17 28 / 0.78);
  }
}

/* Base */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 {
  margin: 0;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 6.2vw, 4.75rem); letter-spacing: -0.045em; line-height: 1; }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.125rem; letter-spacing: -0.015em; line-height: 1.3; }

p { margin: 0; }

a {
  color: inherit;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  border-radius: var(--radius-small);
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.lead {
  color: var(--text-muted);
  font-size: clamp(1.125rem, 1.6vw, 1.25rem);
  line-height: 1.55;
  text-wrap: pretty;
}

.prose p + p { margin-top: 1em; }
.prose { font-size: clamp(1.125rem, 1.6vw, 1.25rem); line-height: 1.65; text-wrap: pretty; }

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: #ffba45; }
.btn--ghost { border-color: var(--border-strong); color: var(--text); }
.btn--ghost:hover { border-color: var(--text); }
.btn--small { min-height: 40px; padding: 0 16px; font-size: 0.9375rem; }
.btn--large { min-height: 56px; padding: 0 28px; font-size: 1.0625rem; }
.btn:disabled, .btn[aria-busy="true"] { cursor: progress; opacity: 0.75; }

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}
.brand { display: block; flex: none; }
.brand img { width: 58px; height: 40px; }
.site-nav { display: flex; gap: 4px; margin-left: auto; }
.site-nav a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}
.site-nav a:hover { color: var(--text); background: var(--border); }

@media (max-width: 640px) {
  .site-header__inner { gap: 8px; }
  .site-nav { gap: 0; }
  .site-nav a { padding: 10px 8px; font-size: 0.8125rem; min-height: 44px; display: inline-flex; align-items: center; }
  .brand img { width: 46px; height: auto; }
}

/* Hero */

.hero { padding-block: clamp(48px, 9vw, 112px) clamp(56px, 8vw, 96px); }
.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
}
.hero__text .lead { max-width: 34rem; margin-top: 24px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero__art { display: flex; justify-content: center; }
.hero__art img {
  width: min(100%, 400px);
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: 0 30px 80px -30px rgb(7 17 28 / 0.55);
}

@media (max-width: 899px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__art { order: -1; justify-content: flex-start; }
  .hero__art img { width: 144px; }
}

/* Sections */

.section { padding-block: var(--section-space); border-top: 1px solid var(--border); }
.section--compact { padding-block: clamp(40px, 6vw, 72px); }
/* Explore and background */
.section-heading { max-width: 42rem; margin-bottom: 40px; }
.section-heading .lead { margin-top: 20px; }
.activities { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.activity { display: flex; flex-direction: column; align-items: flex-start; padding: 32px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.activity__number { font-size: 0.8125rem; color: var(--text-muted); margin-bottom: 28px; }
.activity h3 { font-size: 1.5rem; }
.activity p { color: var(--text-muted); margin-top: 16px; margin-bottom: 24px; }
.activity a { margin-top: auto; padding-block: 8px; font-weight: 600; }
.build-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 32px 64px; }
.about__linkedin { display: inline-block; margin-top: 24px; padding-block: 8px; }
.contact__aside { margin-top: 20px; color: var(--text-muted); }
@media (max-width: 760px) {
  .activities, .build-section { grid-template-columns: 1fr; }
  .activity { padding: 24px; }
  .activity__number { margin-bottom: 16px; }
}

/* YouTube */

.channel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px 32px;
  padding: clamp(28px, 4vw, 48px);
  border-radius: calc(var(--radius) + 8px);
  background: var(--night);
  color: var(--cream);
}
.channel__icon { width: 56px; height: 56px; color: var(--orange); }
.channel__title { font-size: clamp(1.5rem, 3vw, 2rem); }
.channel__desc { margin-top: 8px; max-width: 36rem; color: #cfc7ba; }
.channel .btn:focus-visible { outline-color: var(--orange); }
@media (prefers-color-scheme: dark) {
  .channel { background: var(--surface-tint); border: 1px solid var(--border); }
}
@media (max-width: 760px) {
  .channel { grid-template-columns: 1fr; justify-items: start; }
  .channel__icon { width: 44px; height: 44px; }
}

/* Empty live regions remain available for status announcements. */
.form-status:empty { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Contact */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 40px clamp(32px, 6vw, 80px);
  align-items: start;
}
.contact__intro .lead { margin-top: 16px; }
.contact__form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.field { display: grid; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 0.9375rem; font-weight: 600; }
.field input, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--field-border);
  border-radius: var(--radius-small);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.15s ease;
}
.field textarea { resize: vertical; min-height: 160px; }
.field input:hover, .field textarea:hover { border-color: var(--text-muted); }
.field input:focus-visible, .field textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 0;
  border-color: transparent;
}
.field [aria-invalid="true"],
.field [aria-invalid="true"]:focus-visible { border-color: var(--error); }
.honeypot { display: none; }
.contact__submit { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.form-status { font-size: 0.9375rem; }
.form-status[data-state="success"] { font-weight: 600; }
.form-status[data-state="error"] { color: var(--error); }

@media (max-width: 760px) {
  .contact { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .contact__form { grid-template-columns: 1fr; }
}

/* Footer */

.site-footer {
  padding-block: 32px 40px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9375rem;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}
.site-footer__links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  text-decoration: none;
}
.site-footer a:hover { color: var(--text); }
.icon { width: 20px; height: 20px; flex: none; }

/* 404 */

.not-found { padding-block: clamp(96px, 16vw, 200px); }
.not-found .lead { margin-top: 20px; max-width: 32rem; }
.not-found .btn { margin-top: 32px; }

@media (max-width: 380px) {
  .site-nav a { padding-inline: 6px; }
}
