/* MyManarah — shared styles */
:root {
  --deep: #12384A;      /* deep water: text, footer */
  --harbour: #1B7A93;   /* harbour blue: links, accents */
  --lamp: #FFC94A;      /* lamp light: main action colour */
  --sky: #EAF6F8;       /* sky wash: soft backgrounds */
  --shell: #FFF6E3;     /* warm shell: homey panels */
  --white: #ffffff;
  --ink: #12384A;       /* text and outlines */
  --page: #ffffff;      /* page background */
  --line: #9fc4cf;      /* form field borders */
  --on-lamp: #12384A;   /* text on the yellow */
  --footer-bg: #12384A;
  --display: "Young Serif", Georgia, serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--page);
}
img, svg { max-width: 100%; display: block; }
a { color: var(--harbour); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--harbour); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.15; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; max-width: 62ch; }
.lead { font-size: 1.25rem; line-height: 1.5; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.band { padding-block: clamp(3rem, 7vw, 5.5rem); }
.band-sky { background: var(--sky); }
.band-shell { background: var(--shell); }

/* Header */
.site-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.75rem 2rem;
  width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto;
  padding-block: 1.1rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--display); font-size: 1.5rem; color: var(--ink); text-decoration: none;
}
.brand svg { width: 34px; height: 34px; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1.4rem; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 500; padding-block: 0.3rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { box-shadow: 0 3px 0 var(--lamp); }

/* Buttons */
.btn {
  display: inline-block; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  padding: 0.8rem 1.4rem; border-radius: 999px; border: 2px solid var(--ink);
  background: var(--page); color: var(--ink);
}
.btn-lamp { background: var(--lamp); color: var(--on-lamp); }
.btn:hover { background: var(--ink); color: var(--page); }
.site-nav a.btn { padding: 0.55rem 1.1rem; box-shadow: none; }
.site-nav a.btn-lamp { color: var(--on-lamp); }
.site-nav a.btn-lamp:hover { color: var(--page); }
html[data-theme="dark"] .site-nav a.btn-lamp:hover { color: var(--on-lamp); }
.actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.6rem; }

/* Home hero */
.hero { background: linear-gradient(var(--sky), var(--page)); overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: 2rem;
  padding-block: clamp(2rem, 5vw, 4rem) 0;
}
.hero-art { align-self: end; }
.beam { transform-origin: 260px 158px; animation: sweep 9s ease-in-out infinite alternate; }
@keyframes sweep { from { transform: rotate(-7deg); } to { transform: rotate(7deg); } }
@media (prefers-reduced-motion: reduce) {
  .beam { animation: none; }
  html { scroll-behavior: auto; }
}

/* Page title band with star pattern */
.page-title {
  background-color: var(--sky);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%231B7A93' stroke-opacity='.16' stroke-width='1.5'%3E%3Crect x='20' y='20' width='32' height='32'/%3E%3Crect x='20' y='20' width='32' height='32' transform='rotate(45 36 36)'/%3E%3C/g%3E%3C/svg%3E");
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}
.page-title p { margin-bottom: 0; }

/* Supports list */
.supports { list-style: none; margin: 2rem 0 0; padding: 0; }
.supports li {
  display: grid; grid-template-columns: 4rem 1fr; gap: 1.5rem;
  padding-block: 1.8rem; border-top: 2px solid var(--sky);
}
.supports li:last-child { border-bottom: 2px solid var(--sky); }
.supports svg { width: 3.4rem; height: 3.4rem; }
.supports ul { padding-left: 1.2rem; margin: 0; }

/* Steps (a real sequence) */
.steps { list-style: none; counter-reset: step; margin: 2rem 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: grid; place-items: center; width: 2.6rem; height: 2.6rem; margin-bottom: 0.8rem;
  font-family: var(--display); font-size: 1.2rem;
  background: var(--lamp); color: var(--on-lamp); border-radius: 50%;
}

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }

.values { list-style: none; padding: 0; margin: 0; }
.values li { padding: 1.1rem 0 1.1rem 1.4rem; border-left: 4px solid var(--lamp); margin-bottom: 1.2rem; }
.values strong { display: block; font-family: var(--display); font-weight: 400; font-size: 1.25rem; }

/* Blog */
.post-list { list-style: none; padding: 0; margin: 0 0 3rem; }
.post-list li { padding-block: 0.9rem; border-bottom: 2px solid var(--sky); }
.post-list a { font-family: var(--display); font-size: 1.3rem; text-decoration: none; }
.post { max-width: 68ch; padding-block: 2.5rem; border-top: 2px solid var(--sky); }
.post time { color: var(--harbour); font-weight: 500; }

/* Form */
form { display: grid; gap: 1.1rem; }
label { font-weight: 600; display: grid; gap: 0.35rem; }
input, select, textarea {
  font: inherit; color: inherit; width: 100%;
  padding: 0.75rem 0.9rem; border: 2px solid var(--line); border-radius: 10px; background: var(--page);
}
input:focus, select:focus, textarea:focus { border-color: var(--harbour); outline: 3px solid var(--sky); }
.hidden { position: absolute; left: -9999px; }
.contact-card { background: var(--shell); border-radius: 18px; padding: 1.8rem; }
details { border-bottom: 2px solid var(--sky); }
summary { font-weight: 600; cursor: pointer; padding-block: 1rem; }
details p { margin: 0 0 1rem; }

/* Footer */
.site-footer { background: var(--footer-bg); color: #d9eaef; padding-block: 3rem 2rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.site-footer .brand { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.4rem; }
.legal { margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid #2f5668; font-size: 0.92rem; }
.legal p { max-width: none; margin: 0; }

@media (max-width: 820px) {
  .hero-grid, .two-col, .footer-grid { grid-template-columns: 1fr; }
  .hero-art { width: 100%; max-width: 340px; margin-inline: auto; }
  .steps { grid-template-columns: 1fr 1fr; }
  .supports li { grid-template-columns: 3rem 1fr; gap: 1rem; }
  .supports svg { width: 2.6rem; height: 2.6rem; }
}
@media (max-width: 480px) { .steps { grid-template-columns: 1fr; } }

/* Services page: illustrated service rows */
.service {
  display: grid; grid-template-columns: 0.9fr 1.1fr; align-items: center;
  gap: clamp(1.5rem, 5vw, 4rem); padding-block: clamp(1.5rem, 4vw, 2.75rem);
}
.service:nth-of-type(even) { grid-template-columns: 1.1fr 0.9fr; }
.service:nth-of-type(even) .service-art { order: 2; }
.service-art { background: #EAF6F8; border-radius: 28px; padding: 1.25rem 1.5rem 0; overflow: hidden; }
.service-art-shell { background: #FFF6E3; }
.service-art svg { width: 100%; height: auto; }
.ticks { list-style: none; padding: 0; margin: 1.4rem 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.75rem; }
.ticks li { position: relative; padding-left: 2.2rem; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 0.1em; width: 1.5rem; height: 1.5rem; border-radius: 50%;
  background: var(--lamp) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%2312384A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 70% no-repeat;
}
@media (max-width: 820px) {
  .service, .service:nth-of-type(even) { grid-template-columns: 1fr; }
  .service:nth-of-type(even) .service-art { order: 0; }
}
@media (max-width: 480px) { .ticks { grid-template-columns: 1fr; } }

/* Dark mode: switched on by the toggle in the menu */
html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #E4F0F3;
  --page: #0E2530;
  --harbour: #6CC4DA;
  --sky: #14323F;
  --shell: #25343A;
  --line: #3C6474;
  --footer-bg: #091A22;
}
html[data-theme="dark"] .hero-art [stroke="#12384A"],
html[data-theme="dark"] .supports [stroke="#12384A"] { stroke: #8CC6D6; }
html[data-theme="dark"] .hero-art [fill="#12384A"] { fill: #8CC6D6; }
html[data-theme="dark"] .supports [fill="#FFF6E3"],
html[data-theme="dark"] .supports [fill="#EAF6F8"] { fill: #14323F; }
html[data-theme="dark"] .btn-lamp:hover { color: var(--on-lamp); }

.theme-toggle {
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0;
  border: 2px solid var(--ink); border-radius: 50%;
  background: var(--page); color: var(--ink); cursor: pointer;
}
.theme-toggle:hover { background: var(--ink); color: var(--page); }
.theme-toggle svg { width: 1.3rem; height: 1.3rem; }
.theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
