/* NarHosts site styles. Colours are defined once here as "tokens" so the whole
   site can be re-themed by changing a few lines. The site is always dark,
   in black and gold to match the pomegranate logo. */
:root {
    color-scheme: dark;
    --gold: #d9b26a;          /* main accent, from the logo */
    --gold-light: #f1dca6;    /* top of the logo's gold gradient */
    --gold-dark: #a97a35;     /* bottom of the logo's gold gradient */
    --on-gold: #141210;       /* text placed on gold */
    --ink: #ece7df;           /* main text, warm off-white */
    --muted: #a39d94;         /* secondary text */
    --bg: #0b0b0c;            /* page background */
    --bg-soft: #121214;       /* alternate section background */
    --card: #161618;
    --line: #2a2724;          /* borders */
    --radius: 12px;
    --max: 1120px;            /* page content width */
    --gold-gradient: linear-gradient(180deg, var(--gold-light), var(--gold-dark));
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 17px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
}

a { color: var(--gold); }
a:hover { color: var(--gold-light); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
p { margin: 0 0 1em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.gold-text { background: var(--gold-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.header-row { display: flex; align-items: center; gap: 24px; min-height: 64px; flex-wrap: wrap; padding-block: 8px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.25rem; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand { gap: 10px; }
.brand-logo { height: 38px; width: auto; display: block; }
.brand-footer .brand-logo { height: 30px; }
.main-nav { display: flex; gap: 20px; flex: 1; flex-wrap: wrap; }
.main-nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.main-nav a:hover { color: var(--gold); }

/* Buttons */
.btn { display: inline-block; padding: 12px 22px; border-radius: 999px; background: var(--gold-gradient); color: var(--on-gold); text-decoration: none; font-weight: 600; border: 2px solid var(--gold); }
.btn:hover { color: var(--on-gold); filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--gold); }
.btn-ghost:hover { background: var(--gold); color: var(--on-gold); filter: none; }
.btn-small { padding: 7px 16px; font-size: .9rem; }

/* Sections */
.hero { padding: 72px 0 56px; background: radial-gradient(ellipse at 80% 0%, rgba(217, 178, 106, .12), transparent 60%); }
.hero p.lead { font-size: 1.2rem; color: var(--muted); max-width: 640px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center; }
.hero-art { width: 100%; height: auto; max-width: 520px; justify-self: end; }
.card-icon { display: block; width: 44px; height: 44px; margin-bottom: 14px; }
.section { padding: 56px 0; }
.section-soft { background: var(--bg-soft); }
.page-head { padding: 48px 0 8px; }

/* Cards */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h3 { font-size: 1.15rem; }
.card p:last-child { margin-bottom: 0; }
.tag { display: inline-block; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--gold); margin-bottom: 8px; }

/* Clickable cards (Services page) */
.card-link { display: block; color: var(--ink); text-decoration: none; transition: border-color .15s; }
.card-link:hover { color: var(--ink); border-color: var(--gold); }
.card-link .more { color: var(--gold); font-weight: 600; }

/* Single service page */
.back-link { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 24px; text-decoration: none; }
.back-link::before { content: "\2190"; }
.page-icon { width: 56px; height: 56px; }
.page-head .lead { font-size: 1.2rem; max-width: 720px; }
.intro { font-size: 1.1rem; max-width: 760px; margin-bottom: 32px; }
.fine-print { margin-top: 24px; max-width: 760px; }
.grid-2x2 { grid-template-columns: repeat(2, 1fr); }   /* four cards: two rows of two */

/* Forms (Contact / waiting list) */
.form-card { max-width: 720px; padding: 32px; }
.field { margin: 0 0 20px; padding: 0; border: 0; min-width: 0; }
.field > label, .field legend { display: block; font-weight: 600; margin-bottom: 6px; padding: 0; }
.field input:not([type="checkbox"]), .field textarea {
    width: 100%; padding: 11px 14px; font: inherit; color: var(--ink);
    background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
.check-grid { display: grid; gap: 8px 20px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; color: var(--muted); }
.check input { width: 18px; height: 18px; margin: 4px 0 0; flex: none; accent-color: var(--gold); }
.field-error { display: block; color: #f0907a; font-size: .9rem; margin-top: 4px; }
.field-error:empty { display: none; }
.form-alert { border: 1px solid #f0907a; color: #f0907a; border-radius: 8px; padding: 10px 14px; }
.trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[dir="rtl"] .field input[dir="ltr"] { text-align: right; }

/* Legal pages */
.legal { max-width: 780px; }
.legal h2 { font-size: 1.3rem; margin-top: 2em; }
.legal ul { padding-inline-start: 1.4em; margin: 0 0 1em; }
.legal li { margin-bottom: .45em; }
.legal li strong { color: var(--ink); }
.notice { max-width: 780px; border: 1px solid var(--gold); border-radius: 8px; padding: 12px 16px; color: var(--gold-light); background: rgba(217, 178, 106, .08); }
.notice-soft { border-color: var(--line); color: var(--muted); background: none; }
.todo { background: rgba(217, 178, 106, .18); color: var(--gold-light); border: 1px dashed var(--gold); border-radius: 4px; padding: 0 4px; }
.legal-other { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); max-width: 780px; }
.legal-other h2 { font-size: 1.1rem; }
.legal-other ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }

/* Help guides */
.help-sections { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.help-section-title { font-size: 1.2rem; }
.help-list { list-style: none; padding: 0; margin: 0; }
.help-list li { padding: 10px 0; border-top: 1px solid var(--line); }
.help-list a { display: block; font-weight: 600; text-decoration: none; }
.prose { max-width: 780px; }
.prose h2 { font-size: 1.3rem; margin-top: 1.8em; }
.prose ul { padding-inline-start: 1.4em; }
.prose li { margin-bottom: .45em; }
code { font-family: Consolas, "Cascadia Mono", Menlo, monospace; font-size: .9em; color: var(--gold-light); background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; direction: ltr; unicode-bidi: isolate; }
.code-frame { direction: ltr; display: flex; flex-direction: column; margin: 0 0 1.2em; }
.prose pre { direction: ltr; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; overflow-x: auto; margin: 0 0 1.2em; }
.code-frame pre { margin: 0; }
.prose pre code { background: none; border: 0; padding: 0; color: var(--ink); white-space: pre; }
.copy-btn { align-self: flex-end; margin-bottom: 4px; font: inherit; font-size: .8rem; color: var(--gold); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 3px 10px; cursor: pointer; }
.copy-btn:hover { border-color: var(--gold); }
.dns-table { border-collapse: collapse; width: 100%; margin: 0 0 1em; font-size: .95rem; display: block; overflow-x: auto; }
.dns-table th, .dns-table td { border: 1px solid var(--line); padding: 8px 12px; text-align: start; white-space: nowrap; }
.dns-table th { background: var(--card); }
.guide-link { margin-top: 24px; }

/* Language switch */
.lang-switch { color: var(--muted); text-decoration: none; font-weight: 500; }
.lang-switch:hover { color: var(--gold); }

/* VPS plan cards */
.plan-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.plan-card { position: relative; display: flex; flex-direction: column; }
.plan-popular { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 12px 40px rgba(217, 178, 106, .12); }
.plan-badge { position: absolute; top: -12px; inset-inline-end: 16px; background: var(--gold-gradient); color: var(--on-gold); font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.price { font-size: 2rem; font-weight: 700; margin: 4px 0 16px; }
.price .muted { font-size: 1rem; font-weight: 400; }
.spec-list { list-style: none; padding: 0; margin: 0 0 24px; flex: 1; }
.spec-list li { padding: 7px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.spec-list strong { color: var(--ink); }
.btn-block { display: block; text-align: center; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 24px; margin-top: 40px; }
.footer-row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 16px; }
.brand-footer { font-size: 1.1rem; }
.footer-nav { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-nav a { color: var(--muted); text-decoration: none; }
.footer-nav a:hover { color: var(--gold); }

/* Arabic (right-to-left). Layout flips automatically; these fix the rest.
   Letter spacing breaks joined Arabic letters, so it is switched off. */
[dir="rtl"] body { font-family: "Segoe UI", Tahoma, "Noto Sans Arabic", system-ui, sans-serif; line-height: 1.8; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { letter-spacing: 0; line-height: 1.35; }
[dir="rtl"] .tag { letter-spacing: 0; text-transform: none; font-size: .85rem; }
[dir="rtl"] .hero { background: radial-gradient(ellipse at 20% 0%, rgba(217, 178, 106, .12), transparent 60%); }
[dir="rtl"] .back-link::before { content: "\2192"; }
/* Keep values such as "1 GB" together, reading left to right, inside Arabic text. */
[dir="rtl"] .spec-list strong { direction: ltr; unicode-bidi: isolate; display: inline-block; }

@media (max-width: 640px) {
    /* Phones: logo and button on the first row, menu on its own row below. */
    .header-row { gap: 8px 12px; justify-content: space-between; }
    .main-nav { order: 3; flex-basis: 100%; gap: 18px; }
    .grid-2x2 { grid-template-columns: 1fr; }
    .hero { padding: 48px 0 40px; }
}

@media (max-width: 860px) {
    /* Tablets and phones: illustration goes under the text, smaller. */
    .hero-grid { grid-template-columns: 1fr; }
    .hero-art { max-width: 360px; justify-self: center; }
}
