/* Components for the inner pages (About, Work, Work With Me, Thinking,
   Contact, case study and article templates) and the new home sections.
   Everything sits on the site's existing foundation: Poppins, black and deep
   charcoal surfaces, warm off white chapters, thin rules, large type.

   Five systems:
     A  monumental typography   .page-hero, .t-hero, .cta-band
     B  numbered rows           .rows / .row
     C  editorial visuals       .figure, .work-index, .story
     D  data and proof          .facts, .proof
     E  editorial lists         .list, .breadth (grid variant)

   Elements whose text is a placeholder for content still to come carry the
   class .ph (and, where useful, data-placeholder="what-goes-here"). */

/* ------------------------------------------------------------ surfaces */
.surface {
  --ink: var(--text-primary);
  --ink-muted: var(--text-secondary);
  --rule: var(--border-primary);
  --fill: var(--surface-secondary);
  --bg: var(--bg-secondary);
  --accent: #ff6a00;
  position: relative;
  z-index: 10;
  background-color: var(--bg);
  color: var(--ink);
  padding: clamp(80px, 10vw, 150px) 5%;
}

.surface--black {
  --bg: var(--bg-primary);
}

/* Formerly the inverse surface. Sections now follow the theme throughout:
   dark in dark mode, light in light mode, with only the primary / secondary
   background difference giving a quiet rhythm. */
.surface--light {
  --bg: var(--bg-primary);
}

.surface--tight {
  padding-top: clamp(48px, 6vw, 90px);
  padding-bottom: clamp(48px, 6vw, 90px);
}

.surface--flush-top { padding-top: 0; }

.surface__inner {
  max-width: 1300px;
  margin: 0 auto;
}

.surface__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px 32px;
  margin-bottom: clamp(28px, 4vw, 56px);
}

.surface__head .t-statement { max-width: 22ch; }

/* --------------------------------------------------------- typography */
.t-hero {
  font-size: clamp(3.4rem, 10vw, 9.5rem);
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin: 0;
  text-wrap: balance;
}

.t-statement {
  font-size: clamp(1.7rem, 3.4vw, 3.2rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}

.t-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0;
}

.t-body {
  font-size: 1.1rem;
  line-height: 1.65;
  font-weight: 400;
  margin: 0;
}

.t-body--lg { font-size: 1.3rem; line-height: 1.5; }
.t-body--muted { color: var(--ink-muted); }
.t-body p { margin: 0 0 1.2em; }
.t-body p:last-child { margin-bottom: 0; }

.t-number {
  font-size: clamp(3rem, 7vw, 7rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1;
  margin: 0;
}

.ph { color: var(--ink-muted); }
.ph-block {
  border: 1px dashed var(--rule);
  padding: 16px 20px;
  color: var(--ink-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.link-inline {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: border-color 0.3s;
}
.link-inline:hover { border-color: currentColor; }

/* ----------------------------------------------- A: page hero (monumental) */
.page-hero {
  padding-top: clamp(150px, 20vw, 240px);
  padding-bottom: clamp(48px, 6vw, 96px);
}

.page-hero__aside {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px 32px;
  margin-top: clamp(36px, 6vw, 80px);
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}

.page-hero__aside .t-body { max-width: 38ch; }

@media screen and (min-width: 992px) {
  .page-hero__aside { margin-left: 33%; }
}

/* ------------------------------------------------ A: cta band (transitions) */
.cta-band { border-top: 1px solid var(--rule); }

.cta-band__link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: clamp(24px, 4vw, 56px) 0;
  border-bottom: 1px solid var(--rule);
  color: inherit;
  text-decoration: none;
  font-size: clamp(2.2rem, 6.5vw, 6.5rem);
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 1;
}

.cta-band__link small {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 12px;
}

.cta-band__arrow {
  flex: none;
  width: 0.55em;
  height: 0.55em;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.cta-band__link:hover .cta-band__arrow { transform: rotate(45deg) translate(0.12em, -0.12em); }

/* Big single call to action (Work With Me end). */
.cta-solo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(28px, 4vw, 48px);
}

.button-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 20px 36px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}

.button-pill:hover { background: transparent; color: var(--ink); }

/* ------------------------------------------------------- B: numbered rows */
.rows { border-top: 1px solid var(--rule); }

.row {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 12px 20px;
  align-items: start;
  padding: clamp(28px, 3.5vw, 48px) 0;
  border-bottom: 1px solid var(--rule);
  color: inherit;
  text-decoration: none;
}

@media screen and (min-width: 768px) {
  .row { grid-template-columns: 5rem 1fr 1fr; gap: 24px 32px; }
}

@media screen and (min-width: 992px) {
  .row { grid-template-columns: 6rem 1.15fr 1fr; gap: 24px 48px; }
}

.row__number {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  padding-top: 0.55em;
  transition: color 0.3s;
}

.row__title {
  font-size: clamp(1.9rem, 4vw, 3.6rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0;
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.row__body {
  color: var(--ink-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 46ch;
  margin: 0;
}

@media screen and (max-width: 767px) {
  .row__body { grid-column: 2; }
}

a.row:hover .row__number { color: var(--accent); }
a.row:hover .row__title { transform: translateX(10px); }

.rows--large .row__title {
  font-size: clamp(2.4rem, 6.5vw, 6rem);
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

.rows--large .row { padding: clamp(36px, 5vw, 72px) 0; }

/* Sub-structure inside a row (Situation / Best fit / Outcome). */
.row__sub {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 8px;
}

@media screen and (min-width: 768px) {
  .row__sub { grid-column: 2 / -1; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 24px; }
}

.row__sub-item {
  border-top: 1px solid var(--rule);
  padding-top: 14px;
  display: grid;
  gap: 10px;
}

/* ------------------------------------------------------ C: editorial visuals */
.figure {
  position: relative;
  overflow: hidden;
  background: var(--fill);
  margin: 0;
}

.figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.figure--4x5 { aspect-ratio: 4 / 5; }
.figure--3x2 { aspect-ratio: 3 / 2; }
.figure--16x9 { aspect-ratio: 16 / 9; }
.figure--1x1 { aspect-ratio: 1; }
.figure--21x9 { aspect-ratio: 21 / 9; }

.figure__label {
  position: absolute;
  left: 16px;
  bottom: 12px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.figure__caption {
  display: block;
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

/* Personal story: statement beside a longer narrative column. */
.story {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

@media screen and (min-width: 992px) {
  .story { grid-template-columns: 5fr 6fr; gap: 8%; }
  .story__statement { position: sticky; top: 140px; }
}

.story__narrative { max-width: 60ch; }

/* Work index: 12 column editorial composition; each item declares its
   own span and offset, so filtered-out items simply leave the flow. */
.work-index {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(28px, 5vw, 72px) clamp(12px, 2vw, 28px);
  align-items: start;
}

.work-item {
  grid-column: 1 / -1;
  color: inherit;
  text-decoration: none;
  display: block;
}

.work-item.is-hidden { display: none; }

@media screen and (min-width: 768px) {
  .work-item--a { grid-column: 1 / span 7; }
  .work-item--b { grid-column: 9 / span 4; margin-top: 26%; }
  .work-item--c { grid-column: 2 / span 5; }
  .work-item--d { grid-column: 8 / span 5; margin-top: -12%; }
  .work-item--e { grid-column: 1 / span 5; margin-top: 8%; }
  .work-item--f { grid-column: 7 / span 6; }
}

.work-item__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}

.work-item__title {
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0;
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.work-item:hover .figure img { transform: scale(1.04); }
.work-item:hover .work-item__title { transform: translateX(8px); }

/* Featured article (Thinking). */
.feature {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  color: inherit;
  text-decoration: none;
}

@media screen and (min-width: 992px) {
  .feature { grid-template-columns: 7fr 5fr; gap: 6%; align-items: end; }
}

.feature__text { display: grid; gap: 20px; }
.feature:hover .figure img { transform: scale(1.03); }

/* Case study and article chapters: sticky label beside the reading column. */
.chapter {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding: clamp(40px, 5vw, 80px) 0;
  border-top: 1px solid var(--rule);
}

@media screen and (min-width: 992px) {
  .chapter { grid-template-columns: 1fr 2fr; gap: 48px; }
  .chapter__label { position: sticky; top: 120px; }
}

.chapter__label {
  display: flex;
  gap: 16px;
  align-self: start;
}

.chapter__body { max-width: 62ch; }
.chapter__body .t-statement { margin-bottom: 24px; }

.chapter__grid {
  display: grid;
  gap: clamp(16px, 2vw, 28px);
}

@media screen and (min-width: 768px) {
  .chapter__grid--2 { grid-template-columns: 1fr 1fr; }
}

/* Article: narrow reading column; wide visuals break out of it. */
.article { max-width: 720px; margin: 0 auto; }
.article__head { display: grid; gap: 20px; margin-bottom: clamp(32px, 5vw, 56px); }
.article__meta { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.article__body { font-size: 1.15rem; line-height: 1.75; }
.article__body p { margin: 0 0 1.4em; }
.article__wide {
  max-width: 1100px;
  margin: clamp(36px, 5vw, 72px) auto;
}

.pullquote {
  font-size: clamp(1.7rem, 3.2vw, 2.8rem);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.15;
  border-left: 2px solid var(--accent);
  padding-left: 24px;
  margin: clamp(36px, 5vw, 64px) 0;
}

/* ----------------------------------------------------- D: data and proof */
.facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--rule);
}

@media screen and (min-width: 768px) {
  .facts { grid-template-columns: repeat(4, 1fr); }
}

.fact {
  padding: 20px 24px 24px 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  gap: 10px;
  align-content: start;
}

.fact__value { font-size: 1.15rem; margin: 0; }

.proof {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media screen and (min-width: 768px) {
  .proof { grid-template-columns: repeat(3, 1fr); gap: 48px; }
}

.proof__item {
  display: grid;
  gap: 14px;
  border-top: 1px solid var(--rule);
  padding-top: 20px;
}

/* --------------------------------------------------------- E: editorial lists */
.list { border-top: 1px solid var(--rule); }

.list__row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
  color: inherit;
  text-decoration: none;
}

@media screen and (min-width: 768px) {
  .list__row { grid-template-columns: 10rem 1fr 8rem; align-items: baseline; }
  .list__date { text-align: right; }
}

.list__title {
  font-size: clamp(1.35rem, 2.6vw, 2.4rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.list--compact .list__title { font-size: clamp(1.15rem, 1.8vw, 1.6rem); }

a.list__row:hover .list__title { transform: translateX(12px); }

/* Small visual that appears beside a row on hover (pointer devices only). */
.list__thumb {
  position: absolute;
  right: 9rem;
  top: 50%;
  width: 150px;
  aspect-ratio: 4 / 3;
  background: var(--fill);
  opacity: 0;
  transform: translateY(-50%) scale(0.96);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}

@media (hover: hover) and (min-width: 992px) {
  a.list__row:hover .list__thumb { opacity: 1; transform: translateY(-50%) scale(1); }
}

@media screen and (max-width: 991px) {
  .list__thumb { display: none; }
}

/* Experience breadth grid (About): cells of different sizes on thin lines. */
.breadth {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}

@media screen and (min-width: 768px) {
  .breadth { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media screen and (min-width: 992px) {
  .breadth { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

.breadth__cell {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  min-height: 150px;
  padding: clamp(18px, 2.4vw, 32px);
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  transition: background-color 0.3s, color 0.3s;
}

.breadth__cell--2 { grid-column: span 2; }
@media screen and (min-width: 768px) {
  .breadth__cell--3 { grid-column: span 3; }
  .breadth__cell--tall { grid-row: span 2; }
}

.breadth__word {
  overflow-wrap: anywhere;
  font-size: clamp(1.4rem, 2.6vw, 2.6rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0;
}

.breadth__cell--xl .breadth__word {
  font-size: clamp(1.9rem, 4.4vw, 4.6rem);
  font-weight: 300;
  letter-spacing: -0.04em;
}

.breadth__cell--dim { justify-content: flex-start; min-height: 0; }

@media (hover: hover) {
  .breadth__cell:not(.breadth__cell--dim):hover {
    background-color: var(--ink);
    color: var(--bg);
  }
  .breadth__cell:hover .t-label { color: inherit; opacity: 0.7; }
}

/* ------------------------------------------------------------- filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  padding: 20px 0;
  margin-bottom: clamp(32px, 5vw, 72px);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.filter {
  position: relative;
  background: none;
  border: 0;
  padding: 8px 0;
  color: var(--ink-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.3s;
}

.filter::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.filter:hover,
.filter[aria-pressed="true"] { color: var(--ink); }
.filter[aria-pressed="true"]::after { transform: scaleX(1); }

/* ------------------------------------------------------------- contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

@media screen and (min-width: 992px) {
  .contact-grid { grid-template-columns: 1fr 1fr; gap: 8%; }
}

.contact-links { display: grid; align-content: start; }

.contact-link {
  display: grid;
  gap: 10px;
  padding: 22px 0;
  border-top: 1px solid var(--rule);
  color: inherit;
  text-decoration: none;
}

.contact-link:last-child { border-bottom: 1px solid var(--rule); }

.contact-link__value {
  font-size: clamp(1.4rem, 2.6vw, 2.2rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0;
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.contact-link:hover .contact-link__value { transform: translateX(8px); }

.form { display: grid; gap: 28px; }
.form__field { display: grid; gap: 8px; }

.form__input {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  color: var(--ink);
  font-family: inherit;
  font-size: 1.15rem;
  line-height: 1.4;
  padding: 12px 0;
  outline: none;
  transition: border-color 0.3s;
}

.form__input:focus { border-bottom-color: var(--ink); }
textarea.form__input { min-height: 140px; resize: vertical; }
.form__actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.form__status { min-height: 1.2em; }

/* --------------------------------------------- Dario CTA reused as invitation */
/* The copied "Design Vision" block is the home page's final moment and the
   Contact hero. Its CTA button links to /contact/; the tiny caption pair and
   the social list keep their places for later content. */
.dario-sections .cta-button { text-decoration: none; }
/* As a page hero (Contact) the block needs room under the fixed header. */
.dario-sections--hero .main-section.cta { padding-top: clamp(90px, 12vh, 150px); }
.dario-sections .cta-button .text-xs { text-transform: uppercase; letter-spacing: 0.08em; }

/* ------------------------------------------------------------- helpers */
.stack { display: grid; gap: clamp(28px, 4vw, 56px); }
.stack--tight { gap: 20px; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 32px; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 32px; }

@media screen and (min-width: 768px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

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

.t-hero--sm { font-size: clamp(2.4rem, 6vw, 5.5rem); }
.breadth { grid-auto-flow: dense; }
