/* The Future Tech — theme-04 bold magazine grid */

:root {
  --ft-ink: #16161a;
  --ft-ink-soft: #232329;
  --ft-paper: #ffffff;
  --ft-body: #2c2c33;
  --ft-muted: #63636e;
  --ft-rule: #e5e5ea;
  --ft-wash: #f6f6f8;
  --ft-accent: #dc2626;
  --ft-cat: #dc2626;
  --ft-display: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.ft-cat--ai { --ft-cat: #dc2626; }
.ft-cat--computing { --ft-cat: #4f46e5; }
.ft-cat--energy { --ft-cat: #d97706; }
.ft-cat--robotics { --ft-cat: #0d9488; }
.ft-cat--work { --ft-cat: #475569; }

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--ft-display);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ft-body);
  background: var(--ft-paper);
}

a { color: inherit; }

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

/* Skip link */
.ft-skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ft-accent);
  color: #fff;
  padding: 0.6rem 1rem;
  font-weight: 700;
  z-index: 20;

  &:focus { left: 0; }
}

/* Masthead */
.ft-masthead {
  background: var(--ft-ink);
  color: #fff;
  padding: 1.4rem 1.25rem 0;
}

.ft-masthead__inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 1.2rem;
}

.ft-brand {
  margin: 0;
  font-size: clamp(1.7rem, 4.5vw, 2.4rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  text-transform: uppercase;

  & a { text-decoration: none; color: #fff; }
  & span { color: var(--ft-accent); }
}

.ft-tagline {
  margin: 0;
  font-size: 0.9rem;
  color: #b7b7c2;
  font-weight: 500;
}

.ft-nav {
  max-width: 72rem;
  margin: 1rem auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.4rem;
  border-top: 1px solid #2e2e36;

  & a {
    text-decoration: none;
    color: #e8e8ee;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.7rem 0;
    border-top: 3px solid transparent;
    margin-top: -1px;
  }

  & a:hover, & a:focus { color: #fff; }

  & .ft-nav--ai { border-top-color: #dc2626; }
  & .ft-nav--computing { border-top-color: #4f46e5; }
  & .ft-nav--energy { border-top-color: #d97706; }
  & .ft-nav--robotics { border-top-color: #0d9488; }
  & .ft-nav--work { border-top-color: #64748b; }
}

/* Layout shells */
.ft-main {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

/* Home mosaic */
.ft-mosaic {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: 1fr;
}

.ft-card {
  position: relative;
  border: 1px solid var(--ft-rule);
  border-top: 6px solid var(--ft-cat);
  background: var(--ft-paper);
  padding: 1.2rem 1.3rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;

  & h2, & h3 {
    margin: 0;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.12;
    font-size: 1.35rem;
  }

  & h2 a, & h3 a { text-decoration: none; }

  & h2 a:hover, & h3 a:hover,
  & h2 a:focus, & h3 a:focus { color: var(--ft-cat); }

  & p { margin: 0; color: var(--ft-muted); font-size: 0.95rem; }
}

.ft-card--lead {
  background: var(--ft-ink);
  border-color: var(--ft-ink);
  color: #fff;
  padding: 2rem 1.6rem 2.2rem;

  & h2 { font-size: clamp(1.8rem, 4.5vw, 2.7rem); line-height: 1.05; }
  & h2 a { color: #fff; }
  & h2 a:hover, & h2 a:focus { color: var(--ft-cat); }
  & p { color: #c5c5cf; font-size: 1.05rem; }
  & .ft-card__meta { color: #8f8f9b; }
}

.ft-card--second h3 { font-size: 1.6rem; }

.ft-kicker {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ft-cat);
}

.ft-card__meta {
  margin-top: auto;
  font-size: 0.8rem;
  color: var(--ft-muted);
  padding-top: 0.4rem;
}

@media (min-width: 42rem) {
  .ft-mosaic { grid-template-columns: repeat(2, 1fr); }
  .ft-card--lead { grid-column: 1 / -1; }
}

@media (min-width: 62rem) {
  .ft-mosaic { grid-template-columns: repeat(3, 1fr); }
  .ft-card--lead { grid-column: 1 / 3; grid-row: 1 / 3; }
  .ft-card--second { grid-column: 3; }
}

.ft-sectionhead {
  margin: 2.6rem 0 1.2rem;
  font-size: 1rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 3px solid var(--ft-ink);
  padding-bottom: 0.4rem;
}

/* Category index */
.ft-cathead {
  border-bottom: 6px solid var(--ft-cat);
  padding-bottom: 1.4rem;
  margin-bottom: 1.8rem;

  & h1 {
    margin: 0.2rem 0 0.5rem;
    font-size: clamp(2.1rem, 6vw, 3.2rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1;
  }

  & p { margin: 0; max-width: 46rem; color: var(--ft-muted); font-size: 1.05rem; }
}

.ft-catgrid {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: 1fr;
}

@media (min-width: 42rem) {
  .ft-catgrid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 62rem) {
  .ft-catgrid { grid-template-columns: repeat(3, 1fr); }
}

/* Breadcrumbs */
.ft-crumbs {
  font-size: 0.8rem;
  color: var(--ft-muted);
  margin-bottom: 1.2rem;

  & a { color: var(--ft-muted); }
  & a:hover, & a:focus { color: var(--ft-cat); }
}

/* Article */
.ft-article__head {
  max-width: 56rem;
  margin: 0 auto 1.8rem;

  & h1 {
    margin: 0.3rem 0 0.9rem;
    font-size: clamp(1.9rem, 5.5vw, 3.1rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.05;
    color: var(--ft-ink);
  }
}

.ft-standfirst {
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--ft-ink-soft);
  font-weight: 500;
  margin: 0 0 0.9rem;
  max-width: 44em;
}

.ft-meta {
  font-size: 0.85rem;
  color: var(--ft-muted);
  margin: 0;
  border-top: 1px solid var(--ft-rule);
  padding-top: 0.7rem;

  & a { color: var(--ft-muted); font-weight: 700; }
  & a:hover, & a:focus { color: var(--ft-cat); }
}

.ft-short {
  max-width: 42rem;
  margin: 0 auto 2rem;
  border: 2px solid var(--ft-cat);
  padding: 1.1rem 1.3rem 1.2rem;
  background: var(--ft-wash);

  & h2 {
    margin: 0 0 0.5rem;
    font-size: 0.8rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ft-cat);
  }

  & ul { margin: 0; padding-left: 1.15rem; }
  & li { margin: 0.35rem 0; }
}

.ft-body {
  max-width: 42rem;
  margin: 0 auto;

  & h2 {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 2.2rem 0 0.8rem;
    color: var(--ft-ink);
  }

  & p { margin: 0 0 1.1rem; }

  & a { color: var(--ft-cat); text-decoration-thickness: 1.5px; text-underline-offset: 2px; font-weight: 600; }
  & a:hover, & a:focus { color: var(--ft-ink); }

  & ul, & ol { margin: 0 0 1.1rem; padding-left: 1.3rem; }
  & li { margin: 0.3rem 0; }
}

.ft-pull {
  margin: 2rem 0;
  padding: 0.3rem 0 0.3rem 1.2rem;
  border-left: 6px solid var(--ft-cat);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--ft-ink);

  & p { margin: 0; }
}

.ft-further {
  margin: 2.4rem 0 0;
  padding: 1.1rem 1.3rem;
  background: var(--ft-wash);
  border-left: 6px solid var(--ft-cat);

  & h2 { margin: 0 0 0.4rem; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; }
  & p { margin: 0; font-size: 0.95rem; }
}

/* Read next */
.ft-readnext {
  max-width: 72rem;
  margin: 3rem auto 0;
  border-top: 3px solid var(--ft-ink);
  padding-top: 1.2rem;

  & > h2 {
    margin: 0 0 1.1rem;
    font-size: 1rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
  }
}

.ft-readnext__grid {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: 1fr;
}

@media (min-width: 42rem) {
  .ft-readnext__grid { grid-template-columns: repeat(3, 1fr); }
}

/* Newsletter */
.ft-news {
  max-width: 72rem;
  margin: 3rem auto 0;
  background: var(--ft-ink);
  color: #fff;
  padding: 2rem 1.6rem;

  & h2 {
    margin: 0 0 0.4rem;
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.02em;
  }

  & > p { margin: 0 0 1.1rem; color: #c5c5cf; max-width: 40rem; }
}

.ft-news__form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  max-width: 30rem;

  & input {
    flex: 1 1 14rem;
    padding: 0.7rem 0.9rem;
    font-size: 1rem;
    border: 1px solid #3a3a44;
    background: #232329;
    color: #9a9aa6;
    font-family: inherit;
  }

  & button {
    padding: 0.7rem 1.3rem;
    font-size: 1rem;
    font-weight: 800;
    border: 0;
    background: var(--ft-accent);
    color: #fff;
    font-family: inherit;
    opacity: 0.55;
    cursor: not-allowed;
  }
}

.ft-news__note {
  margin: 0.7rem 0 0;
  font-size: 0.85rem;
  color: #9a9aa6;
}

.ft-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Prose pages (about, privacy) */
.ft-prose {
  max-width: 44rem;
  margin: 0 auto;

  & h1 {
    font-size: clamp(2rem, 5.5vw, 2.8rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin: 0.3rem 0 1rem;
    color: var(--ft-ink);
  }

  & h2 {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 2rem 0 0.7rem;
    color: var(--ft-ink);
  }

  & a { color: var(--ft-accent); font-weight: 600; }
  & a:hover, & a:focus { color: var(--ft-ink); }
}

.ft-persona {
  border: 1px solid var(--ft-rule);
  border-left: 6px solid var(--ft-accent);
  padding: 1.1rem 1.3rem;
  margin: 1.2rem 0;

  & h3 { margin: 0 0 0.4rem; font-size: 1.15rem; font-weight: 800; }
  & p { margin: 0; }
}

.ft-persona--priya { border-left-color: #0d9488; }

/* 404 */
.ft-lost {
  max-width: 44rem;
  margin: 0 auto;
  text-align: left;
  padding: 3rem 0;

  & h1 {
    font-size: clamp(3rem, 12vw, 6rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1;
    margin: 0 0 0.6rem;
    color: var(--ft-accent);
  }
}

/* Footer */
.ft-footer {
  background: var(--ft-ink);
  color: #b7b7c2;
  margin-top: 3.5rem;
  padding: 2.2rem 1.25rem;
  font-size: 0.9rem;
}

.ft-footer__inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem 2.5rem;
  justify-content: space-between;

  & p { margin: 0; }
  & a { color: #e8e8ee; text-decoration: none; font-weight: 600; }
  & a:hover, & a:focus { color: #fff; text-decoration: underline; }
}

.ft-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
