@import url("./company.css");

:root {
  color-scheme: light;
  --accent: #185460;
  --accent-shade: #123d46;
  --accent-soft: #e3f0ed;
  --ink: #102732;
  --muted: #4d616d;
  --line: #d8e3e6;
  --paper: #fff;
  --background: #f3f7f8;
  --shadow: 0 14px 34px rgb(21 48 63 / 8%);
  --radius: 20px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 100%;
  line-height: 1.6;
  color: var(--ink);
  background: var(--background);
}
:root[lang="ar"] {
  font-family: "Geeza Pro", "Segoe UI", Tahoma, Arial, sans-serif;
  --serif: "Geeza Pro", "Segoe UI", Tahoma, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-inline-size: 0; }
[hidden] { display: none !important; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { color: var(--accent-shade); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .65; }
:focus-visible { outline: 3px solid #be631e; outline-offset: 3px; }
h1, h2, h3, p { margin-block-start: 0; }
h1, h2, h3 { line-height: 1.15; }
img { max-inline-size: 100%; }
legend { font-weight: 700; padding: 0 .4rem; }
fieldset { min-inline-size: 0; border: 1px solid var(--line); border-radius: 14px; margin-inline: 0; }
.skip-link {
  position: absolute;
  z-index: 10;
  inset-block-start: .5rem;
  inset-inline-start: .5rem;
  transform: translateY(-150%);
  padding: .55rem .85rem;
  background: var(--paper);
  border-radius: 8px;
}
.skip-link:focus { transform: translateY(0); }

.shell { inline-size: min(100% - 3.5rem, 84rem); margin-inline: auto; }
.site-header { background: var(--paper); border-block-end: 1px solid var(--line); }
.nav {
  display: flex;
  min-block-size: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  color: var(--ink);
  gap: .7rem;
  align-items: center;
  font-weight: 750;
  letter-spacing: -.025em;
  font-size: 1.12rem;
  line-height: 1.25;
  text-decoration: none;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  inline-size: 39px;
  block-size: 39px;
  border-radius: 11px;
  background: var(--accent);
  color: #fff;
  font-family: var(--serif);
  font-weight: 700;
  flex: none;
}
.lang-switch { display: inline-flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.lang-switch a, .lang-switch button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-block-size: 40px;
  padding-inline: .65rem;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  text-decoration: none;
  font-size: .9rem;
}
.lang-switch [aria-current="page"], .lang-switch [aria-pressed="true"] {
  color: var(--accent-shade);
  background: var(--accent-soft);
  border-color: transparent;
  font-weight: 700;
}

.hero { padding-block: clamp(2rem, 6vw, 5rem) clamp(1.5rem, 4vw, 3rem); }
.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.3rem, 5.2vw, 4.9rem);
  letter-spacing: -.044em;
  line-height: .99;
  margin-block-end: .75rem;
  overflow-wrap: anywhere;
}
:root[lang="ar"] .hero h1 { letter-spacing: normal; line-height: 1.23; }
.hero p { max-inline-size: 45rem; color: var(--muted); font-size: clamp(1.03rem, 2vw, 1.2rem); }
.eyebrow {
  display: block;
  color: var(--accent);
  font-size: .86rem;
  font-weight: 750;
  letter-spacing: .09em;
  text-transform: uppercase;
  margin-block-end: .55rem;
}
:root[lang="ar"] .eyebrow { letter-spacing: normal; }
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: clamp(1rem, 2.5vw, 2rem);
  align-items: start;
  margin-block-end: 3rem;
}
.workspace > * { min-inline-size: 0; }
.card {
  min-inline-size: 0;
  padding: clamp(1rem, 2vw, 1.9rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card h2 { margin-block-end: .6rem; font-size: clamp(1.3rem, 2vw, 1.72rem); }
.card h3 { margin-block-end: .5rem; font-size: 1.1rem; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.field { display: grid; gap: .35rem; min-inline-size: 0; font-weight: 650; font-size: .94rem; align-content: start; }
.field small, .help, .hint { color: var(--muted); font-weight: 400; font-size: .875rem; line-height: 1.5; }
.field.full, .field-wide, .field--wide { grid-column: 1 / -1; }
input:not([type=checkbox], [type=radio]), select, textarea {
  inline-size: 100%;
  max-inline-size: 100%;
  min-inline-size: 0;
  min-block-size: 44px;
  color: var(--ink);
  background: #fbfdfe;
  border: 1px solid #bbcdd4;
  border-radius: 9px;
  padding: .55rem .68rem;
  font-size: 1rem;
}
textarea { resize: vertical; min-block-size: 5rem; }
select {
  appearance: none;
  padding-inline-end: 2.4rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='m3 5 4 4 4-4' fill='none' stroke='%23304755' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center;
}
:root[dir="rtl"] select { background-position: left .75rem center; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); inline-size: 1rem; block-size: 1rem; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #b33b38; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-block-size: 44px;
  padding: .54rem .9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 680;
  line-height: 1.3;
  text-decoration: none;
  text-align: center;
}
.button:hover { background: var(--accent-soft); color: var(--accent-shade); border-color: var(--accent); }
.button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.button.primary:hover { background: var(--accent-shade); color: #fff; }
.button.secondary { background: #fff; color: var(--accent-shade); }
.button.secondary:hover { background: var(--accent-soft); }
.tool-actions { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }
.status { color: var(--muted); font-size: .94rem; margin-block: .45rem; min-block-size: 1.4em; }
.status:empty { min-block-size: 0; margin: 0; }
.status[data-error="true"], .status.error, .error { color: #8e2928; }
.footer { border-block-start: 1px solid var(--line); color: var(--muted); padding-block: 1.4rem; font-size: .93rem; }

.document-preview {
  --document-accent: #21485a;
  inline-size: 100%;
  min-inline-size: 0;
  margin-block: .85rem;
  padding: clamp(.9rem, 2.5vw, 1.75rem);
  background: #fff;
  color: #263949;
  border: 1px solid #dfe7ea;
  border-block-start: .38rem solid var(--document-accent);
  border-radius: 9px;
  box-shadow: 0 6px 18px rgb(18 44 60 / 7%);
  font-family: Arial, "Geeza Pro", "Segoe UI", sans-serif;
  font-size: .96rem;
  line-height: 1.58;
  overflow-wrap: anywhere;
}
.document-heading { padding-block-end: 1rem; border-block-end: 1px solid var(--document-accent); }
.document-preview .document-title {
  font-size: clamp(1.55rem, 3vw, 2.55rem);
  color: var(--document-accent);
  line-height: 1.18;
  margin: 0;
}
.document-preview .document-subtitle { margin: .45rem 0 0; font-size: .97em; color: #465c6a; white-space: pre-line; }
.document-logo { display: block; inline-size: auto; max-inline-size: 7rem; max-block-size: 3.15rem; margin-block-end: .7rem; object-fit: contain; }
.document-section { margin-block-start: 1.15rem; }
.document-section h3 { color: var(--document-accent); margin-block: 0 .4rem; font-size: 1.08em; line-height: 1.32; }
.document-section p { margin-block: 0 .45rem; white-space: pre-line; }
.document-section ul { margin-block: .2rem .6rem; padding-inline-start: 1.35rem; }
.document-section li { margin-block: .18rem; white-space: pre-line; }
.document-section a { color: var(--document-accent); }
.document-preview[data-variant="compact"] .document-heading { padding-block-end: .55rem; }
.document-preview[data-variant="compact"] .document-section { margin-block-start: .68rem; }
.document-preview[data-variant="compact"] .document-section p { margin-block-end: .3rem; }
.document-table { overflow-x: auto; }
.document-table table { inline-size: 100%; border-collapse: collapse; table-layout: fixed; }
.document-table th, .document-table td { border: 1px solid #acbec5; padding: .38rem .48rem; vertical-align: top; text-align: start; }
.document-table th { background: #eff4f7; color: var(--document-accent); }
.document-preview .italic { font-style: italic; }
.document-preview .bold { font-weight: bold; }
.document-preview .hanging { padding-inline-start: 1.5rem; text-indent: -1.5rem; }
#print-copy { display: none; }

@media (max-width: 760px) {
  .shell { inline-size: calc(100% - 1.5rem); }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .nav { min-block-size: 60px; }
}
@media (max-width: 460px) {
  .field-grid { grid-template-columns: minmax(0, 1fr); }
  .brand { font-size: 1rem; }
  .tool-actions > * { flex: 1 1 auto; }
}

@page { size: A4; margin: 15mm 15mm 16mm; }
@media print {
  html, body { margin: 0 !important; padding: 0 !important; block-size: auto !important; background: #fff !important; }
  body:has(> #print-copy) > :not(#print-copy) { display: none !important; }
  #print-copy {
    display: block !important;
    position: static !important;
    inline-size: 100% !important;
    max-inline-size: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-size: 11pt;
    text-align: start;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  #print-copy .document-title { font-size: 26pt; }
  #print-copy[data-variant="compact"] .document-title { font-size: 22pt; }
  #print-copy .document-heading, #print-copy h3 { break-inside: avoid; break-after: avoid; }
  #print-copy .document-section { break-inside: auto; }
  #print-copy p, #print-copy li { orphans: 2; widows: 2; }
  #print-copy .document-table { overflow: visible; }
  #print-copy tr { break-inside: avoid; }
  #print-copy .hanging { padding-inline-start: .5in; text-indent: -.5in; }
}

.local-draft {
  border: 1px solid var(--line);
  background: var(--background);
  padding: .82rem .92rem;
  border-radius: .8rem;
}
.local-draft-label { display: flex; gap: .55rem; align-items: center; font-weight: 700; }
.local-draft-label input { flex: none; margin: 0; inline-size: 1.15rem; block-size: 1.15rem; }
.local-draft .help, .usage-disclosure .help { margin-block: .4rem .6rem; }
.local-draft .status, .usage-disclosure .status { margin-block-end: 0; }
.local-draft .status:empty, .usage-disclosure .status:empty { display: none; }
.local-draft-actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.local-draft-actions .button { padding: .42rem .62rem; font-size: .86rem; }
.usage-disclosure { margin-block-start: .55rem; font-size: .9rem; }
.usage-disclosure summary { cursor: pointer; color: var(--accent-shade); min-block-size: 32px; width: fit-content; }
.service-referral {
  background: var(--accent-soft);
  border: 1px solid var(--line);
  padding: clamp(.9rem, 2vw, 1.3rem);
  border-radius: .9rem;
}
.service-referral .service-referral-copy h3 { color: var(--ink); margin: 0 0 .4rem; font-size: 1.07rem; line-height: 1.3; }
.service-referral .service-referral-copy p { color: var(--muted); margin: 0 0 .72rem; font-size: .94rem; line-height: 1.55; }
.service-referral-actions { display: flex; flex-wrap: wrap; align-items: stretch; gap: .55rem; }
.service-referral-actions .button { flex: 1 1 max-content; }
.whatsapp-button {
  background: #126445;
  border-color: #126445;
  color: #fff;
}
.whatsapp-button:hover {
  background: #0a4d35;
  border-color: #0a4d35;
  color: #fff;
}

@media print {
  #print-copy[lang="ar"] {
    font-family: Arial, Tahoma, "Geeza Pro", sans-serif;
    font-size: 12pt;
    line-height: 1.57;
  }
}
