/*
  The public site. Deliberately plain CSS with no build step and no framework: it is a placeholder
  until Umbraco takes over, and anything that needs compiling would have to be thrown away twice.

  The palette, the radii and the gradient are lifted from the portal so a visitor who signs in does
  not feel handed to a different company.
*/

@layer reset, base, components;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  body { margin: 0; min-width: 320px; }
  img, svg { display: block; max-width: 100%; }
  a { color: inherit; text-decoration: none; }
  button { font: inherit; cursor: pointer; }
  h1, h2, h3, p, ul { margin-top: 0; }
}

@layer base {
  :root {
    --primary: #5147dc; --primary-dark: #3e36b3; --primary-soft: #eeedff;
    --ink: #17162b; --ink-2: #4f4d66; --muted: #77748b; --line: #e5e4ed;
    --canvas: #f7f7fb; --surface: #fff; --mint: #4ec9ad; --deep: #201d4d;
    --radius: 16px; --shadow: 0 8px 28px rgba(37, 35, 70, .07);
    color-scheme: light;
  }
  html { scroll-behavior: smooth; }
  html[lang="ar"] { font-family: Tahoma, Arial, "Segoe UI", sans-serif; }
  html[lang="en"] { font-family: Inter, "Segoe UI", Arial, sans-serif; }
  body { background: var(--canvas); color: var(--ink); line-height: 1.75; font-size: 16px; }

  /* One document carries both languages; the one that is not current is simply not rendered. */
  html[lang="ar"] [lang="en"] { display: none; }
  html[lang="en"] [lang="ar"] { display: none; }

  h1 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.2; letter-spacing: -.02em; margin-bottom: .6rem; }
  h2 { font-size: clamp(1.45rem, 3vw, 2.1rem); line-height: 1.3; margin-bottom: .5rem; }
  h3 { font-size: 1.05rem; margin-bottom: .3rem; }
  :focus-visible { outline: 3px solid rgba(81, 71, 220, .4); outline-offset: 3px; border-radius: 6px; }
}

@layer components {
  .wrap { width: min(1140px, 100% - 2.5rem); margin-inline: auto; }
  .section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
  .section-head { max-width: 640px; margin-bottom: 2.5rem; }
  .section-head p { color: var(--muted); margin: 0; }
  .eyebrow { display: inline-block; margin-bottom: .6rem; color: var(--primary);
             font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }

  /* ---- header ---- */
  .topbar { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.88);
            border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
  .topbar .wrap { display: flex; align-items: center; gap: 1rem; height: 74px; }
  /* The lockup is one SVG filled with currentColor, so the colour follows whatever it sits on. */
  .brand { display: flex; align-items: center; gap: .7rem; font-weight: 800; color: var(--primary); }
  .brand svg { width: 150px; height: auto; }
  footer .brand svg { width: 170px; }
  .brand-mark { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 auto;
                border-radius: 12px; color: white; background: linear-gradient(135deg, #7d72ff, var(--mint));
                box-shadow: 0 8px 18px rgba(80, 70, 220, .26); }
  .brand-mark svg { width: 22px; }
  .brand strong { display: block; font-size: 1.1rem; line-height: 1.1; }
  .brand small { display: block; color: var(--muted); font-size: .68rem; font-weight: 600; }
  .nav { display: flex; align-items: center; gap: .35rem; margin-inline-start: auto; }
  .nav a { padding: .5rem .8rem; border-radius: 9px; color: var(--ink-2); font-size: .88rem; font-weight: 600; }
  .nav a:hover { color: var(--ink); background: rgba(127,127,150,.1); }
  .topbar-actions { display: flex; align-items: center; gap: .5rem; margin-inline-start: auto; }
  .nav + .topbar-actions { margin-inline-start: .5rem; }

  .button { display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
            min-height: 44px; padding: .65rem 1.3rem; border: 1px solid transparent; border-radius: 11px;
            font-weight: 750; font-size: .9rem; transition: transform .15s, background .15s, box-shadow .15s; }
  .button:hover { transform: translateY(-1px); }
  .button.primary { color: white; background: var(--primary); box-shadow: 0 8px 18px rgba(81,71,220,.22); }
  .button.primary:hover { background: var(--primary-dark); }
  .button.ghost { color: var(--ink-2); background: var(--surface); border-color: var(--line); }
  .button.light { color: var(--deep); background: white; }
  .button.outline-light { color: white; border-color: rgba(255,255,255,.4); background: transparent; }
  .button.large { min-height: 52px; padding: .8rem 1.8rem; font-size: .98rem; }
  .lang { min-height: 40px; padding: .4rem .7rem; border: 1px solid var(--line); border-radius: 9px;
          background: var(--surface); color: var(--ink-2); font-size: .8rem; font-weight: 700; }

  /* ---- hero ---- */
  .hero { position: relative; overflow: hidden; color: white;
          background: radial-gradient(circle at 12% 88%, rgba(78,201,173,.22), transparent 34%),
                      radial-gradient(circle at 88% 8%, rgba(139,130,255,.34), transparent 36%),
                      linear-gradient(150deg, #1d1948, #342a87); }
  .hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
                gap: clamp(2rem, 5vw, 4rem); align-items: center;
                padding-block: clamp(3.5rem, 8vw, 6rem); }
  .hero h1 { color: white; }
  .hero p { color: #cfcce9; font-size: 1.08rem; max-width: 48ch; }
  .hero .eyebrow { color: #8edbc9; }
  .hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.8rem; }
  .hero-note { margin-top: 1.6rem; color: #a9a5d2; font-size: .82rem; }

  /* The cycle, drawn rather than described: it is the whole product in four lines. */
  .flow { display: grid; gap: .55rem; padding: 1.4rem; border: 1px solid rgba(255,255,255,.16);
          border-radius: 20px; background: rgba(255,255,255,.07); backdrop-filter: blur(8px); }
  .flow-step { display: grid; grid-template-columns: 34px minmax(0,1fr); gap: .85rem; align-items: start;
               padding: .75rem .85rem; border-radius: 13px; background: rgba(255,255,255,.07); }
  /* Direct child only. A bare `.flow-step span` also catches the language spans nested in the text,
     and since this layer wins over the one that hides them, both languages render at 34px wide. */
  .flow-step > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
                      background: rgba(255,255,255,.16); font-weight: 800; font-size: .85rem; }
  .flow-step strong { display: block; font-size: .95rem; }
  .flow-step small { color: #bdb9e0; font-size: .8rem; line-height: 1.6; }
  .flow-step.settled { background: rgba(78,201,173,.18); }
  .flow-step.settled > span { background: rgba(78,201,173,.3); }

  /* ---- cards ---- */
  .grid { display: grid; gap: 1rem; }
  .grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .card { padding: 1.5rem; background: var(--surface); border: 1px solid var(--line);
          border-radius: var(--radius); box-shadow: var(--shadow); }
  .card p { color: var(--muted); margin: 0; font-size: .92rem; }
  .card-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 1rem;
               border-radius: 13px; color: var(--primary); background: var(--primary-soft); }
  .card-icon svg { width: 22px; }
  .card-icon.mint { color: #0a7a60; background: #e6f7f2; }

  .audience { display: grid; gap: .7rem; margin: 0; padding: 0; list-style: none; }
  .audience li { display: grid; grid-template-columns: 22px minmax(0,1fr); gap: .7rem;
                 color: var(--ink-2); font-size: .93rem; }
  .audience svg { width: 20px; margin-top: .35rem; color: var(--mint); }

  /* ---- fees ---- */
  .table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius);
                background: var(--surface); box-shadow: var(--shadow); }
  table { width: 100%; border-collapse: collapse; min-width: 480px; font-size: .92rem; }
  th { color: var(--muted); background: #fbfbfd; font-size: .72rem; text-transform: uppercase;
       letter-spacing: .05em; font-weight: 800; }
  th, td { padding: .95rem 1.2rem; border-bottom: 1px solid #efeef4; text-align: start; }
  tbody tr:last-child td { border-bottom: 0; }
  td strong { font-variant-numeric: tabular-nums; }
  .fee-note { margin-top: 1rem; color: var(--muted); font-size: .85rem; }

  /* ---- trust strip ---- */
  .trust { color: white; background: linear-gradient(150deg, var(--deep), #312879); }
  .trust h2 { color: white; }
  .trust .section-head p { color: #c3bfe4; }
  .trust-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; }
  .trust-item { padding: 1.4rem; border: 1px solid rgba(255,255,255,.14); border-radius: 15px;
                background: rgba(255,255,255,.06); }
  .trust-item h3 { color: white; }
  .trust-item p { color: #bdb9e0; margin: 0; font-size: .9rem; }

  /* ---- faq ---- */
  .faq { display: grid; gap: .6rem; }
  details { padding: 1.1rem 1.3rem; background: var(--surface); border: 1px solid var(--line);
            border-radius: 13px; }
  details[open] { border-color: #c9c5f2; box-shadow: var(--shadow); }
  summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; gap: .8rem;
            align-items: center; justify-content: space-between; }
  summary::-webkit-details-marker { display: none; }
  summary::after { content: '+'; flex: 0 0 auto; color: var(--primary); font-size: 1.3rem; font-weight: 700; }
  details[open] summary::after { content: '\2212'; }
  details p { margin: .9rem 0 0; color: var(--muted); font-size: .93rem; }

  /* ---- cta + footer ---- */
  .cta { padding: clamp(2.2rem, 5vw, 3.4rem); border-radius: 24px; color: white; text-align: center;
         background: radial-gradient(circle at 15% 85%, rgba(78,201,173,.26), transparent 40%),
                     linear-gradient(145deg, #2a2366, #4f45c9); }
  .cta h2 { color: white; }
  .cta p { color: #d4d1ef; max-width: 50ch; margin-inline: auto; }
  .cta-actions { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; margin-top: 1.6rem; }

  footer { padding: 3rem 0 2.5rem; border-top: 1px solid var(--line); background: var(--surface); }
  .foot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0,1fr));
               gap: 2rem; margin-bottom: 2rem; }
  .foot-grid h4 { margin: 0 0 .7rem; font-size: .82rem; text-transform: uppercase; letter-spacing: .07em;
                  color: var(--muted); }
  .foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
  .foot-grid a { color: var(--ink-2); font-size: .9rem; }
  .foot-grid a:hover { color: var(--primary); }
  .foot-about p { color: var(--muted); font-size: .88rem; margin: .9rem 0 0; max-width: 42ch; }
  .legal { padding-top: 1.6rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem;
           display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; align-items: center; }
  .registry { padding: .25rem .6rem; border-radius: 999px; background: var(--primary-soft);
              color: var(--primary-dark); font-weight: 700; font-size: .76rem; }

  /* A placeholder that looks like a placeholder, so nobody mistakes it for a real number. */
  .pending { padding: .1rem .45rem; border-radius: 5px; background: #fff5df; color: #a55b05;
             font-size: .82rem; font-weight: 700; }
}

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .grid.three, .grid.two, .trust-grid { grid-template-columns: minmax(0, 1fr); }
  .foot-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .nav { display: none; }
}

@media (max-width: 560px) {
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .topbar .wrap { height: 66px; }
  .brand small { display: none; }
  .hero-actions .button, .cta-actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
