/* ============================================
   CLOUD CITY BUILDING — Design System
   Glasgow skyline as structural device.
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300..900&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Color tokens */
  --ink: #1a1a1a;
  --ink-soft: #2e2c29;
  --paper: #f7f5f0;
  --paper-dim: #ede9e0;
  --clyde: #3d5a6c;
  --clyde-deep: #294453;
  --brass: #b8854a;
  --brass-soft: #d9b888;
  --rust: #8c3d2e;
  --line: rgba(26, 26, 26, 0.14);

  /* Type */
  --font-display: 'Fraunces', serif;
  --font-body: 'Inter', -apple-system, sans-serif;

  /* Layout */
  --max-w: 1180px;
  --pad: clamp(1.25rem, 4vw, 3rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

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

::selection { background: var(--brass-soft); color: var(--ink); }

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

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* ---------- Typography ---------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.08;
  color: var(--ink);
}

h1 { font-size: clamp(2.4rem, 5.5vw, 4.6rem); font-weight: 500; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--clyde);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--brass);
  display: inline-block;
}

p { color: var(--ink-soft); }
.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 38em; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 245, 240, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}

.brand img { height: 52px; width: auto; }

.main-nav ul {
  display: flex;
  gap: 2.1rem;
  list-style: none;
}

.main-nav a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink-soft);
  position: relative;
  padding: 0.3rem 0;
  transition: color 0.2s ease;
}
.main-nav a:hover { color: var(--rust); }
.main-nav a.active { color: var(--ink); }
.main-nav a.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 2px;
  background: var(--rust);
}

.nav-cta {
  background: var(--ink);
  color: var(--paper) !important;
  padding: 0.65rem 1.3rem;
  border-radius: 3px;
  font-size: 0.9rem;
  font-weight: 700;
  transition: background 0.2s ease;
}
.nav-cta:hover { background: var(--rust); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); display: block; }

@media (max-width: 860px) {
  .main-nav { position: fixed; top: 84px; left: 0; right: 0; bottom: 0; background: var(--paper); transform: translateX(100%); transition: transform 0.3s ease; overflow-y: auto; }
  .main-nav.open { transform: translateX(0); }
  .main-nav .wrap { display: block; padding: 2rem var(--pad); height: auto; }
  .main-nav ul { flex-direction: column; gap: 1.6rem; }
  .main-nav a { font-size: 1.3rem; }
  .nav-toggle { display: flex; }
}

/* ---------- Skyline horizon divider (signature device) ---------- */
/* Uses the real logo's skyline artwork, repeated as a frieze, tinted to
   match whichever section it sits on top of. This is the page's signature
   element: the brand mark recurring as structure, not just a badge. */

.skyline-divider {
  width: 100%;
  height: clamp(48px, 7vw, 84px);
  background-repeat: repeat-x;
  background-position: bottom left;
  background-size: auto 78%;
}

.skyline-divider.tint-paper { background-image: url('../images/skyline-paper.png'); }
.skyline-divider.tint-ink   { background-image: url('../images/skyline-ink.png'); }
.skyline-divider.tint-clyde { background-image: url('../images/skyline-clyde.png'); }

.skyline-divider.on-ink   { background-color: var(--ink); }
.skyline-divider.on-paper { background-color: var(--paper); }
.skyline-divider.on-clyde { background-color: var(--clyde); }
.skyline-divider.on-dim   { background-color: var(--paper-dim); }

/* ---------- Hero ---------- */

.hero {
  background: var(--ink);
  color: var(--paper);
  position: relative;
  overflow: hidden;
  padding-top: clamp(4rem, 9vw, 7rem);
  padding-bottom: 0;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
  padding-bottom: clamp(3rem, 7vw, 5rem);
}

.hero h1 { color: var(--paper); margin: 1.1rem 0 1.2rem; }
.hero .eyebrow { color: var(--brass-soft); }
.hero .eyebrow::before { background: var(--brass-soft); }
.hero p.lede { color: rgba(247,245,240,0.78); }

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.6rem;
}
.badge {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1px solid rgba(247,245,240,0.28);
  color: rgba(247,245,240,0.9);
  padding: 0.4rem 0.8rem;
  border-radius: 2px;
  text-transform: uppercase;
}

.hero-actions { display: flex; gap: 1rem; margin-top: 2.2rem; flex-wrap: wrap; }

.hero-panel {
  background: rgba(247,245,240,0.06);
  border: 1px solid rgba(247,245,240,0.16);
  border-radius: 4px;
  padding: 1.8rem;
}
.hero-panel-row {
  display: flex;
  justify-content: space-between;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(247,245,240,0.12);
  font-size: 0.95rem;
}
.hero-panel-row:last-child { border-bottom: none; }
.hero-panel-row span:first-child { color: rgba(247,245,240,0.6); }
.hero-panel-row span:last-child { font-weight: 600; }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.85rem 1.6rem;
  border-radius: 3px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}
.btn-primary { background: var(--brass); color: var(--ink); }
.btn-primary:hover { background: var(--brass-soft); }
.btn-ghost { background: transparent; color: var(--paper); border-color: rgba(247,245,240,0.4); }
.btn-ghost:hover { border-color: var(--paper); }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: var(--rust); }

/* ---------- Sections ---------- */

section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section-tight { padding: clamp(2.5rem, 5vw, 4rem) 0; }

.section-head { max-width: 42em; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head h2 { margin-top: 0.7rem; }

.bg-paper { background: var(--paper); }
.bg-dim { background: var(--paper-dim); }
.bg-ink { background: var(--ink); color: var(--paper); }
.bg-ink p { color: rgba(247,245,240,0.75); }
.bg-ink h2, .bg-ink h3 { color: var(--paper); }
.bg-clyde { background: var(--clyde); color: var(--paper); }
.bg-clyde p { color: rgba(247,245,240,0.82); }
.bg-clyde h2, .bg-clyde h3 { color: var(--paper); }

/* ---------- Grids & Cards ---------- */

.grid {
  display: grid;
  gap: 1.6rem;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.8rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--brass); transform: translateY(-3px); }

.card-num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--brass);
  margin-bottom: 0.6rem;
  display: block;
}

.trade-card h3 { margin-bottom: 0.5rem; }
.trade-card p { font-size: 0.94rem; }

/* ---------- Stats strip ---------- */

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  border-top: 1px solid rgba(247,245,240,0.16);
  border-bottom: 1px solid rgba(247,245,240,0.16);
  padding: 2.2rem 0;
}
.stat { text-align: left; }
.stat-num { font-family: var(--font-display); font-size: clamp(1.8rem, 3vw, 2.6rem); color: var(--brass-soft); display: block; }
.stat-label { font-size: 0.85rem; color: rgba(247,245,240,0.7); text-transform: uppercase; letter-spacing: 0.05em; }

@media (max-width: 700px) {
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Process list ---------- */

.process-list { display: flex; flex-direction: column; }
.process-item {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 1.5rem;
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--line);
}
.process-item:first-child { border-top: 1px solid var(--line); }
.process-item .step-num {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--brass);
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  color: rgba(247,245,240,0.8);
  padding-top: 0;
}
.footer-main {
  padding: clamp(3rem, 6vw, 4.5rem) 0 2.5rem;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 2.5rem;
}
.footer-main img { height: 46px; margin-bottom: 1rem; }
.footer-main h4 {
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}
.footer-main ul { list-style: none; }
.footer-main li { margin-bottom: 0.6rem; font-size: 0.93rem; }
.footer-main a:hover { color: var(--brass-soft); }
.footer-bottom {
  border-top: 1px solid rgba(247,245,240,0.14);
  padding: 1.3rem 0;
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: rgba(247,245,240,0.55);
  flex-wrap: wrap;
  gap: 0.6rem;
}

@media (max-width: 860px) {
  .footer-main { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .footer-main { grid-template-columns: 1fr; }
}

/* ---------- Forms ---------- */

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--ink);
}

input, select, textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--clyde);
  outline-offset: 1px;
  border-color: var(--clyde);
}
textarea { resize: vertical; min-height: 140px; }

.form-msg { padding: 0.9rem 1.1rem; border-radius: 3px; font-size: 0.92rem; margin-top: 1rem; display: none; }
.form-msg.show { display: block; }
.form-msg.success { background: #e7efe9; color: #2c5a3c; border: 1px solid #b9d4c1; }
.form-msg.error { background: #f5e6e3; color: var(--rust); border: 1px solid #e0bdb5; }

/* ---------- Utility ---------- */

.center { text-align: center; margin-left: auto; margin-right: auto; }
.mt-2 { margin-top: 2rem; }
.text-clyde { color: var(--clyde); }
.divider-line { height: 1px; background: var(--line); width: 100%; }

.cta-band {
  background: var(--rust);
  color: var(--paper);
  text-align: center;
  padding: clamp(3rem, 6vw, 4.5rem) 0;
}
.cta-band h2 { color: var(--paper); }
.cta-band p { color: rgba(247,245,240,0.85); max-width: 32em; margin: 0.8rem auto 1.8rem; }
.cta-band .btn-primary { background: var(--paper); color: var(--rust); }
.cta-band .btn-primary:hover { background: var(--ink); color: var(--paper); }
