/* ==========================================================================
   TrendHypes — Landing Page
   Built from Visual Direction Specification v1.0 + Content Blueprint v3.1
   Concept: "The Classified Document" with editorial warmth
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOKENS
   -------------------------------------------------------------------------- */

:root {
  /* Light surfaces */
  --charcoal: #48493E;
  --charcoal-deep: #33342C;
  --amber: #FAAE1C;
  --paper: #FAF8F3;
  --paper-alt: #F4F1E9;
  --ink-muted: #6E6F62;
  --ink-faint: #9A9B8F;
  --rule: #DDD9CE;

  /* Dark surfaces */
  --dark-text: #F2EFE7;
  --dark-text-muted: #B4B5A8;
  --dark-rule: #54554A;

  /* Type */
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Layout */
  --container: 1080px;
  --gutter: 64px;
  --reading: 34em;

  /* Spacing */
  --space-section: 152px;
  --space-method: 184px;
  --space-heading-body: 32px;
  --space-subsection: 72px;

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   2. RESET & BASE
   -------------------------------------------------------------------------- */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  margin: 0 0 0.5em;
  font-weight: 400;
}

p { margin: 0 0 1.4em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

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

a { color: inherit; }

em { font-family: var(--font-display); font-style: italic; }

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

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

/* --------------------------------------------------------------------------
   3. ACCESSIBILITY
   -------------------------------------------------------------------------- */

.skip-link {
  position: absolute;
  inset-block-start: -100px;
  inset-inline-start: 16px;
  z-index: 100;
  padding: 12px 20px;
  background: var(--charcoal-deep);
  color: var(--dark-text);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: inset-block-start 180ms var(--ease);
}

.skip-link:focus { inset-block-start: 16px; }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   4. HEADER
   -------------------------------------------------------------------------- */

.site-header {
  border-block-end: 1px solid var(--rule);
  background: var(--paper);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
}

.logo { display: block; line-height: 0; }
.logo img { width: 148px; height: auto; }

.header-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-muted);
  text-decoration: none;
  padding: 12px 4px;
  border-block-end: 1px solid transparent;
  transition: color 180ms var(--ease), border-color 180ms var(--ease);
}

.header-link:hover {
  color: var(--charcoal);
  border-block-end-color: var(--amber);
}

/* --------------------------------------------------------------------------
   5. SECTION SHELL
   -------------------------------------------------------------------------- */

.section {
  padding-block: var(--space-section);
}

.section--alt { background: var(--paper-alt); }

.section--dark {
  background: var(--charcoal-deep);
  color: var(--dark-text);
}

.section--method { padding-block: var(--space-method); }

.section--contact {
  padding-block: var(--space-section) 104px;
}

/* Section label ------------------------------------------------------------ */

.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 24px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.section--dark .section-label { color: var(--dark-text-muted); }

.label-rule {
  flex: 0 0 auto;
  width: 24px;
  height: 1px;
  background: var(--amber);
}

/* Headings ----------------------------------------------------------------- */

.section-heading {
  max-width: 16em;
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.015em;
  margin-block-end: var(--space-heading-body);
}

.section--dark .section-heading { color: var(--dark-text); }

/* Reading block ------------------------------------------------------------ */

.reading { max-width: var(--reading); }

.section--dark .reading { color: var(--dark-text-muted); }

.lead {
  max-width: 30em;
  font-size: 21px;
  line-height: 1.6;
}

.section--dark .lead { color: var(--dark-text-muted); }

/* Text link ---------------------------------------------------------------- */

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  text-decoration: none;
  padding-block: 11px;
  border-block-end: 1px solid var(--rule);
  transition: border-color 180ms var(--ease);
}

.text-link--lg { font-size: 17px; }

.text-link:hover { border-block-end-color: var(--amber); }

.arrow {
  display: inline-block;
  transition: transform 200ms var(--ease);
}

.text-link:hover .arrow { transform: translateX(4px); }

.section--dark .text-link { border-block-end-color: var(--dark-rule); }
.section--dark .text-link:hover { border-block-end-color: var(--amber); }

/* --------------------------------------------------------------------------
   6. HERO
   -------------------------------------------------------------------------- */

.hero { padding-block: 128px 152px; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 55fr) minmax(0, 38fr);
  gap: 7%;
  align-items: center;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: 58px;
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0;
}

.hero-rule {
  width: 48px;
  height: 3px;
  background: var(--amber);
  margin-block: 32px 40px;
}

.hero-copy .lead { margin-block-end: 32px; }

.hero-independence {
  max-width: 26em;
  margin-block-end: 40px;
  padding-inline-start: 20px;
  border-inline-start: 2px solid var(--amber);
  font-size: 17px;
  color: var(--ink-muted);
}

.hero-visual img {
  width: 100%;
  height: auto;
  border-radius: 0;
}

/* --------------------------------------------------------------------------
   7. CAPABILITIES — stacked rows
   -------------------------------------------------------------------------- */

.rows { margin-block-start: 72px; }

.row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 0;
  padding-block: 56px;
  border-block-start: 1px solid var(--rule);
}

.row:last-child { border-block-end: 1px solid var(--rule); }

.row-num {
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
  padding-block-start: 8px;
}

.row-body { max-width: var(--reading); }

.row-title {
  font-family: var(--font-body);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.35;
  margin-block-end: 12px;
}

.row-desc { margin-block-end: 28px; }

.micro-label {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.bordered-list {
  margin-block-end: 28px;
  padding-inline-start: 16px;
  border-inline-start: 1px solid var(--rule);
}

.bordered-list li {
  font-size: 16px;
  line-height: 1.65;
  margin-block-end: 14px;
}

.bordered-list li:last-child { margin-block-end: 0; }

.row-output {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-muted);
  margin: 0;
}

/* --------------------------------------------------------------------------
   8. METHODOLOGY
   -------------------------------------------------------------------------- */

.steps { margin-block-start: 88px; }

.step {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  margin-block-end: var(--space-subsection);
}

.step:last-child { margin-block-end: 0; }

.step-num {
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.08em;
  color: var(--amber);
  font-variant-numeric: tabular-nums;
  padding-block-start: 10px;
}

.step-body {
  max-width: var(--reading);
  padding-inline-start: 32px;
  border-inline-start: 1px solid var(--dark-rule);
}

.step-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--dark-text);
  margin-block-end: 16px;
}

.step-body p { color: var(--dark-text-muted); }

/* Classification block — the signature component ---------------------------- */

.tiers {
  max-width: 30em;
  margin-block: 32px 40px;
  padding: 40px;
  border: 1px solid var(--dark-rule);
  border-radius: 0;
}

.tier {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: start;
  padding-block: 24px;
}

.tier:first-child { padding-block-start: 0; }
.tier:last-child { padding-block-end: 0; }

.tier--1 { border-block-end: 1px solid var(--dark-rule); }
.tier--2 { border-block-end: 1px dashed var(--dark-rule); }
.tier--3 { border-block-end: 1px dashed var(--dark-rule); opacity: 0.92; }
.tier--4 { opacity: 0.84; }

.tier--2 { border-block-end-width: 1px; }

.tier-mark {
  display: block;
  padding-block-start: 9px;
}

.tier-text { display: block; }

.tier-name {
  display: block;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--dark-text);
}

.tier-desc {
  display: block;
  font-size: 15px;
  line-height: 1.6;
  color: var(--dark-text-muted);
  margin-block-start: 4px;
}

.method-statement {
  max-width: 28em;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 21px;
  line-height: 1.5;
  color: var(--dark-text);
  margin: 0;
}

/* Closing statement -------------------------------------------------------- */

.method-close { margin-block-start: 96px; }

.close-rule {
  width: 48px;
  height: 1px;
  background: var(--amber);
  margin-block-end: 32px;
}

.method-closing {
  max-width: 20em;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--dark-text);
  margin: 0;
}

/* --------------------------------------------------------------------------
   9. INDEPENDENCE
   -------------------------------------------------------------------------- */

.independence {
  max-width: var(--reading);
  margin-block: 48px;
  padding-inline-start: 24px;
  border-inline-start: 1px solid var(--rule);
}

.independence li { margin-block-end: 32px; }
.independence li:last-child { margin-block-end: 0; }

.ind-term {
  display: block;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--charcoal);
}

.ind-desc {
  display: block;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-muted);
  margin-block-start: 8px;
}

/* --------------------------------------------------------------------------
   10. FOCUS AREAS
   -------------------------------------------------------------------------- */

.applies {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px 48px;
  margin-block-start: 56px;
}

.applies li {
  padding-block-start: 24px;
  border-block-start: 1px solid var(--rule);
}

.applies-term {
  display: block;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--charcoal);
}

.applies-desc {
  display: block;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-muted);
  margin-block-start: 6px;
}

.scope {
  max-width: 32em;
  margin-block-start: 64px;
  padding-block-start: 32px;
  border-block-start: 1px solid var(--rule);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-muted);
}

/* --------------------------------------------------------------------------
   11. ABOUT
   -------------------------------------------------------------------------- */

.name-inline {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   12. CONTACT
   -------------------------------------------------------------------------- */

.contact-rule {
  height: 1px;
  background: var(--dark-rule);
  margin-block: 48px;
}

.contact-name {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--dark-text);
  margin: 0;
}

.contact-role {
  font-size: 16px;
  color: var(--dark-text-muted);
  margin: 4px 0 24px;
}

.contact-email {
  font-size: 19px;
  color: var(--dark-text);
}

/* --------------------------------------------------------------------------
   13. FOOTER
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--charcoal-deep);
  border-block-start: 1px solid var(--dark-rule);
  padding-block: 56px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.footer-mark { width: 32px; height: 32px; }

.footer-meta { text-align: end; }

.footer-email {
  display: inline-block;
  font-size: 13px;
  color: var(--dark-text-muted);
  text-decoration: none;
  border-block-end: 1px solid transparent;
  padding-block: 4px;
  transition: color 180ms var(--ease), border-color 180ms var(--ease);
}

.footer-email:hover {
  color: var(--dark-text);
  border-block-end-color: var(--amber);
}

.footer-copy {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--dark-text-muted);
}

/* --------------------------------------------------------------------------
   14. MOTION
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(12px);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 400ms var(--ease), transform 400ms var(--ease);
}

.tiers.is-visible .tier {
  animation: tier-in 400ms var(--ease) both;
}

.tiers.is-visible .tier:nth-child(1) { animation-delay: 0ms; }
.tiers.is-visible .tier:nth-child(2) { animation-delay: 60ms; }
.tiers.is-visible .tier:nth-child(3) { animation-delay: 120ms; }
.tiers.is-visible .tier:nth-child(4) { animation-delay: 180ms; }

@keyframes tier-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* Preserve the descending-certainty opacity after stagger animation */
.tiers.is-visible .tier--3 { opacity: 0.92; }
.tiers.is-visible .tier--4 { opacity: 0.84; }

/* --------------------------------------------------------------------------
   15. RESPONSIVE
   -------------------------------------------------------------------------- */

/* Laptop ------------------------------------------------------------------- */
@media (max-width: 1119px) {
  .container { max-width: 100%; }
}

/* Hero collapse ------------------------------------------------------------ */
@media (max-width: 899px) {
  :root {
    --gutter: 40px;
    --space-section: 112px;
    --space-method: 128px;
  }

  .hero { padding-block: 96px 112px; }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 64px;
  }

  .hero-headline { font-size: 46px; }

  .hero-visual { max-width: 460px; }

  .applies { gap: 32px; }
}

/* Mobile ------------------------------------------------------------------- */
@media (max-width: 767px) {
  :root {
    --gutter: 24px;
    --space-section: 88px;
    --space-method: 104px;
    --space-heading-body: 24px;
    --space-subsection: 48px;
  }

  body { font-size: 16px; line-height: 1.65; }

  .header-inner { min-height: 64px; }
  .logo img { width: 122px; }

  /* Type scale */
  .hero-headline { font-size: 34px; line-height: 1.15; }
  .section-heading { font-size: 27px; line-height: 1.22; }
  .step-title { font-size: 21px; }
  .tier-name { font-size: 17px; }
  .tier-desc { font-size: 14px; line-height: 1.55; }
  .lead { font-size: 18px; }
  .section-label { font-size: 10px; }
  .ind-term { font-size: 19px; }
  .method-statement { font-size: 18px; }
  .method-closing { font-size: 22px; }
  .contact-email { font-size: 18px; }

  .hero { padding-block: 72px 88px; }
  .hero-grid { gap: 56px; }
  .hero-visual { max-width: none; }
  .hero-rule { margin-block: 24px 32px; }

  /* Capability rows — number inline above title */
  .row {
    grid-template-columns: minmax(0, 1fr);
    padding-block: 40px;
  }
  .row-num {
    padding-block: 0 12px;
    display: block;
  }
  .rows { margin-block-start: 48px; }

  /* Methodology steps — number inline above title */
  .step { grid-template-columns: minmax(0, 1fr); }
  .step-num {
    padding-block: 0 12px;
    display: block;
  }
  .step-body { padding-inline-start: 16px; }
  .steps { margin-block-start: 56px; }

  /* Classification block */
  .tiers {
    padding: 24px;
    margin-block: 28px 32px;
  }
  .tier { padding-block: 20px; }

  .method-close { margin-block-start: 64px; }

  /* Independence */
  .independence {
    margin-block: 40px;
    padding-inline-start: 16px;
  }
  .independence li { margin-block-end: 24px; }

  /* Focus areas */
  .applies {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    margin-block-start: 48px;
  }

  .scope { margin-block-start: 48px; }

  .contact-rule { margin-block: 40px; }
  .section--contact { padding-block: 88px 64px; }

  /* Footer stacks */
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .footer-meta { text-align: start; }

  .site-footer { padding-block: 48px; }
}

/* --------------------------------------------------------------------------
   16. REDUCED MOTION
   -------------------------------------------------------------------------- */

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

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal { opacity: 1; transform: none; }
  .tiers.is-visible .tier { animation: none; }
}

/* --------------------------------------------------------------------------
   17. PRINT
   -------------------------------------------------------------------------- */

@media print {
  .site-header, .skip-link { display: none; }
  .section--dark, .site-footer {
    background: #fff !important;
    color: #000 !important;
  }
  .section--dark .section-heading,
  .step-title, .tier-name, .method-closing,
  .contact-name, .contact-email { color: #000 !important; }
  .reveal { opacity: 1; transform: none; }
}
