/*
  ogen-base.css
  Reset, RTL foundation, typography and base page structure.
*/

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  direction: rtl;
}

body {
  margin: 0;
  background: var(--ogen-canvas);
  color: var(--ogen-text);
  font-family: var(--ogen-font);
  font-size: var(--ogen-fs-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  position: relative;
  isolation: isolate;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

body::before {
  background:
    radial-gradient(circle at 12% 18%, rgba(39, 198, 243, .18), transparent 26%),
    radial-gradient(circle at 88% 82%, rgba(165, 180, 255, .18), transparent 30%),
    linear-gradient(145deg, #f9fcff 0%, #f3f8ff 54%, #fbfdff 100%);
}

body::after {
  opacity: .22;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
textarea {
  font-family: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
}

a {
  color: var(--ogen-blue-600);
}

/* LTR isolation for urls, code, file names inside an RTL page */
.ogen-ltr {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}

/* Typography scale */
h1, h2, h3 {
  margin: 0;
  font-weight: 800;
  color: var(--ogen-text);
}

.ogen-hero-title {
  font-size: var(--ogen-fs-hero);
  font-weight: 800;
  line-height: 1.06;
  font-family: var(--ogen-font-display);
  letter-spacing: -.035em;
}

h1, .ogen-h1 { font-size: var(--ogen-fs-h1); }
h2, .ogen-h2 { font-size: var(--ogen-fs-h2); font-weight: 750; }
h3, .ogen-h3 { font-size: var(--ogen-fs-h3); font-weight: 700; }

.ogen-text-secondary {
  font-size: var(--ogen-fs-secondary);
  color: var(--ogen-text-secondary);
}

.ogen-text-meta {
  font-size: var(--ogen-fs-meta);
  color: var(--ogen-text-muted);
}

p {
  margin: 0 0 var(--space-3);
}

/* Skip link */
.ogen-skip-link {
  position: absolute;
  right: var(--space-3);
  top: -60px;
  background: var(--ogen-navy-900);
  color: #fff;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--ogen-radius-sm);
  z-index: 100;
  transition: top var(--ogen-duration-fast) var(--ogen-ease);
}

.ogen-skip-link:focus {
  top: var(--space-3);
}

/* Screen-reader only utility */
.ogen-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus visibility (WCAG AA) */
:focus-visible {
  outline: 2px solid var(--ogen-blue-600);
  outline-offset: 2px;
  border-radius: var(--ogen-radius-sm);
}

/* Page shell */
.ogen-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.ogen-site-header {
  background: var(--ogen-surface);
  border-bottom: 1px solid var(--ogen-border);
}

.ogen-site-header__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.ogen-site-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 800;
  color: var(--ogen-navy-900);
}

.ogen-site-brand__emblem {
  width: 36px;
  height: 36px;
  border-radius: var(--ogen-radius-sm);
  background: var(--ogen-surface-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ogen-navy-900);
  font-size: 15px;
  border: 1px solid var(--ogen-border);
}

.ogen-site-nav {
  display: flex;
  gap: var(--space-6);
  font-size: var(--ogen-fs-secondary);
  color: var(--ogen-text-secondary);
}

.ogen-site-nav a {
  color: inherit;
  text-decoration: none;
}

.ogen-site-nav a:hover {
  color: var(--ogen-blue-600);
}

section {
  padding: var(--space-10) 0;
}

.ogen-section-title {
  margin-bottom: var(--space-6);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
