/* Orivon — orivon.tech. Built to the Orivon Brand Guidelines v1.0 (orivon.tech/brand). */
@font-face { font-family: "Instrument Sans"; src: url("fonts/InstrumentSans-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("fonts/InstrumentSans-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Readex Pro"; src: url("fonts/ReadexPro-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Readex Pro"; src: url("fonts/ReadexPro-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Readex Pro"; src: url("fonts/ReadexPro-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --ultramarine: #3A31F0;
  --ink: #0B0C1F;
  --red: #E8202A;
  --peri: #C9C6FF;
  --mist: #F3F3F8;
  --white: #FFFFFF;
  --muted: #5B5D72;
  --line: #E3E3EC;
  --gradient: linear-gradient(150deg, #3A31F0 0%, #0B0C1F 85%);
  --radius: 12px;
  --card-radius: 20px;
  --step: 28px;
  --font: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1200px;
}
html[lang="ar"] { --font: "Readex Pro", "Instrument Sans", system-ui, sans-serif; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 18px; line-height: 1.5; color: var(--ink); background: var(--white); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Type scale (guidelines p.17) */
h1, h2, h3 { margin: 0; font-weight: 700; }
.display { font-size: clamp(44px, 7vw, 76px); line-height: 1.0; letter-spacing: -0.035em; }
.h1 { font-size: clamp(34px, 4.6vw, 48px); line-height: 1.05; letter-spacing: -0.03em; }
.h2 { font-size: clamp(24px, 3vw, 32px); line-height: 1.15; letter-spacing: -0.02em; }
html[lang="ar"] .display, html[lang="ar"] .h1, html[lang="ar"] .h2 { letter-spacing: 0; line-height: 1.25; }
.eyebrow { font-size: 16px; font-weight: 700; margin: 0 0 16px; color: var(--red); }
.lead { font-size: 20px; color: var(--muted); max-width: 640px; margin: 20px 0 0; }
p { margin: 0; }

/* Buttons (p.19): primary red, one per screen · secondary ultramarine · tertiary outline */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 24px; border-radius: var(--radius); font: 700 18px/1 var(--font); text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: transform .15s ease, background-color .15s ease, border-color .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible, a:focus-visible { outline: 3px solid var(--peri); outline-offset: 3px; }
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: #cf1a23; }
.btn-secondary { background: var(--ultramarine); color: var(--white); }
.btn-outline { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-outline:hover { border-color: var(--ink); }
.on-dark .btn-outline { border-color: rgba(255,255,255,.45); color: var(--white); }
.on-dark .btn-outline:hover { border-color: var(--white); }
.btn-white { background: var(--white); color: var(--ink); }

/* Header */
.site-header { position: absolute; inset: 0 0 auto; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 96px; }
.brand-logo { display: inline-flex; align-items: center; text-decoration: none; }
.brand-logo img { height: 38px; width: auto; }
.nav { display: flex; align-items: center; gap: 32px; }
.nav a:not(.btn) { color: var(--white); text-decoration: none; font-size: 17px; opacity: .9; }
.nav a:not(.btn):hover { opacity: 1; text-decoration: underline; text-underline-offset: 6px; }
.nav .btn { min-height: 44px; padding: 0 18px; font-size: 17px; }
.lang { font-weight: 700; }
html[lang="en"] .lang { font-family: "Readex Pro", sans-serif; }
html[lang="ar"] .lang { font-family: "Instrument Sans", sans-serif; }

/* Arabic lockup (p.18): mark to the right of the Arabic name, ف in red */
.ar-lockup { display: inline-flex; align-items: center; gap: 12px; font-family: "Readex Pro", sans-serif; font-weight: 700; font-size: 30px; line-height: 1; color: var(--white); }
.ar-lockup img { height: 36px; width: auto; }
.ar-lockup .f { color: var(--red); }
.ar-lockup.dark { color: var(--ink); }

/* Hero — Ink Fade gradient, the one gradient on the page */
.hero { background: var(--gradient); color: var(--white); padding: 168px 0 120px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.25fr 1fr; align-items: center; gap: 48px; }
.hero .eyebrow { color: var(--peri); }
.hero .lead { color: rgba(255,255,255,.82); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }
.hero-mark { justify-self: end; width: min(420px, 100%); }
html[dir="rtl"] .hero-mark { justify-self: start; }

/* Sections */
section { padding: 112px 0; }
.section-head { margin-bottom: 56px; }
.bg-mist { background: var(--mist); }

/* Products — the step device: right column sits one step higher (p.19) */
.products-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.products-grid > .card:nth-child(odd) { margin-top: var(--step); }
.card { background: var(--mist); border-radius: var(--card-radius); padding: 40px; display: flex; flex-direction: column; min-height: 320px; }
.card-lockup { height: 64px; display: flex; align-items: center; gap: 14px; margin-bottom: 32px; }
.card-lockup img { height: 44px; width: auto; }
.card-lockup .divider { width: 1.5px; height: 40px; background: var(--peri); }
.card-lockup .word { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; font-family: "Instrument Sans", sans-serif; }
.mraya-lockup { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; height: auto; }
.mraya-lockup .name { font-family: "Instrument Sans", sans-serif; font-size: 44px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.mraya-lockup .by { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 17px; }
.mraya-lockup .by img { height: 22px; }
.card .url { font-weight: 700; font-size: 16px; color: var(--ultramarine); text-decoration: none; margin-bottom: 12px; font-family: "Instrument Sans", sans-serif; }
html[dir="rtl"] .card .url { align-self: flex-end; direction: ltr; }
.card .desc { font-size: 18px; }
.card .card-foot { margin-top: auto; padding-top: 32px; }
.link-arrow { font-weight: 700; color: var(--ultramarine); text-decoration: none; }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 5px; }
.tag { display: inline-block; padding: 6px 14px; border-radius: 999px; font-size: 15px; font-weight: 700; background: var(--peri); color: var(--ink); }

/* The idea */
.idea { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.idea-visual { background: var(--white); border-radius: var(--card-radius); padding: 64px; display: grid; place-items: center; }
.idea-visual img { width: min(300px, 100%); }
.idea-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 40px; }
.idea-notes div { border-top: 2px solid var(--ink); padding-top: 14px; }
.idea-notes strong { display: block; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 6px; }
html[lang="ar"] .idea-notes strong { letter-spacing: 0; font-size: 16px; }
.idea-notes span { color: var(--muted); font-size: 16px; }

/* About */
.about-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-bottom: 72px; }
.about-cols h3 { font-size: 16px; color: var(--ultramarine); margin-bottom: 12px; }
.traits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.trait { border: 1.5px solid var(--line); border-radius: var(--card-radius); padding: 28px; }
.trait .num { font-size: 15px; font-weight: 700; color: var(--ultramarine); }
.trait h3 { font-size: 24px; letter-spacing: -0.02em; margin: 24px 0 8px; }
.trait p { color: var(--muted); font-size: 16px; }

/* Contact — ink */
.contact { background: var(--ink); color: var(--white); }
.contact .lead { color: rgba(255,255,255,.75); }
.contact-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 64px; align-items: end; }
.contact-list { display: grid; gap: 0; }
.contact-list a, .contact-list div { display: flex; justify-content: space-between; gap: 16px; padding: 20px 0; border-bottom: 1px solid rgba(255,255,255,.14); text-decoration: none; font-size: 18px; }
.contact-list span:first-child { color: var(--peri); }
.contact-list .val { font-weight: 700; direction: ltr; unicode-bidi: isolate; }
.contact-list a:hover .val { text-decoration: underline; text-underline-offset: 5px; }
.contact .hero-actions { margin-top: 36px; }

/* Footer */
.site-footer { background: var(--white); padding: 72px 0 40px; border-top: 1px solid var(--line); }
.footer-top { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 40px; }
.footer-top img.logo { height: 34px; width: auto; margin-bottom: 18px; }
.footer-top p { color: var(--muted); font-size: 16px; max-width: 300px; }
.footer-top h4 { font-size: 14px; margin: 0 0 16px; color: var(--muted); font-weight: 700; }
.footer-top ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-top a { text-decoration: none; font-size: 16px; }
.footer-top a:hover { color: var(--ultramarine); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

/* Responsive */
@media (max-width: 960px) {
  .hero .wrap, .idea, .contact-grid { grid-template-columns: 1fr; }
  .hero-mark { display: none; }
  .about-cols { grid-template-columns: 1fr; gap: 28px; }
  .traits { grid-template-columns: 1fr 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 17px; }
  .wrap { padding: 0 16px; }
  .site-header .wrap { height: 76px; }
  .brand-logo img { height: 30px; }
  .ar-lockup { font-size: 24px; } .ar-lockup img { height: 28px; }
  .nav { gap: 14px; }
  .nav a.hide-sm { display: none; }
  .nav .btn { min-height: 40px; padding: 0 14px; font-size: 15px; }
  .hero { padding: 132px 0 80px; }
  section { padding: 80px 0; }
  .products-grid { grid-template-columns: 1fr; }
  .products-grid > .card:nth-child(odd) { margin-top: 0; }
  .card { padding: 28px; min-height: 0; }
  .card-lockup img { height: 34px; } .card-lockup .word { font-size: 27px; } .card-lockup .divider { height: 32px; }
  .mraya-lockup .name { font-size: 36px; }
  .idea-visual { padding: 40px; }
  .traits { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } .btn:hover { transform: none; } }

/* RTL: the step is never mirrored — the right-hand panel still sits one step higher */
html[dir="rtl"] .products-grid > .card:nth-child(odd) { margin-top: 0; }
html[dir="rtl"] .products-grid > .card:nth-child(even) { margin-top: var(--step); }
html[dir="rtl"] .card-lockup[dir="ltr"] { justify-content: flex-end; }
@media (max-width: 720px) { html[dir="rtl"] .products-grid > .card:nth-child(even) { margin-top: 0; } }

/* Grid children must be allowed to shrink below their content width on phones */
.hero .wrap > *, .products-grid > *, .idea > *, .contact-grid > *, .about-cols > *, .traits > *, .footer-top > * { min-width: 0; }
@media (max-width: 720px) { .display { font-size: 40px; } .h1 { font-size: 32px; } .card-lockup .word { font-size: 24px; } }
@media (max-width: 380px) { .display { font-size: 36px; } .nav .lang { display: none; } }
