/* =====================================================================
   Cloud Financial Group — styles.css
   Premium carbon + orange financial aesthetic (brand blue from logo). Plain CSS, no dependencies.
   ===================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Surface / carbon ramp (neutral graphite, no blue tint) */
  --carbon-900: #08090B;
  --carbon-850: #0E0F12;
  --carbon-800: #141519;
  --carbon-750: #1A1C21;
  --carbon-700: #22252B;

  /* Blue accent ramp (matches the brand mark / logo azure) */
  --blue-700: #103E8E;
  --blue-600: #1560D8;
  --blue-500: #1E7AF5;
  --blue-400: #4F97FF;

  /* Restrained orange accent */
  --accent: #FF7A29;
  --accent-soft: #FF9E5C;

  /* Text */
  --ink: #F4F6FA;
  --muted: #AAB4C4;
  --muted-2: #76808F;

  /* Lines & glass */
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --card: rgba(255, 255, 255, 0.028);
  --card-hover: rgba(255, 255, 255, 0.05);

  /* Type */
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;

  /* Spacing & shape */
  --maxw: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 18px 50px -22px rgba(0, 0, 0, 0.75);
  --shadow-blue: 0 22px 60px -26px rgba(29, 78, 216, 0.65);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background-color: var(--carbon-850);
  line-height: 1.6;
  font-size: 17px;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  /* Content-copy deterrent (see README "Content protection"). Form fields remain selectable below. */
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
/* Keep all form controls fully selectable / pasteable */
input, textarea, select, [contenteditable="true"] {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}
/* Images can't be dragged out / saved by drag */
img { -webkit-user-drag: none; -khtml-user-drag: none; user-select: none; }

/* Layered atmospheric background: radial blue glows + faint grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(115% 80% at 88% -10%, rgba(30, 122, 245, 0.16), transparent 55%),
    radial-gradient(80% 70% at -8% 8%, rgba(255, 122, 41, 0.10), transparent 52%),
    radial-gradient(100% 60% at 50% 122%, rgba(34, 37, 43, 0.6), transparent 60%),
    linear-gradient(180deg, var(--carbon-850), var(--carbon-900));
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.4;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}

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

a { color: inherit; text-decoration: none; }

button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

:focus-visible {
  outline: 2px solid var(--blue-400);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(2.75rem, 5vw, 4.5rem); position: relative; }
/* Faint alternating bands so sections read as distinct panels */
#calculators, #why { background-color: rgba(255, 255, 255, 0.022); }
/* Gradient hairline between sections (services is preceded by the strip's own border) */
.section:not(.hero):not(#services)::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(var(--maxw), calc(100% - 2 * var(--gutter)));
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16) 20%, rgba(255, 255, 255, 0.16) 80%, transparent);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-soft);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.section-head { max-width: 720px; margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem); }
.section-head h2 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin-top: 0.7rem;
}
.section-head p {
  color: var(--muted);
  font-size: 1.075rem;
  margin-top: 1.1rem;
  max-width: 60ch;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--blue-600);
  color: #fff;
  padding: 0.7rem 1.1rem;
  border-radius: 0 0 10px 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  padding: 0.9rem 1.5rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.96rem;
  letter-spacing: 0.01em;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 1.05em; height: 1.05em; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: linear-gradient(135deg, var(--blue-500), var(--blue-600) 70%, var(--blue-700));
  color: #fff;
  box-shadow: var(--shadow-blue);
  border: 1px solid rgba(120, 165, 255, 0.4);
}
.btn--primary:hover { box-shadow: 0 26px 70px -24px rgba(30, 122, 245, 0.85); }

.btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--blue-400); }

.btn--accent {
  background: transparent;
  border: 1px solid rgba(200, 160, 78, 0.55);
  color: var(--accent-soft);
}
.btn--accent:hover { background: rgba(200, 160, 78, 0.1); border-color: var(--accent); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(12, 13, 16, 0.82);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
  box-shadow: 0 10px 40px -28px rgba(0, 0, 0, 0.9);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 78px;
}

/* Brand */
.brand { display: inline-flex; align-items: center; }
.brand__logo {
  height: 38px;
  width: auto;
  display: block;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.5));
}

/* Primary nav */
.nav { display: flex; align-items: center; gap: 0.4rem; }
.nav__links { display: flex; align-items: center; gap: 0.3rem; list-style: none; padding: 0; }
.nav__links a {
  position: relative;
  padding: 0.55rem 0.95rem;
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--muted);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0.95rem;
  right: 0.95rem;
  bottom: 0.35rem;
  height: 1.5px;
  background: linear-gradient(90deg, var(--blue-400), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { transform: scaleX(1); }

.nav__cta { display: inline-flex; align-items: center; gap: 0.75rem; margin-left: 0.6rem; }

.phone-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.55rem 0.6rem;
  border-radius: 10px;
  color: var(--ink);
  transition: color 0.2s var(--ease);
}
.phone-cta svg { width: 18px; height: 18px; color: var(--blue-400); }
.phone-cta:hover { color: var(--blue-400); }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  position: relative;
}
.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease), top 0.3s var(--ease);
}
.menu-toggle span { top: 50%; }
.menu-toggle span::before { top: -6px; }
.menu-toggle span::after { top: 6px; }
.menu-toggle[aria-expanded="true"] span { background: transparent; }
.menu-toggle[aria-expanded="true"] span::before { top: 0; transform: translateX(-50%) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span::after { top: 0; transform: translateX(-50%) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: clamp(3.5rem, 9vw, 7rem) clamp(2.25rem, 5vw, 3.75rem); }
.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero__tag { margin-bottom: 1.5rem; }
.hero h1 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(2.6rem, 6.2vw, 4.5rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
}
.hero h1 .accent {
  background: linear-gradient(120deg, var(--blue-400), var(--blue-500) 55%, var(--accent-soft));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__lead {
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  max-width: 56ch;
  margin-top: 1.6rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.2rem; }
/* Hero visual — abstract layered glass panel with the mark */
.hero__visual { position: relative; aspect-ratio: 1 / 1.05; }
.hero__panel {
  position: absolute;
  inset: 0;
  border-radius: 26px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(160deg, rgba(30, 122, 245, 0.14), rgba(16, 18, 22, 0.6));
  box-shadow: var(--shadow-md);
  overflow: hidden;
  backdrop-filter: blur(4px);
}
.hero__panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 70% 25%, rgba(79, 147, 255, 0.35), transparent 60%),
    radial-gradient(50% 50% at 25% 85%, rgba(200, 160, 78, 0.12), transparent 60%);
}
.hero__ring {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
}
.hero__ring--1 { inset: 12%; }
.hero__ring--2 { inset: 26%; border-color: rgba(79, 147, 255, 0.18); }
.hero__ring--3 { inset: 40%; border-color: rgba(200, 160, 78, 0.18); }
.hero__mark {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 46%;
  filter: drop-shadow(0 18px 40px rgba(30, 122, 245, 0.5));
  animation: floaty 7s ease-in-out infinite;
}
.hero__chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  border-radius: 14px;
  background: rgba(12, 13, 16, 0.7);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(8px);
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.hero__chip svg { width: 18px; height: 18px; color: var(--accent-soft); }
.hero__chip--a { top: 8%; left: -6%; animation: floaty 6s ease-in-out infinite; }
.hero__chip--b { bottom: 10%; right: -8%; animation: floaty 8s ease-in-out 0.5s infinite; }

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ---------- Service strip (marquee-style row) ---------- */
.strip {
  border-block: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
}
.strip__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 0.5rem;
  align-items: center;
  justify-content: center;
  padding-block: 1.4rem;
}
.strip__item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.strip__item .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex: none; }

/* ---------- Services grid ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.25rem;
}
.card {
  position: relative;
  padding: 2rem 1.85rem 1.9rem;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease),
    background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--blue-400), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.card:hover {
  transform: translateY(-6px);
  background: var(--card-hover);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}
.card:hover::before { transform: scaleX(1); }
.card__icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, rgba(30, 122, 245, 0.22), rgba(30, 122, 245, 0.05));
  border: 1px solid rgba(79, 147, 255, 0.28);
  margin-bottom: 1.3rem;
}
.card__icon svg { width: 26px; height: 26px; color: var(--blue-400); }
.card h3 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.card p { color: var(--muted); font-size: 0.98rem; margin-top: 0.6rem; }
.card__tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1.2rem; }
.card__tags span {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--muted-2);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
}

/* ---------- Approach / process ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 2.2rem 1.85rem;
  border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
  border: 1px solid var(--line);
}
.step__num {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(120deg, var(--blue-400), var(--accent-soft));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.step h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 0.9rem;
}
.step p { color: var(--muted); font-size: 0.97rem; margin-top: 0.55rem; }

/* ---------- Why us ---------- */
.why { position: relative; }
.why__grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.why__title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0.7rem 0 1.5rem;
}
.contact-line--static { cursor: default; }
.contact-line--static:hover { transform: none; border-color: var(--line); background: var(--card); }
.why__panel {
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: linear-gradient(160deg, rgba(30, 122, 245, 0.12), rgba(16, 18, 22, 0.5));
  padding: clamp(1.8rem, 4vw, 2.8rem);
  box-shadow: var(--shadow-md);
}
.why__panel ul { list-style: none; padding: 0; display: grid; gap: 1.2rem; }
.why__panel li { display: flex; gap: 1rem; }
.why__panel li svg { width: 22px; height: 22px; color: var(--accent-soft); flex: none; margin-top: 3px; }
.why__panel li strong { display: block; font-size: 1.05rem; }
.why__panel li span { color: var(--muted); font-size: 0.95rem; }

.feature-list { display: grid; gap: 1.5rem; }
.feature {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.1rem;
  align-items: start;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.feature:last-child { border-bottom: 0; padding-bottom: 0; }
.feature__ic {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(30, 122, 245, 0.12);
  border: 1px solid rgba(79, 147, 255, 0.25);
}
.feature__ic svg { width: 22px; height: 22px; color: var(--blue-400); }
.feature h3 { font-size: 1.12rem; font-weight: 650; }
.feature p { color: var(--muted); font-size: 0.96rem; margin-top: 0.3rem; }

/* ---------- Contact ---------- */
.contact__grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}
.contact__info { display: grid; gap: 1.1rem; align-content: start; }
.contact-line {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius-sm);
  background: var(--card);
  border: 1px solid var(--line);
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}
.contact-line:hover { border-color: var(--blue-400); background: var(--card-hover); transform: translateX(3px); }
.contact-line__ic {
  width: 44px; height: 44px; flex: none;
  border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, rgba(30, 122, 245, 0.22), rgba(30, 122, 245, 0.05));
  border: 1px solid rgba(79, 147, 255, 0.28);
}
.contact-line__ic svg { width: 22px; height: 22px; color: var(--blue-400); }
.contact-line__label { font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-2); }
.contact-line__value { font-weight: 600; font-size: 1.05rem; }

/* Form */
.form-card {
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012));
  padding: clamp(1.6rem, 4vw, 2.4rem);
  box-shadow: var(--shadow-md);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: 0.45rem; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.field label .req { color: var(--accent-soft); }
.field input,
.field select,
.field textarea {
  font: inherit;
  font-size: 0.97rem;
  color: var(--ink);
  background: rgba(12, 13, 16, 0.55);
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  padding: 0.8rem 0.95rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input::placeholder,
.field textarea::placeholder { color: var(--muted-2); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue-400);
  box-shadow: 0 0 0 3px rgba(79, 147, 255, 0.2);
  background: rgba(12, 13, 16, 0.8);
}
.field select { appearance: none; cursor: pointer; }
.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 1.4rem;
}
.form-note { font-size: 0.82rem; color: var(--muted-2); max-width: 42ch; }
.form-status { font-size: 0.9rem; color: var(--accent-soft); min-height: 1.2em; margin-top: 0.6rem; }
.form-status.is-ok { color: var(--blue-400); }
.form-status.is-error { color: #ff8a8a; }
/* Honeypot — hidden from people, present for bots */
.hp-field { position: absolute !important; left: -9999px !important; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Repayment calculator ---------- */
.calc-card {
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012));
  padding: clamp(1.6rem, 4vw, 2.5rem);
  box-shadow: var(--shadow-md);
}
.calc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: stretch;
}
.calc-controls { display: grid; gap: 1.6rem; align-content: start; min-width: 0; }
.calc-result { min-width: 0; }
/* Budget uses a stacked layout (inputs full width, result below) */
.calc-grid--stack { grid-template-columns: 1fr; }
.calc-grid--stack .calc-budget-grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 620px) { .calc-grid--stack .calc-budget-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .calc-grid--stack .calc-budget-grid { grid-template-columns: 1fr; } }
.calc-budget-grid { min-width: 0; }
.calc-budget-grid > *, .calc-field--inline { min-width: 0; }
.calc-budget-grid .calc-num input { width: 6ch; }
.calc-field__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 0.7rem; }
.calc-field label { font-size: 0.9rem; font-weight: 600; color: var(--muted); }
.calc-num {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  background: rgba(12, 13, 16, 0.6);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 0.35rem 0.65rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.calc-num:focus-within { border-color: var(--blue-400); box-shadow: 0 0 0 3px rgba(79, 147, 255, 0.18); }
.calc-num__prefix, .calc-num__suffix { color: var(--muted-2); font-size: 0.86rem; }
.calc-num input {
  width: 8ch;
  text-align: right;
  font: inherit;
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--ink);
  background: transparent;
  border: 0;
}
.calc-num input:focus { outline: none; }
.calc-num input::-webkit-outer-spin-button,
.calc-num input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.calc-num input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

.calc-range {
  width: 100%;
  height: 26px;
  margin: 0;
  accent-color: var(--blue-500);
  cursor: pointer;
}
.calc-field__scale { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--muted-2); margin-top: 0.15rem; }

.calc-field--freq label { display: block; margin-bottom: 0.7rem; }
.calc-field--freq select {
  width: 100%;
  font: inherit;
  font-size: 0.97rem;
  color: var(--ink);
  background: rgba(12, 13, 16, 0.6);
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  padding: 0.75rem 0.95rem;
  appearance: none;
  cursor: pointer;
}
.calc-field--freq select:focus { outline: none; border-color: var(--blue-400); box-shadow: 0 0 0 3px rgba(79, 147, 255, 0.18); }

.calc-result {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(160deg, rgba(30, 122, 245, 0.13), rgba(16, 18, 22, 0.55));
  padding: clamp(1.4rem, 3vw, 1.9rem);
}
.calc-result__label { font-size: 0.76rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-2); }
.calc-result__big {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(2.1rem, 5vw, 3rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin-top: 0.35rem;
}
.calc-result__per { font-family: var(--font-sans); font-size: 1rem; font-weight: 600; color: var(--muted); margin-left: 0.4rem; }
.calc-result__rows { display: grid; gap: 0; margin-top: 1.5rem; }
.calc-result__rows > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}
.calc-result__rows dt { color: var(--muted); font-size: 0.92rem; }
.calc-result__rows dd { font-weight: 700; font-size: 1rem; }
.calc-bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; margin-top: 1.5rem; background: rgba(255, 255, 255, 0.06); }
.calc-bar__principal { background: linear-gradient(90deg, var(--blue-600), var(--blue-400)); transition: width 0.35s var(--ease); }
.calc-bar__interest { background: linear-gradient(90deg, var(--accent), var(--accent-soft)); transition: width 0.35s var(--ease); }
.calc-bar__legend { display: flex; gap: 1.3rem; margin-top: 0.7rem; font-size: 0.8rem; color: var(--muted); }
.calc-bar__legend .lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 0.4rem; vertical-align: middle; }
.lg--p { background: var(--blue-500); }
.lg--i { background: var(--accent); }
.calc-cta { margin-top: 1.7rem; align-self: flex-start; }
.calc-note { margin-top: 1.6rem; font-size: 0.78rem; line-height: 1.62; color: var(--muted-2); }

@media (max-width: 820px) {
  .calc-grid { grid-template-columns: 1fr; }
}

/* Calculator hub tiles */
.calc-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.1rem;
}
.calc-tile {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  text-align: left;
  padding: 1.35rem 1.45rem;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.calc-tile::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--blue-400), var(--accent));
  transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease);
}
.calc-tile:hover, .calc-tile:focus-visible {
  transform: translateY(-4px); background: var(--card-hover); border-color: var(--line-strong); box-shadow: var(--shadow-md);
}
.calc-tile:hover::before, .calc-tile:focus-visible::before { transform: scaleX(1); }
.calc-tile__ic {
  width: 48px; height: 48px; flex: none; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(150deg, rgba(30, 122, 245, 0.22), rgba(30, 122, 245, 0.05));
  border: 1px solid rgba(79, 151, 255, 0.28);
}
.calc-tile__ic svg { width: 24px; height: 24px; color: var(--blue-400); }
.calc-tile__txt { display: flex; flex-direction: column; gap: 0.2rem; flex: 1; }
.calc-tile__name { font-family: var(--font-serif); font-size: 1.1rem; font-weight: 700; }
.calc-tile__desc { font-size: 0.88rem; color: var(--muted); }
.calc-tile__arrow { width: 20px; height: 20px; flex: none; color: var(--muted-2); transition: transform 0.3s var(--ease), color 0.3s var(--ease); }
.calc-tile:hover .calc-tile__arrow, .calc-tile:focus-visible .calc-tile__arrow { color: var(--accent-soft); transform: translateX(3px); }

/* Calculator modal */
.calc-modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: clamp(0.75rem, 3vw, 2rem); }
.calc-modal[hidden] { display: none; }
.calc-modal__backdrop { position: absolute; inset: 0; background: rgba(4, 6, 10, 0.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.calc-modal__dialog {
  position: relative; width: 100%; max-width: 800px; max-height: 92vh;
  display: flex; flex-direction: column;
  border-radius: 20px; border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, var(--carbon-800), var(--carbon-850));
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9);
  overflow: hidden;
  animation: calcIn 0.28s var(--ease);
}
@keyframes calcIn { from { opacity: 0; transform: translateY(14px) scale(0.99); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .calc-modal__dialog { animation: none; } }
.calc-modal__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.05rem 1.3rem; border-bottom: 1px solid var(--line); }
.calc-modal__title { font-family: var(--font-serif); font-size: 1.2rem; font-weight: 700; }
.calc-modal__close { width: 40px; height: 40px; flex: none; border-radius: 11px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.03); color: var(--ink); display: grid; place-items: center; cursor: pointer; transition: background 0.2s var(--ease), border-color 0.2s var(--ease); }
.calc-modal__close:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--accent); }
.calc-modal__close svg { width: 18px; height: 18px; }
.calc-modal__body { padding: clamp(1.1rem, 3vw, 1.6rem); overflow-y: auto; }
.cpanel[hidden] { display: none; }

/* Shared sub-pieces used inside panels */
.calc-subhead { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-soft); font-weight: 700; margin: 0.5rem 0 -0.4rem; }
.calc-hint { font-size: 0.82rem; line-height: 1.5; color: var(--muted-2); margin: -0.3rem 0 0; }
.calc-field--inline { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.calc-field--inline label { font-size: 0.9rem; font-weight: 600; color: var(--muted); }
.calc-budget-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem 1.1rem; }
@media (max-width: 540px) { .calc-budget-grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(8, 9, 11, 0.4), rgba(6, 7, 9, 0.85));
  padding-block: clamp(3rem, 6vw, 4.5rem) 1.75rem;
  margin-top: clamp(2rem, 5vw, 4rem);
}
/* Brand-coloured hairline along the very top of the footer */
.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--blue-500) 30%, var(--accent) 70%, transparent);
  opacity: 0.7;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}
.footer-brand { max-width: 46ch; }
.footer-brand .brand { margin-bottom: 1.1rem; }
.footer-brand p { color: var(--muted); font-size: 0.95rem; max-width: 42ch; }
.footer-calcs h4 {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 1rem;
}
.footer-calcs__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem 2rem; }
.footer-calcs ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; align-content: start; }
.footer-calcs a { color: var(--muted); font-size: 0.95rem; transition: color 0.2s var(--ease); cursor: pointer; }
.footer-calcs a:hover, .footer-calcs a:focus-visible { color: var(--blue-400); }
@media (max-width: 420px) { .footer-calcs__cols { grid-template-columns: 1fr; gap: 0.6rem; } }
@media (max-width: 760px) {
  .footer-top { grid-template-columns: 1fr; gap: 2.25rem; }
}
.footer-bottom {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  justify-content: space-between;
  align-items: center;
}
.footer-copy { color: var(--muted-2); font-size: 0.82rem; }
.footer-credit {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--muted-2);
}
.footer-credit__name { color: var(--muted); font-weight: 600; letter-spacing: 0.01em; }
.footer-credit a { color: var(--muted); font-weight: 600; transition: color 0.2s var(--ease); }
.footer-credit a:hover, .footer-credit a:focus-visible { color: var(--accent-soft); }
.orbit-mark {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: var(--accent-soft);
  background: rgba(255, 122, 41, 0.1);
  border: 1px solid rgba(255, 122, 41, 0.28);
}
.orbit-mark svg { width: 15px; height: 15px; }
.disclaimer {
  margin-top: 1.4rem;
  font-size: 0.78rem;
  line-height: 1.65;
  color: var(--muted-2);
  max-width: 100%;
}

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }
.reveal[data-delay="5"] { transition-delay: 0.4s; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { max-width: 460px; margin-inline: auto; width: 100%; }
  .why__grid, .contact__grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }

  .nav__links, .nav__cta { display: none; }
  .menu-toggle { display: block; }

  /* Smaller logo to sit comfortably in the fixed-height header */
  .brand__logo { height: 30px; }

  /* Mobile menu panel */
  .nav__panel {
    position: fixed;
    inset: 78px 0 auto 0;
    background: rgba(9, 10, 13, 0.97);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line-strong);
    padding: 1.25rem var(--gutter) 1.75rem;
    display: grid;
    gap: 0.4rem;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s var(--ease), transform 0.28s var(--ease);
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9);
  }
  .nav__panel.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav__panel a {
    padding: 0.85rem 0.6rem;
    border-radius: 10px;
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 500;
    border-bottom: 1px solid var(--line);
  }
  .nav__panel a:last-of-type { border-bottom: 0; }
  .nav__panel .btn { margin-top: 0.8rem; width: 100%; }

  .form-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .hero__chip--a { left: 0; }
  .hero__chip--b { right: 0; }
}

/* Desktop: hide the mobile panel entirely */
@media (min-width: 761px) {
  .nav__panel { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
