/* Third Page — feature grid.
   Sizes in vw against the 1536x1024 reference (1px = 0.0651vw). */

.third {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 0 2.8vw;
  background: radial-gradient(120% 90% at 50% 40%, #0d0b09 0%, #070605 60%, #040303 100%);
  font-family: var(--font-ui);
}

/* Four columns, three rows. Two cards span two columns and keep a visual;
   the other eight are single. 2x2 + 8x1 fills all twelve cells exactly, so
   the bento has no gaps to fake. Wider columns than the old five-across,
   which gives the copy a comfortable measure instead of four-word lines. */
.grid10 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 1.17vw;
  width: 100%;
  height: 79.4%;
}

.fcard--wide {
  grid-column: span 2;
}

.fcard {
  display: flex;
  flex-direction: column;
  padding: 1.43vw;
  border: 1px solid rgba(201, 160, 99, 0.16);
  border-radius: 1.17vw;
  background: linear-gradient(158deg, rgba(28, 23, 18, 0.55) 0%, rgba(11, 9, 7, 0.8) 62%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
  min-width: 0;
  overflow: hidden;
}

.fcard__tile {
  display: grid;
  place-items: center;
  width: 2.73vw;
  height: 2.73vw;
  min-width: 32px;
  min-height: 32px;
  border: 1px solid rgba(201, 160, 99, 0.18);
  border-radius: 0.65vw;
  background: rgba(201, 160, 99, 0.05);
  color: var(--gold);
  flex-shrink: 0;
}

.fcard__tile .icon {
  width: 1.24vw;
  min-width: 15px;
}

/* Allowed to wrap. `nowrap` held these on one line at this width, which is
   fine for "Smart Edit" and one bad word away from overflowing. */
.fcard__title {
  margin: 0.98vw 0 0;
  font-family: var(--font-display);
  font-size: 1.5vw;
  font-weight: 400;
  line-height: 1.2;
  color: var(--cream);
}

.fcard__desc {
  margin: 0.6vw 0 0;
  font-size: 0.94vw;
  font-weight: 300;
  line-height: 1.66;
  color: rgba(255, 255, 255, 0.58);
  min-width: 0;
  /* Roughly 40 characters. Beyond that the eye loses the line return, and
     these columns are wide enough now to run long. */
  max-width: 34ch;
}

.fcard__go {
  position: relative;
  display: grid;
  place-items: center;
  /* Pushed to the foot of the card, so short copy leaves deliberate space
     above the action rather than an unexplained gap below it. */
  margin-top: auto;
  width: 2.34vw;
  height: 2.34vw;
  min-width: 28px;
  min-height: 28px;
  flex-shrink: 0;
  border: 1px solid rgba(201, 160, 99, 0.3);
  border-radius: 50%;
  color: var(--gold);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 200ms var(--ease), border-color 200ms var(--ease),
    color 200ms var(--ease);
}

/* The visible circle stays small — at five columns a 44px disc would be a
   quarter of the card. The hit area is extended invisibly instead, so the
   target meets the 44px minimum without the design paying for it. */
.fcard__go::after {
  content: '';
  position: absolute;
  inset: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
}

.fcard__go:hover {
  background: rgba(201, 160, 99, 0.1);
  border-color: rgba(201, 160, 99, 0.55);
  color: var(--gold-bright);
}

.fcard__go:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}

.fcard__go .icon {
  width: 1.02vw;
  min-width: 12px;
}

@media (prefers-reduced-motion: reduce) {
  .fcard__go {
    transition: none;
  }
}

/* Claims the leftover height rather than being pushed down by auto
   margin — otherwise it has no height of its own and every child that
   flexes to fill it collapses to zero. */
.fcard__media {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.46vw;
  flex: 1;
  padding-top: 1.04vw;
  min-height: 0;
}

/* ---- Shared visual pieces ------------------------------------------ */
/* Photographic areas are neutral fills, toned differently so cards read
   as distinct. Replace with real stills. */

.shot {
  display: block;
  border-radius: 0.46vw;
  overflow: hidden;
  background: linear-gradient(158deg, #2b2a26 0%, #14130f 100%);
}

.shot--land {
  position: relative;
  background: linear-gradient(180deg, #4a5560 0%, #566149 55%, #3f4a34 100%);
}

.shot__plot {
  position: absolute;
  left: 16%;
  right: 16%;
  bottom: 16%;
  height: 42%;
  border: 2px dashed rgba(255, 255, 255, 0.85);
  border-radius: 2px;
  transform: perspective(60px) rotateX(22deg);
}

.shot--interior {
  background: linear-gradient(158deg, #6b5a44 0%, #3a2f24 60%, #1d1813 100%);
}

.shot--a { background: linear-gradient(158deg, #3d3730 0%, #191510 100%); }
.shot--b { background: linear-gradient(158deg, #2f3a44 0%, #15191d 100%); }
.shot--c { background: linear-gradient(158deg, #423428 0%, #1a1410 100%); }

.wave {
  display: block;
  background: repeating-linear-gradient(
    to right,
    rgba(217, 176, 113, 0.75) 0 2px,
    transparent 2px 6px
  );
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
}

.wave--wide { height: 1.56vw; }
.wave--thin { height: 0.85vw; flex: 1; }

/* Single-media cards fill the whole area */
.fcard__media > .shot {
  flex: 1;
  min-height: 0;
}

/* ---- Clips row ------------------------------------------------------ */

.clips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.36vw;
  flex: 1;
  min-height: 0;
}

.clips .shot {
  height: 100%;
}

/* ---- Presenter ------------------------------------------------------ */

.presenter {
  position: relative;
  display: block;
  flex: 1;
  min-height: 0;
}

.wave--behind {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 3.5vw;
  transform: translateY(-50%);
  -webkit-mask-image: radial-gradient(38% 100% at 50% 50%, transparent 0 62%, #000 78%),
    linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: radial-gradient(38% 100% at 50% 50%, transparent 0 62%, #000 78%),
    linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
  mask-composite: intersect;
}

.presenter__figure {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 46%;
  height: 92%;
  border-radius: 40% 40% 0 0;
  background: linear-gradient(180deg, #4a3d2e 0%, #2a221a 55%, #17120e 100%);
}

/* ---- Insights ------------------------------------------------------- */

.insights {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.65vw;
  flex: 1;
  min-height: 0;
}

.bars {
  display: flex;
  align-items: flex-end;
  gap: 0.33vw;
  height: 100%;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0 0.2vw 0.2vw 0.33vw;
}

.bars i {
  flex: 1;
  border-radius: 1px;
  background: linear-gradient(180deg, #e0bd82 0%, #8d6f45 100%);
}

.donut {
  position: relative;
  display: grid;
  place-items: center;
  width: 5.2vw;
  min-width: 54px;
  text-align: center;
}

.donut__ring {
  width: 100%;
  display: block;
}

.donut__num {
  position: absolute;
  top: 30%;
  font-size: 1.043vw;
  font-weight: 500;
  color: var(--cream);
}

.donut__cap {
  font-size: 0.65vw;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 0.2vw;
}

/* ---- URL bar -------------------------------------------------------- */

.urlbar {
  display: flex;
  align-items: center;
  gap: 0.65vw;
  padding: 0.85vw 0.91vw;
  border: 1px solid rgba(201, 160, 99, 0.18);
  border-radius: 0.65vw;
  background: rgba(255, 255, 255, 0.028);
  color: var(--gold);
}

.urlbar .icon {
  width: 1.17vw;
  min-width: 13px;
  flex-shrink: 0;
}

.urlbar__text {
  flex: 1;
  min-width: 0;
  font-size: 0.847vw;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.66);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- Canvas --------------------------------------------------------- */

.canvas {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.46vw;
  flex: 1;
  min-height: 0;
}

.canvas .shot {
  height: 100%;
}

.canvas__plus {
  display: grid;
  place-items: center;
  width: 1.82vw;
  height: 1.82vw;
  min-width: 20px;
  min-height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #14100c;
  font-size: 1.043vw;
  font-weight: 500;
  line-height: 1;
}

/* ---- Platform logos -------------------------------------------------- */
/* Simplified stand-ins for the real brand marks. */

.logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.63vw;
  padding: 1.17vw 0;
  border-radius: 0.65vw;
  background: rgba(255, 255, 255, 0.025);
  flex: 1;
  min-height: 0;
}

.logo {
  width: 2.6vw;
  height: 2.6vw;
  min-width: 28px;
  min-height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
}

.logo--meta { background: radial-gradient(circle at 35% 40%, #0f8bff, #0064e0); }
.logo--fb { background: #1877f2; }
.logo--ig {
  border-radius: 28%;
  background: radial-gradient(circle at 28% 88%, #fdd867 0%, #eb4e56 42%, #a02fbb 72%, #5b51d8 100%);
}

/* ---- Market trend ---------------------------------------------------- */

.trend {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0.85vw 0.91vw;
  border: 1px solid rgba(201, 160, 99, 0.16);
  border-radius: 0.65vw;
  background: rgba(255, 255, 255, 0.025);
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.trend__label {
  font-size: 0.847vw;
  font-weight: 400;
  color: var(--gold-bright);
}

.trend__stat {
  display: flex;
  align-items: center;
  gap: 0.2vw;
  margin-top: 0.26vw;
  font-size: 1.237vw;
  font-weight: 500;
  color: var(--white);
}

.trend__stat .icon {
  width: 1.04vw;
  min-width: 11px;
  color: var(--gold);
}

.trend__line {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 78%;
  height: 58%;
}

/* ---- Timeline track --------------------------------------------------- */

.track {
  display: flex;
  align-items: center;
  gap: 0.33vw;
  padding: 0.33vw 0.46vw;
  border-radius: 0.39vw;
  background: rgba(255, 255, 255, 0.03);
}

.track__handle {
  width: 0.39vw;
  min-width: 4px;
  height: 1.43vw;
  border-radius: 1px;
  background: var(--gold);
  flex-shrink: 0;
}

/* Card hover — the whole tile responds, not just the arrow. A 4px lift and
   a warmer border; no scale, which would nudge neighbours in a tight grid. */
.fcard {
  transition: transform 220ms var(--ease), border-color 220ms var(--ease),
    box-shadow 220ms var(--ease);
}

.fcard:hover {
  transform: translateY(-4px);
  border-color: rgba(201, 160, 99, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 14px 30px -18px rgba(0, 0, 0, 0.8);
}

.fcard:hover .fcard__go {
  background: rgba(201, 160, 99, 0.1);
  border-color: rgba(201, 160, 99, 0.5);
}

/* The wide cards carry the visual, so their media fills the space the
   compact cards give to breathing room. */
.fcard--wide .fcard__media {
  padding-top: 0.85vw;
}

@media (prefers-reduced-motion: reduce) {
  .fcard {
    transition: none;
  }
  .fcard:hover {
    transform: none;
  }
}

/* The action sits at the trailing edge, where the eye finishes the line. */
.fcard__go {
  align-self: flex-end;
}

/* On the wide cards the media already claims the leftover height with
   flex: 1, so the arrow's `margin-top: auto` was asking for that space a
   second time and pushing the chart 8px past the card. */
.fcard--wide .fcard__go {
  margin-top: 0.5vw;
}

/* The wide cards are 231px tall, which leaves the media well about 70px —
   the insights visual was drawn for the old half-card well and its donut
   alone had a 54px floor, so it spilled past the card. Scaled to the space
   it actually has, and clipped as a backstop. */
.fcard__media {
  overflow: hidden;
}

.fcard--wide .fcard__desc {
  /* A wider column takes the copy from three lines to two, which is where
     the room for the chart comes from. */
  max-width: 52ch;
}

.fcard--wide .donut {
  width: 3.4vw;
  min-width: 38px;
}

/* The percentage carries the point on its own at this size; the two-line
   caption below it does not survive the reduction legibly. */
.fcard--wide .donut__cap {
  display: none;
}

.fcard--wide .donut__num {
  font-size: 0.86vw;
}
