/* Jamalek landing — discovery sections: features bento, how-it-works steps,
   results showcase (score + skin profile + type code), 13-concern flip cards, herbs. */

/* Features bento. */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tile { overflow: hidden; display: flex; flex-direction: column; gap: 8px; padding: 26px; border-radius: var(--radius); background: rgba(255, 255, 255, .78); border: 1px solid #fff; box-shadow: var(--shadow-sm); transition: transform .45s var(--ease-out), box-shadow .45s; }
.tile:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.tile h3 { font-size: 1.28rem; color: var(--plum-ink); }
.tile p { color: var(--muted); font-size: .96rem; }
.tile-icon { display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: 6px; border-radius: 16px; background: var(--grad-rose); color: #fff; font-size: 1.25rem; box-shadow: 0 10px 20px -10px rgba(142, 90, 102, .9); transition: transform .5s var(--ease-out); }
.tile:hover .tile-icon { transform: rotate(-8deg) scale(1.08); }
.tile-xl { grid-column: span 2; grid-row: span 2; background: var(--grad-hero); color: #fff; border: 0; justify-content: flex-end; min-height: 340px; }
.tile-xl h3 { color: #fff; font-size: 1.8rem; } .tile-xl p { color: #F1DCDF; max-width: 420px; }
.tile-xl .tile-icon { background: rgba(255, 255, 255, .18); }
.tile-wide { grid-column: span 2; }
.scan-art { position: absolute; top: 26px; inset-inline-end: 26px; width: 150px; height: 190px; }
.scan-art i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); animation: pulseRing 3.6s ease-out infinite; }
.scan-art i:nth-child(2) { animation-delay: 1.2s; } .scan-art i:nth-child(3) { animation-delay: 2.4s; }
@keyframes pulseRing { from { transform: scale(.5); opacity: 1; } to { transform: scale(1.25); opacity: 0; } }
.tile-spark { width: 100%; height: 60px; margin-top: auto; }
.tile-spark path { fill: none; stroke: var(--rose); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 300; stroke-dashoffset: 300; transition: stroke-dashoffset 1.8s var(--ease-out) .3s; }
.is-in .tile-spark path, .no-observer .tile-spark path { stroke-dashoffset: 0; }

/* How it works: numbered steps joined by a line that fills while scrolling (--fill). */
.steps { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step { position: relative; z-index: 1; padding: 0 6px; text-align: center; }
.step-num { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; background: #fff; color: var(--rose-deep); font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; box-shadow: 0 0 0 8px rgba(232, 197, 197, .45), var(--shadow-md); }
.step h3 { font-size: 1.22rem; color: var(--plum-ink); margin-bottom: 6px; }
.step p { color: var(--muted); font-size: .96rem; }
.steps-line { position: absolute; top: 32px; inset-inline: 12.5%; height: 3px; border-radius: 3px; background: rgba(183, 110, 121, .18); }
.steps-line i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(-90deg, var(--gold), var(--rose)); transform-origin: right; transform: scaleX(var(--fill, 0)); }

/* Results showcase. */
.results-grid, .makeup-grid, .journey-grid, .advisor-grid, .spec-grid, .report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 6vw, 80px); align-items: center; }
.grade-legend { list-style: none; padding: 0; margin: 26px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grade-legend li { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px; background: #fff; box-shadow: var(--shadow-sm); font-size: .92rem; }
.grade-legend span { margin-inline-start: auto; color: var(--muted); font-size: .82rem; }
.results-stack { display: grid; gap: 18px; }
.score-card { display: flex; align-items: center; gap: 24px; padding: 26px; border-radius: var(--radius-lg); background: var(--grad-hero); color: #fff; box-shadow: var(--shadow-lg); position: relative; }
.score-card .ring { width: 140px; height: 140px; flex: none; }
.score-card .ring circle { stroke: rgba(255, 255, 255, .2); stroke-width: 9; }
.score-card .ring .ring-fill { stroke: #fff; stroke-dashoffset: 100; transition: stroke-dashoffset 2s var(--ease-out); }
.score-card.is-in .ring-fill { stroke-dashoffset: 16; }
.score-num { position: absolute; right: 26px; width: 140px; text-align: center; font-family: system-ui, sans-serif; line-height: 1; }
.score-num b { font-size: 2.6rem; } .score-num small { opacity: .8; }
.score-meta h3 { font-size: 1.6rem; color: #fff; margin-bottom: 8px; }
.score-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.score-stats span { display: grid; padding: 6px 12px; border-radius: 14px; background: rgba(255, 255, 255, .15); font-size: .78rem; line-height: 1.35; }
.score-stats b { font-size: 1.15rem; }
.profile-card { padding: 26px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--blush-2); box-shadow: var(--shadow-md); }
.profile-card h3 { display: flex; align-items: center; gap: 8px; font-size: 1.3rem; color: var(--plum-ink); margin-bottom: 16px; }
.profile-card h3 .icon { color: var(--gold); }
.profile-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.metric { padding: 16px; border-radius: 18px; background: var(--cream); }
.metric small { display: block; color: var(--muted); font-size: .82rem; }
.metric b { display: block; font-family: system-ui, sans-serif; font-size: 2rem; color: var(--plum-ink); line-height: 1.3; text-align: right; }
.metric > span:not(.meter) { font-size: .82rem; color: var(--mauve); }
.meter { display: block; height: 8px; border-radius: 8px; background: var(--blush-2); overflow: hidden; margin-top: 6px; }
.meter i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #7FB3D5, #5E8FB8); transition: width 1.8s var(--ease-out) .3s; }
.is-in .meter i, .no-observer .meter i { width: var(--v); }
.type-code { margin-top: 16px; padding: 16px; border-radius: 18px; background: linear-gradient(135deg, #FBF1EF, #F6E6E8); }
.type-code > small { color: var(--muted); font-size: .82rem; }
.code-tiles { display: flex; justify-content: center; gap: 10px; margin: 12px 0 10px; perspective: 600px; }
.code-tile { flex: 0 1 58px; min-width: 0; height: 64px; border-radius: 16px; border: 0; background: #fff; box-shadow: var(--shadow-sm); font-family: system-ui, sans-serif; font-size: 1.7rem; color: var(--rose-deep); transition: transform .5s var(--ease-out), box-shadow .3s; }
.code-tile:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.code-tile.is-flipping { transform: rotateY(90deg); transition: transform .25s ease-in; }
.code-words { text-align: center; font-weight: 700; color: var(--plum); }

/* Concern filters + flip cards (front: what we see · back: natural care example). */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 30px; }
.filter { padding: 9px 18px; border-radius: 999px; border: 1px solid var(--blush); background: rgba(255, 255, 255, .7); color: var(--mauve); font-weight: 500; transition: .3s; }
.filter:hover { border-color: var(--rose); }
.filter.is-active { background: var(--grad-rose); color: #fff; border-color: transparent; box-shadow: 0 8px 18px -10px rgba(142, 90, 102, .9); }
.concerns { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 26px 16px; }
.concern { position: relative; display: flex; flex-direction: column; gap: 2px; transition: opacity .45s, transform .45s var(--ease-out); }
.concern[hidden] { display: none; }
.concern-card { position: relative; display: grid; flex: 1; min-height: 210px; padding: 0; border: 0; background: none; text-align: start; perspective: 1000px; }
.concern-more { align-self: flex-start; padding: 4px 8px; font-size: .86rem; font-weight: 700; color: var(--rose-deep); }
.concern-more::after { content: " ←"; }
.concern-more:hover, .concern-more:focus-visible { text-decoration: underline; }
.concern .face, .concern .back { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 8px; padding: 22px; border-radius: var(--radius); backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform .8s var(--ease-out); }
.concern .face { background: #fff; border: 1px solid var(--blush-2); box-shadow: var(--shadow-sm); }
.concern .face .icon { width: 46px; height: 46px; padding: 11px; border-radius: 15px; background: var(--cream-2); color: var(--rose-deep); }
.concern .face b { font-family: var(--font-display); font-size: 1.15rem; color: var(--plum-ink); }
.concern .face span { color: var(--muted); font-size: .92rem; }
.concern .face::after { content: "اضغطي للنصائح ←"; margin-top: auto; font-size: .78rem; font-weight: 700; color: var(--rose); }
.concern .back { transform: rotateY(180deg); background: var(--grad-hero); color: #fff; font-size: .9rem; box-shadow: var(--shadow-md); }
.concern .back em { font-style: normal; display: inline-block; width: max-content; padding: 2px 10px; border-radius: 999px; background: rgba(255, 255, 255, .18); font-size: .74rem; font-weight: 700; color: var(--gold-soft); }
.concern-card[aria-pressed="true"] .face { transform: rotateY(-180deg); }
.concern-card[aria-pressed="true"] .back { transform: rotateY(0); }
.concern:hover .face { border-color: var(--blush); box-shadow: var(--shadow-md); }

/* Natural care: herb cards + "never" strip. */
.natural { overflow: hidden; }
.herbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.herb { padding: 24px; border-radius: var(--radius); background: rgba(255, 255, 255, .8); border: 1px solid #fff; box-shadow: var(--shadow-sm); text-align: center; transition: transform .45s var(--ease-out); }
.herb:hover { transform: translateY(-6px) rotate(-1deg); }
.herb-icon { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #EAF3E6, #CFE3C8); color: #4F8A62; font-size: 1.5rem; animation: sway 5s ease-in-out infinite; }
.herb:nth-child(even) .herb-icon { animation-delay: -2.5s; }
@keyframes sway { 50% { transform: rotate(10deg) translateY(-3px); } }
.herb { position: relative; }
.herb h3 { font-size: 1.15rem; color: var(--plum-ink); }
.herb h3 a { color: inherit; }
.herb h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.herb h3 a:focus-visible { outline: none; }
.herb h3 a:focus-visible::after { outline: 2px solid var(--rose); outline-offset: 2px; }

/* Small "see more" text links under sections (they lead to the full pages). */
.more-link { margin-top: 18px; }
.more-link a { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--rose-deep); transition: gap .3s; }
.more-link a:hover { gap: 12px; }
.more-link .icon { width: 1em; height: 1em; }
.container > .more-link, .faq-wrap > .more-link { text-align: center; }
.section-plum .more-link a { color: var(--gold-soft); }
.herb p { color: var(--muted); font-size: .9rem; }
.never { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 34px; }
.never span { position: relative; padding: 8px 18px; border-radius: 999px; background: #fff; color: var(--muted); font-weight: 700; box-shadow: var(--shadow-sm); }
.never span::after { content: ""; position: absolute; top: 50%; inset-inline: 14px; height: 2px; background: var(--sev-d); transform: scaleX(0); transform-origin: right; transition: transform .8s var(--ease-out); }
.never.is-in span::after, .no-observer .never span::after { transform: scaleX(1); }
.never span:nth-child(2)::after { transition-delay: .15s; } .never span:nth-child(3)::after { transition-delay: .3s; } .never span:nth-child(4)::after { transition-delay: .45s; }

@media (max-width: 960px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .tile-xl { min-height: 300px; }
  .steps { grid-template-columns: 1fr; gap: 26px; max-width: 520px; margin-inline: auto; }
  .step { display: flex; gap: 18px; text-align: start; }
  .step-num { margin: 0; flex: none; }
  .steps-line { top: 32px; bottom: 32px; inset-inline: auto; inset-inline-start: 31px; width: 3px; height: auto; }
  .steps-line i { width: 100%; height: 100%; transform-origin: top; transform: scaleY(var(--fill, 0)); }
  .results-grid { grid-template-columns: minmax(0, 1fr); }
  .herbs { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; }
  .tile-xl, .tile-wide { grid-column: auto; grid-row: auto; }
  .scan-art { width: 110px; height: 140px; }
  .score-card { flex-direction: column; text-align: center; }
  .score-num { top: 26px; right: auto; left: 50%; margin-left: -70px; padding-top: 50px; }
  .score-stats { justify-content: center; }
  .profile-row { grid-template-columns: 1fr; }
  .code-tile { height: 58px; }
  .grade-legend { grid-template-columns: 1fr; }
  .concerns { grid-template-columns: 1fr; }
  .herb { padding: 18px 12px; }
}
