/* amber-bone-forge — rail editorial layout, overflow-safe */
:root {
  --page: #0c0a08;
  --surface: #1a1612;
  --surface-alt: #221c17;
  --text: #f2ebe3;
  --muted: #9a9088;
  --accent: #e8953a;
  --accent-alt: #7b5ea7;
  --line: color-mix(in srgb, var(--text) 14%, transparent);
  --radius: 18px;
  --section-space: clamp(3.5rem, 8vw, 6.5rem);
  --rail-w: min(240px, 18vw);
  --content-max: 1280px;
  --font-display: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--page);
}

body,
button,
input,
select,
textarea {
  font: inherit;
}

img,
svg,
video,
canvas,
iframe {
  display: block;
  max-width: 100%;
  height: auto;
}

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

h1,
h2,
h3,
p {
  margin-top: 0;
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  line-height: 1.08;
}

h1 {
  font-size: clamp(1.85rem, 4.2vw, 3.4rem);
  margin-bottom: 1.25rem;
}

h2 {
  font-size: clamp(1.55rem, 3vw, 2.5rem);
  margin-bottom: 0.85rem;
}

h3 {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  margin-bottom: 0.5rem;
}

p {
  color: var(--muted);
}

.page-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}

.page-main {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}

.page-content {
  min-width: 0;
  max-width: 100%;
}

/* —— Side rail / header —— */
.site-rail {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  background: color-mix(in srgb, var(--page) 92%, var(--accent) 8%);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.rail-inner,
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0 auto;
  padding: 0.85rem clamp(1rem, 3vw, 1.5rem);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  max-width: 100%;
  font-weight: 800;
  font-size: 1rem;
}

.brand > span:last-child {
  min-width: 0;
}

.brand small {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.brand-logo {
  width: 48px;
  height: 48px;
  max-width: 64px;
  max-height: 64px;
  flex: 0 0 auto;
  border-radius: 12px;
  overflow: hidden;
}

.brand-logo svg {
  width: 100%;
  height: 100%;
}

.site-rail nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  max-width: 100%;
  flex: 1 1 auto;
}

.site-rail nav a {
  font-size: 0.78rem;
  color: var(--muted);
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  white-space: normal;
  word-break: break-word;
  max-width: 100%;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}

.site-rail nav a:hover {
  color: var(--text);
  border-color: var(--accent);
}

.header-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  padding: 0.75rem 1.15rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  font-weight: 700;
  white-space: normal;
  text-align: center;
  flex-shrink: 0;
}

.header-cta {
  margin-left: auto;
}

.button-primary,
.header-cta {
  background: var(--accent);
  color: #1a1208;
}

.button-secondary {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.button-secondary:hover {
  border-color: var(--accent);
}

/* —— Sections —— */
.section-inner {
  width: min(100%, var(--content-max));
  max-width: 100%;
  margin-inline: auto;
  padding-inline: clamp(1rem, 3vw, 2.5rem);
  min-width: 0;
}

.section {
  padding: var(--section-space) 0;
  min-width: 0;
  max-width: 100%;
}

.section:nth-of-type(even) {
  background: color-mix(in srgb, var(--surface) 55%, var(--page));
}

.section-heading {
  max-width: 52rem;
  margin-bottom: 2rem;
  min-width: 0;
}

.section-heading > p {
  font-size: 1.02rem;
}

.eyebrow,
.section-kicker {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 800;
  margin-bottom: 0.85rem;
  color: var(--accent);
}

.lead {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  max-width: 42rem;
  color: color-mix(in srgb, var(--text) 88%, var(--muted));
}

/* —— Hero —— */
.hero {
  padding: clamp(2rem, 5vw, 4rem) 0 var(--section-space);
  background:
    radial-gradient(ellipse 80% 60% at 85% 10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 55%),
    linear-gradient(165deg, var(--page), color-mix(in srgb, var(--surface) 80%, var(--page)));
}

.hero-grid {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  max-width: 100%;
}

.hero-copy {
  min-width: 0;
  max-width: 100%;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1.75rem 0 1rem;
  min-width: 0;
  max-width: 100%;
}

.geo-line {
  font-size: 0.82rem;
  color: var(--muted);
}

.hero-visual {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  background: var(--surface);
  transform: none;
}

.hero-visual svg {
  width: 100%;
  height: 100%;
  max-width: 100%;
}

/* —— Cards & grids —— */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1rem;
  min-width: 0;
  max-width: 100%;
}

.card {
  min-width: 0;
  max-width: 100%;
  padding: 1.35rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.card p {
  margin-bottom: 0;
}

.card-icon,
.step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 0.85rem;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border-radius: 12px;
  flex-shrink: 0;
}

.card-icon svg,
.step-icon svg {
  width: 26px;
  height: 26px;
  max-width: 100%;
}

.card-label {
  display: block;
  color: var(--accent);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.55rem;
}

.card small {
  display: block;
  color: var(--muted);
  margin-top: 0.45rem;
  font-size: 0.85rem;
}

/* —— Process —— */
.process-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 1rem;
  min-width: 0;
  max-width: 100%;
}

.process-list li {
  display: flex;
  gap: 0.85rem;
  min-width: 0;
  max-width: 100%;
  padding: 1.2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.process-list li > div {
  min-width: 0;
  max-width: 100%;
}

.step-icon {
  margin-bottom: 0;
}

/* —— Geography —— */
.geo-chips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 0.85rem;
  min-width: 0;
  max-width: 100%;
}

.geo-chip {
  min-width: 0;
  max-width: 100%;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-alt);
}

.geo-chip strong,
.geo-chip span {
  display: block;
}

.geo-chip span {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 0.35rem;
}

/* —— Guide —— */
.guide-body {
  min-width: 0;
  max-width: 100%;
}

.chapter {
  min-width: 0;
  max-width: 100%;
  padding: 1.75rem 0;
  border-top: 1px solid var(--line);
}

.chapter ul {
  padding-left: 1.2rem;
  margin: 0.75rem 0 0;
}

.chapter li {
  color: var(--muted);
  margin: 0.45rem 0;
}

/* —— FAQ —— */
.faq-list {
  max-width: 52rem;
  min-width: 0;
}

.faq-list details {
  border-bottom: 1px solid var(--line);
  padding: 0.85rem 0;
  min-width: 0;
  max-width: 100%;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.faq-list p {
  padding-right: 0;
  margin-bottom: 0;
}

/* —— Contact —— */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 2.5rem);
  align-items: start;
  min-width: 0;
  max-width: 100%;
}

.contact-form {
  display: grid;
  gap: 0.85rem;
  min-width: 0;
  max-width: 100%;
  background: var(--surface);
  padding: 1.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.contact-form label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
  min-width: 0;
  max-width: 100%;
}

input,
select,
textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--page);
  color: var(--text);
  padding: 0.8rem;
  border-radius: calc(var(--radius) * 0.65);
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.form-message {
  color: var(--accent);
  margin: 0;
}

/* —— Footer —— */
.site-footer {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  background: color-mix(in srgb, var(--surface) 85%, var(--page));
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 1.5rem;
  min-width: 0;
  max-width: 100%;
}

.footer-brand {
  font-size: 1.35rem;
}

.site-footer a {
  display: block;
  color: var(--muted);
  margin: 0.35rem 0;
}

/* —— Desktop rail —— */
@media (min-width: 1100px) {
  .page-shell {
    display: grid;
    grid-template-columns: var(--rail-w) minmax(0, 1fr);
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
  }

  .site-rail {
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
    max-height: 100vh;
    width: var(--rail-w);
    max-width: var(--rail-w);
    border-bottom: none;
    border-right: 1px solid var(--line);
    overflow-x: hidden;
    overflow-y: auto;
  }

  .rail-inner,
  .header-inner {
    flex-direction: column;
    align-items: stretch;
    height: 100%;
    min-height: 100vh;
    padding: 1.5rem 1.1rem;
    flex-wrap: nowrap;
  }

  .brand {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  .site-rail nav {
    flex-direction: column;
    align-items: stretch;
    flex: 1 1 auto;
    margin-top: 0.5rem;
  }

  .site-rail nav a {
    border-radius: 10px;
  }

  .header-cta {
    margin-left: 0;
    margin-top: auto;
    width: 100%;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  }

  .contact-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

@media (min-width: 768px) and (max-width: 1099px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .contact-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

@media (max-width: 767px) {
  .header-cta {
    width: 100%;
    margin-left: 0;
  }

  .site-rail nav {
    width: 100%;
  }
}

@media (min-width: 1440px) {
  :root {
    --content-max: 1320px;
  }
}

@media (min-width: 1920px) {
  .page-main {
    display: flex;
    justify-content: center;
  }

  .page-content {
    width: 100%;
    max-width: calc(100vw - var(--rail-w));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
