/* Wick Pro — the chrome layer.
   Separate file on purpose: duo.css has base element resets whose specificity
   quietly beats bare classes (the .db background bug). Everything here is scoped
   under body.duo or doubled so it can't lose that fight again. */

/* ---------------------------------------------------------- the chrome wick */
/* Duolingo signals Super with a gradient owl. Wick signals Pro with a candle
   that catches the light: an iridescent sheen that drifts across it forever. */

@property --pro-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

/* Polished steel, not a rainbow. What reads as chrome to the eye is CONTRAST
   BANDING — tight alternation between near-white specular highlights and deep
   shadow, with hard-ish transitions. Hue barely matters; a faint cool tint is
   enough to say "metal" rather than "greyscale". The slow drift is the moving
   reflection, which is what makes it look polished rather than painted. */
:root {
  --chrome-hi:   #ffffff;   /* specular spike */
  --chrome-lite: #e7eff7;
  --chrome-mid:  #a8b8c8;
  --chrome-low:  #64727f;
  --chrome-deep: #333d48;   /* shadow band */
}

/* One band pattern, reused everywhere so every chrome surface matches. */
.chrome-grad,
body.duo .chrome-grad {
  background-image: linear-gradient(
    var(--pro-angle, 100deg),
    var(--chrome-lite) 0%,
    var(--chrome-mid)  7%,
    var(--chrome-low)  15%,
    var(--chrome-lite) 25%,
    var(--chrome-hi)   31%,
    var(--chrome-mid)  40%,
    var(--chrome-deep) 52%,
    var(--chrome-low)  60%,
    var(--chrome-lite) 70%,
    var(--chrome-hi)   75%,
    var(--chrome-mid)  84%,
    var(--chrome-low)  92%,
    var(--chrome-lite) 100%
  );
}

.chrome-fill,
body.duo .chrome-fill {
  background-image: inherit;
  background-size: 260% 260%;
  animation: chrome-drift 7s linear infinite;
}

@keyframes chrome-drift {
  0%   { background-position:   0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position:   0% 50%; }
}

/* The candle itself: wick + body, both masked to the moving gradient. */
.pro-wick,
body.duo .pro-wick {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 76px;
  flex: none;
}

/* No `background` shorthand here. An earlier version set `background: inherit` on
   this selector (0-2-2) which silently out-specified the gradient rule below (0-2-0),
   so the wick animated an invisible background. Same shape as the duo.css .db bug. */
.pro-wick i,
body.duo .pro-wick i {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 999px;
}

/* the thin wick above and below */
.pro-wick .wk,
body.duo .pro-wick .wk {
  width: 5px;
  top: 0;
  bottom: 0;
  border-radius: 3px;
}

/* the fat body */
.pro-wick .bd,
body.duo .pro-wick .bd {
  width: 30px;
  top: 16px;
  bottom: 16px;
  border-radius: 9px;
}

/* Doubled with body.duo so it can't lose a specificity fight to a base reset. */
.pro-wick .wk,
.pro-wick .bd,
body.duo .pro-wick .wk,
body.duo .pro-wick .bd {
  background-image: linear-gradient(
    var(--pro-angle, 100deg),
    var(--chrome-lite) 0%,  var(--chrome-mid)  7%,  var(--chrome-low)  15%,
    var(--chrome-lite) 25%, var(--chrome-hi)   31%, var(--chrome-mid)  40%,
    var(--chrome-deep) 52%, var(--chrome-low)  60%, var(--chrome-lite) 70%,
    var(--chrome-hi)   75%, var(--chrome-mid)  84%, var(--chrome-low)  92%,
    var(--chrome-lite) 100%
  );
  background-size: 260% 260%;
  animation: chrome-drift 7s linear infinite;
  /* cool rim + tight dark contact shadow: steel sitting in a room, not a glowing toy */
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .5),
    0 0 12px rgba(198, 216, 236, .3),
    0 2px 5px rgba(0, 0, 0, .45);
}

/* a hard specular streak crossing the body — the single strongest "this is metal" cue */
.pro-wick .bd::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 9px;
  background: linear-gradient(100deg,
    transparent 38%,
    rgba(255,255,255,.25) 45%,
    rgba(255,255,255,.98) 50%,
    rgba(255,255,255,.25) 55%,
    transparent 62%);
  background-size: 300% 100%;
  animation: chrome-sheen 3.6s ease-in-out infinite;
}

@keyframes chrome-sheen {
  0%, 100% { background-position: 120% 0; }
  50%      { background-position: -20% 0; }
}

/* ------------------------------------------------------------- PRO wordmark */

/* Chrome LETTERING is a vertical reflection, not a sweep: bright sky in the top
   half, a hard horizon line across the middle, darker ground below. That abrupt
   mid-point flip is the whole trick — a smooth blend reads as grey plastic. */
.chrome-text,
body.duo .chrome-text {
  background-image: linear-gradient(
    180deg,
    #f7fbff 0%,
    #cfe0f0 30%,
    #9fb6cc 47%,
    #45525f 50%,      /* horizon: hard flip */
    #7d8d9c 53%,
    #dfe9f3 74%,
    #ffffff 88%,
    #b9c8d7 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 900;
  letter-spacing: .04em;
  /* a thin dark edge so the light bands have something to read against */
  filter: drop-shadow(0 1px 0 rgba(10, 16, 24, .55));
}

/* the badge in the top bar, once you own it */
body.duo #plan-badge.pro,
body.duo .pro-chip {
  background-image: linear-gradient(
    170deg,
    #ffffff 0%, #d3e0ec 26%, #93a5b6 46%,
    #3a4550 52%, #8d9dad 60%, #eaf2f9 82%, #b4c4d3 100%
  );
  color: #16202b;
  font-weight: 900;
  border: 0;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .85),
    inset 0 -1px 0 rgba(0, 0, 0, .28),
    0 1px 4px rgba(0, 0, 0, .4);
}

/* ------------------------------------------------------------- paywall card */

body.duo .pro-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 4px 0 14px;
}

body.duo .pro-hero h2 {
  font-family: var(--fdisplay, inherit);
  font-size: 30px;
  line-height: 1.1;
  margin: 0;
}

body.duo .pro-sub {
  color: var(--muted);
  font-weight: 600;
  margin: 2px 0 0;
}

body.duo .pro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
  gap: 10px;
  margin: 14px 0 18px;
}

body.duo .pro-feat {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 13px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}

body.duo .pro-feat b { display: block; font-size: 14.5px; }
body.duo .pro-feat span { color: var(--muted); font-size: 13px; font-weight: 600; line-height: 1.35; }

body.duo .pro-feat .dot {
  width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; flex: none;
  background-image: linear-gradient(150deg,
    var(--chrome-hi) 0%, var(--chrome-mid) 40%, var(--chrome-deep) 62%, var(--chrome-lite) 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.4);
  background-size: 300% 300%;
  animation: chrome-drift 7s linear infinite;
}

body.duo .pro-price-row { display: flex; gap: 10px; flex-wrap: wrap; }
body.duo .pro-price-row .db { flex: 1 1 190px; }

body.duo .pro-save {
  font-size: 11.5px; font-weight: 900; letter-spacing: .04em;
  padding: 2px 7px; border-radius: 999px; margin-left: 7px;
  background: var(--green); color: #06210f;
}

body.duo .pro-fine {
  color: var(--muted); font-size: 12.5px; font-weight: 600;
  margin-top: 12px; line-height: 1.45;
}

/* --------------------------------------------------------- coach dashboard */

body.duo .leak {
  border: 2px solid var(--line);
  border-left: 5px solid var(--red, #e5484d);
  border-radius: 14px;
  padding: 13px 15px;
  margin-bottom: 10px;
  background: var(--card);
}

body.duo .leak.sev1 { border-left-color: var(--flame, #ff9838); }
body.duo .leak.sev2 { border-left-color: #ff7a3d; }

body.duo .leak h4 { margin: 0 0 3px; font-size: 15.5px; }
body.duo .leak .stat {
  font-size: 12px; font-weight: 900; letter-spacing: .05em;
  text-transform: uppercase; color: var(--muted);
}
body.duo .leak p { margin: 7px 0 0; font-size: 13.5px; color: var(--muted); font-weight: 600; line-height: 1.45; }
body.duo .leak .drill {
  margin-top: 9px; padding: 8px 10px; border-radius: 10px;
  background: color-mix(in srgb, var(--green) 12%, transparent);
  font-size: 13px; font-weight: 800;
}

body.duo .mrow { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
body.duo .mrow .nm { flex: 0 0 40%; font-weight: 800; font-size: 13.5px; }
body.duo .mrow .bar { flex: 1; height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
body.duo .mrow .bar i { display: block; height: 100%; border-radius: 999px; background: var(--green); }
body.duo .mrow .bar i.weak { background: var(--red, #e5484d); }
body.duo .mrow .bar i.mid  { background: var(--flame, #ff9838); }
body.duo .mrow .pc { flex: 0 0 42px; text-align: right; font-weight: 900; font-size: 13px; }

/* the locked preview a free user sees: real shape, unreadable detail */
body.duo .locked-peek { position: relative; }
body.duo .locked-peek .blurred { filter: blur(7px); pointer-events: none; user-select: none; opacity: .85; }
body.duo .locked-peek .veil {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 16px;
}
body.duo .locked-peek .veil b { font-size: 16px; }
body.duo .locked-peek .veil span { color: var(--muted); font-weight: 600; font-size: 13px; max-width: 320px; }

@media (prefers-reduced-motion: reduce) {
  .chrome-fill, .chrome-text, .pro-wick .wk, .pro-wick .bd,
  .pro-wick .bd::after, body.duo #plan-badge.pro, body.duo .pro-chip,
  body.duo .pro-feat .dot {
    animation: none;
  }
}
