/* Homepage "01 / The problem": balanced heading row + Instagram-tile boxes (brand kit).
   Default = light section. html[data-theme="inverted"] = flipped by the moon/sun switch.
   Written by hand for both states, so the colour generator skips this file. Fonts and text unchanged. */

/* ---------- balanced heading: two equal halves ---------- */
.connected-home .home-problem .connected-heading {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px); align-items: end;
}
.connected-home .home-problem .connected-heading h2 {
  font-size: clamp(2rem, 3.1vw, 3.3rem); line-height: 1.06; letter-spacing: -.045em; text-wrap: balance;
}
.connected-home .home-problem .connected-heading > p {
  position: relative; max-width: 46ch; margin: 0; padding-top: 22px;
  font-size: clamp(1rem, 1.15vw, 1.08rem); line-height: 1.85;
}
.connected-home .home-problem .connected-heading > p::before {
  content: ""; position: absolute; top: 0; left: 0; width: 44px; height: 2px;
  background: linear-gradient(90deg, #c9a3bd, #6b8a9a);
}

@media (max-width: 1000px) { .connected-home .home-problem .connected-heading { grid-template-columns: 1fr; gap: 22px; } }
@media (max-width: 620px) { .connected-home .home-problem .connected-heading h2 { font-size: clamp(2rem, 8.6vw, 2.6rem); } }
/* section background: light by default, dark when flipped */
.connected-home .home-problem { background: #f4eee6; }
html[data-theme="inverted"] .connected-home .home-problem { background: #121014; }
html[data-theme="inverted"] .connected-home .home-problem .connected-heading h2 { color: #efe7ec; }
html[data-theme="inverted"] .connected-home .home-problem .connected-heading h2 em { color: #d6bccd; }
html[data-theme="inverted"] .connected-home .home-problem .connected-heading > p { color: #cfc4cb; }

.connected-home .home-problem [class*="pc-"] { box-sizing: border-box; }
.connected-home .home-problem .home-card-grid article.pc-card.pc-card {
  --a: 201, 163, 189; position: relative; isolation: isolate; min-width: 0; min-height: 0;
  margin: 0; border: 0; border-radius: 0; background: none; box-shadow: none; padding: 0;
}
.connected-home .home-problem .home-card-grid article.pc-card.pc-card:nth-child(even) { --a: 159, 188, 203; }
html:not([data-theme="inverted"]) .connected-home .home-problem .home-card-grid article.pc-card.pc-card { --a: 96, 67, 91; }
html:not([data-theme="inverted"]) .connected-home .home-problem .home-card-grid article.pc-card.pc-card:nth-child(even) { --a: 78, 110, 125; }
.connected-home .home-problem .pc-icon { display: grid; place-items: center; color: rgb(var(--a)); }
.connected-home .home-problem .pc-icon svg, .connected-home .home-problem .pc-arrow svg {
  width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.connected-home .home-problem .pc-num { font: 500 .62rem var(--mono); letter-spacing: .24em; color: rgba(var(--a), .85); }
.connected-home .home-problem .pc-deco, .connected-home .home-problem .pc-node, .connected-home .home-problem .pc-arrow { display: none; }
.connected-home .home-problem .home-card-grid article.pc-card.pc-card h3 { margin: 0; }
.connected-home .home-problem .home-card-grid article.pc-card.pc-card p { margin: 0; font-size: .93rem; line-height: 1.7; }
html[data-theme="inverted"] .connected-home .home-problem .home-card-grid article.pc-card.pc-card { color: #f1e9ee; }
html[data-theme="inverted"] .connected-home .home-problem .home-card-grid article.pc-card.pc-card p { color: #bcb0b8; }
html:not([data-theme="inverted"]) .connected-home .home-problem .home-card-grid article.pc-card.pc-card { color: #211d1b; }
html:not([data-theme="inverted"]) .connected-home .home-problem .home-card-grid article.pc-card.pc-card p { color: #5b5156; }

/* =====================================================================
   2 · INSTAGRAM TILES — bold uppercase titles, glow arcs, dot grids, angled shapes
   ===================================================================== */
.connected-home .home-problem .home-card-grid { gap: clamp(12px, 1.2vw, 18px); }
.connected-home .home-problem .home-card-grid article.pc-card.pc-card {
  aspect-ratio: 4 / 5; overflow: hidden; display: flex; flex-direction: column; border-radius: 6px;
  padding: clamp(20px, 2vw, 28px); border: 1px solid; transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s;
}
.connected-home .home-problem .pc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: auto; }
.connected-home .home-problem .pc-icon { width: 38px; height: 38px; border-radius: 8px; border: 1px solid rgba(var(--a), .45); }
.connected-home .home-problem .pc-icon svg { width: 18px; height: 18px; }
.connected-home .home-problem .home-card-grid article.pc-card.pc-card h3 {
  margin-top: 18px; font-size: clamp(1.15rem, 1.55vw, 1.55rem); line-height: 1.08; letter-spacing: .01em; text-transform: uppercase;
}
.connected-home .home-problem .home-card-grid article.pc-card.pc-card h3::after { content: ""; display: block; width: 30px; height: 2px; margin-top: 16px; background: rgb(var(--a)); }
.connected-home .home-problem .home-card-grid article.pc-card.pc-card p { margin-top: 14px; padding-right: 36px; font-size: .86rem; line-height: 1.6; }
.connected-home .home-problem .pc-arrow {
  display: grid; place-items: center; position: absolute; right: clamp(18px, 2vw, 24px); bottom: clamp(18px, 2vw, 24px);
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid currentColor; opacity: .75; transition: transform .35s;
}
.connected-home .home-problem .pc-arrow svg { width: 15px; height: 15px; }
.connected-home .home-problem .pc-deco { display: block; position: absolute; inset: 0; z-index: -1; pointer-events: none; }
/* tile 1: glowing planet arc */
.connected-home .home-problem article.pc-card.pc-card:nth-child(1) .pc-deco {
  background: radial-gradient(circle at 115% 112%, transparent 47%, rgba(201, 163, 189, .85) 48%, rgba(201, 163, 189, .18) 51%, transparent 60%),
              radial-gradient(circle at 115% 112%, rgba(96, 67, 91, .35), transparent 55%);
}
/* tile 2: dot grid + slate glow */
.connected-home .home-problem article.pc-card.pc-card:nth-child(2) .pc-deco {
  background: radial-gradient(rgba(159, 188, 203, .6) 1.1px, transparent 1.7px) 0 0 / 13px 13px,
              radial-gradient(70% 50% at 100% 0%, rgba(107, 138, 154, .35), transparent 70%);
  -webkit-mask: radial-gradient(45% 30% at 82% 40%, #000 35%, transparent 100%); mask: radial-gradient(45% 30% at 82% 40%, #000 35%, transparent 100%);
}
/* tile 3: angled stripes */
.connected-home .home-problem article.pc-card.pc-card:nth-child(3) .pc-deco {
  background: linear-gradient(118deg, transparent 58%, rgba(201, 163, 189, .38) 58% 65%, transparent 65% 69%, rgba(107, 138, 154, .38) 69% 76%, transparent 76%);
}
/* tile 4: logo-derived corner frame + glow */
.connected-home .home-problem article.pc-card.pc-card:nth-child(4) .pc-deco {
  background: linear-gradient(rgb(159, 188, 203), rgb(159, 188, 203)) right 22px top 70px / 46px 2px no-repeat,
              linear-gradient(rgb(159, 188, 203), rgb(159, 188, 203)) right 22px top 70px / 2px 46px no-repeat,
              radial-gradient(60% 45% at 85% 25%, rgba(107, 138, 154, .32), transparent 70%);
}
.connected-home .home-problem .home-card-grid article.pc-card.pc-card:hover { transform: translateY(-6px); }
.connected-home .home-problem .home-card-grid article.pc-card.pc-card:hover .pc-arrow { transform: rotate(45deg); opacity: 1; }
html[data-theme="inverted"] .connected-home .home-problem .home-card-grid article.pc-card.pc-card {
  border-color: rgba(255, 255, 255, .08); background: linear-gradient(165deg, #1b171d, #0d0c10 70%); box-shadow: 0 20px 44px -26px #000;
}
html[data-theme="inverted"] .connected-home .home-problem .home-card-grid article.pc-card.pc-card:hover { box-shadow: 0 0 0 1px rgba(var(--a), .4), 0 24px 50px -22px rgba(var(--a), .4); }
/* light mode mixes dark and frosted tiles, like the light Instagram feed */
html:not([data-theme="inverted"]) .connected-home .home-problem .home-card-grid article.pc-card.pc-card {
  border-color: rgba(96, 67, 91, .14); background: linear-gradient(165deg, #ffffff, #f1ebef); box-shadow: 0 18px 40px -28px rgba(96, 67, 91, .55);
}
html:not([data-theme="inverted"]) .connected-home .home-problem .home-card-grid article.pc-card.pc-card:is(:nth-child(1), :nth-child(4)) {
  --a: 201, 163, 189; border-color: transparent; background: linear-gradient(165deg, #2a2129, #121014 70%); color: #f4eee6;
}
html:not([data-theme="inverted"]) .connected-home .home-problem .home-card-grid article.pc-card.pc-card:nth-child(4) { --a: 159, 188, 203; }
html:not([data-theme="inverted"]) .connected-home .home-problem .home-card-grid article.pc-card.pc-card:is(:nth-child(1), :nth-child(4)) p { color: #c9bec5; }
html:not([data-theme="inverted"]) .connected-home .home-problem article.pc-card.pc-card:nth-child(3) .pc-deco {
  background: linear-gradient(118deg, transparent 58%, rgba(96, 67, 91, .28) 58% 65%, transparent 65% 69%, rgba(78, 110, 125, .28) 69% 76%, transparent 76%);
}
html:not([data-theme="inverted"]) .connected-home .home-problem article.pc-card.pc-card:nth-child(2) .pc-deco {
  background: radial-gradient(rgba(78, 110, 125, .55) 1.1px, transparent 1.7px) 0 0 / 13px 13px, radial-gradient(70% 50% at 100% 0%, rgba(107, 138, 154, .22), transparent 70%);
}

@media (max-width: 1000px) {
  .connected-home .home-problem .home-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .connected-home .home-problem .home-card-grid { grid-template-columns: 1fr; }
  .connected-home .home-problem .home-card-grid article.pc-card.pc-card { aspect-ratio: auto; min-height: 300px !important; } /* beats an older min-height: 0 !important */
}
@media (prefers-reduced-motion: reduce) {
  .connected-home .home-problem .home-card-grid article.pc-card.pc-card, .connected-home .home-problem .pc-arrow { transition: none; }
}
