/* Amarula Solutions site chrome.
 *
 * Palette taken from the current WordPress site:
 *   #faf7f4  warm off-white background
 *   #554948  body text
 *   #ce3a0d  orange-red accent
 *   #fdcb0e  primary gold
 *   #ffc107  secondary gold
 *   #212529  dark text / footer
 *   #eee9e3  borders
 */

:root {
  --am-bg: #faf7f4;
  --am-surface: #ffffff;
  --am-text: #554948;
  --am-heading: #212529;
  --am-accent: #ce3a0d;
  --am-accent-dark: #a92e09;
  --am-gold: #fdcb0e;
  --am-gold-soft: #ffc107;
  --am-border: #eee9e3;
  --am-muted: #7a6c6a;
  --am-navbar-h: 76px;
  --am-radius: 8px;
  --am-shell: 1180px;
  --am-chrome: 1280px;
  --am-prose: 40rem;
}

/* Wide-screen layout tiers. The 1440px design stays the reference; these
 * tiers only apply once there is room for a wider shell and larger type. */
@media (min-width: 1500px) {
  :root {
    --am-shell: 1320px;
    --am-chrome: 1420px;
  }

  html {
    font-size: 17px;
  }
}

@media (min-width: 1900px) {
  :root {
    --am-shell: 1440px;
    --am-chrome: 1540px;
    --am-navbar-h: 84px;
  }

  html {
    font-size: 18px;
  }
}

@media (min-width: 2400px) {
  :root {
    --am-shell: 1560px;
    --am-chrome: 1660px;
  }

  html {
    font-size: 19px;
  }
}

@media (min-width: 3200px) {
  :root {
    --am-shell: 1680px;
    --am-chrome: 1780px;
    --am-navbar-h: 92px;
  }

  html {
    font-size: 20px;
  }
}

html {
  scroll-padding-top: calc(var(--am-navbar-h) + 1rem);
}

body,
.wy-body-for-nav {
  font-family: "Ubuntu", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--am-text);
  background: var(--am-bg);
}

body {
  padding-top: var(--am-navbar-h);
}

/* The RTD theme pins paragraphs to 16px/24px. Use the root size so the
 * wide-screen type scale also reaches body copy; component rules with a
 * class selector still override this. */
p {
  font-size: 1rem;
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Klavika", "Ubuntu", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--am-heading);
}

/* Keep the RTD grid in normal flow so the corporate footer can follow it. */
.wy-grid-for-nav {
  position: relative;
  height: auto;
  min-height: calc(100vh - var(--am-navbar-h));
}

.wy-nav-side {
  position: fixed;
  top: var(--am-navbar-h);
  bottom: 0;
}

.wy-nav-content-wrap {
  min-height: calc(100vh - var(--am-navbar-h));
}

.wy-nav-content {
  height: auto;
}

/* Docs pages use the full width behind the article, like the marketing pages.
 * The text itself stays at the same 1180px measure as the rest of the site. */
.am-docs .wy-nav-content-wrap {
  background: var(--am-surface);
}

.am-docs .wy-nav-content {
  width: 100%;
  max-width: none;
  margin: 0;
  background: var(--am-surface);
}

/* RTD's min-height:100% plus the fixed navbar offset makes the sidebar taller
 * than the viewport, so its lower items cannot be reached. */
.am-docs .wy-nav-side {
  height: auto;
  min-height: 0;
}

.am-docs .rst-content {
  max-width: 1180px;
  margin: 0 auto;
}

/* ------------------------------------------------------------------ */
/* Skip link                                                           */
/* ------------------------------------------------------------------ */

.am-skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 2000;
  padding: 0.65rem 1rem;
  background: var(--am-heading);
  color: #fff;
  border-radius: var(--am-radius);
  text-decoration: none;
}

.am-skip-link:focus {
  top: calc(var(--am-navbar-h) + 0.5rem);
}

/* ------------------------------------------------------------------ */
/* Top navigation                                                      */
/* ------------------------------------------------------------------ */

.am-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--am-navbar-h);
  background: #000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
}

.am-navbar-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 100%;
  max-width: var(--am-chrome);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.am-brand img {
  display: block;
  height: 2.75rem;
  width: auto;
}

.am-nav-links {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  margin-left: auto;
}

.am-nav-links a {
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.am-nav-links a:hover,
.am-nav-links a:focus-visible {
  color: var(--am-gold);
}

.am-nav-docs {
  padding: 0.55rem 0.9rem;
  background: var(--am-gold);
  color: #000 !important;
  border-radius: 4px;
}

.am-nav-docs:hover,
.am-nav-docs:focus-visible {
  background: var(--am-gold-soft);
  color: #000 !important;
}

.am-nav-search {
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
}

.am-menu-check {
  display: none;
}

.am-menu-button {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 42px;
  height: 42px;
  margin-left: auto;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 4px;
  cursor: pointer;
}

.am-menu-button span {
  display: block;
  height: 2px;
  background: #fff;
}

@media (max-width: 1120px) {
  .am-menu-button {
    display: flex;
  }

  .am-nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem 1.5rem 1.35rem;
    background: #000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
  }

  .am-menu-check:checked ~ .am-nav-links {
    display: flex;
  }

  .am-nav-docs,
  .am-nav-search {
    padding: 0;
    background: none;
    border: 0;
    color: #fff !important;
  }
}

@media (max-width: 768px) {
  :root {
    --am-navbar-h: 58px;
  }

  .am-brand img {
    height: 32px;
  }

  .am-navbar-inner {
    padding: 0 1rem;
  }
}

/* ------------------------------------------------------------------ */
/* Corporate footer                                                    */
/* ------------------------------------------------------------------ */

.am-footer {
  background: var(--am-heading);
  color: #e9e2dc;
  padding: 3rem 1.5rem 1.5rem;
}

.am-footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 2rem;
  max-width: var(--am-chrome);
  margin: 0 auto;
}

.am-footer-brand img {
  height: 2.5rem;
  width: auto;
  margin-bottom: 1rem;
}

.am-footer-brand p {
  max-width: 24rem;
  color: #bfb5ae;
  font-size: 0.92rem;
  line-height: 1.6;
}

.am-footer-col h2 {
  margin: 0 0 0.85rem;
  color: var(--am-gold);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.am-footer-col a {
  display: block;
  margin: 0.4rem 0;
  color: #e9e2dc;
  font-size: 0.92rem;
  text-decoration: none;
}

.am-footer-col a:hover,
.am-footer-col a:focus-visible {
  color: var(--am-gold);
}

.am-footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--am-chrome);
  margin: 2.25rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  color: #bfb5ae;
  font-size: 0.85rem;
}

.am-footer-bottom a {
  color: var(--am-gold);
  text-decoration: none;
}

@media (max-width: 900px) {
  .am-footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .am-footer-inner {
    grid-template-columns: 1fr;
  }

  .am-footer-bottom {
    flex-direction: column;
  }
}

/* ------------------------------------------------------------------ */
/* Docs layout: keep the footer clear of the fixed sidebar             */
/* ------------------------------------------------------------------ */

@media (min-width: 769px) {
  .am-docs .am-footer {
    margin-left: 300px;
  }
}

/* ------------------------------------------------------------------ */
/* Docs sidebar polish                                                 */
/* ------------------------------------------------------------------ */

.wy-side-nav-search {
  background: var(--am-heading);
}

.wy-side-nav-search > a,
.wy-side-nav-search .wy-dropdown > a {
  color: #fff;
}

.wy-side-nav-search input[type="text"] {
  border-color: #3a3f44;
}

.wy-menu-vertical a {
  color: #e6ded7;
}

.wy-menu-vertical a:hover {
  background: #2f3337;
  color: #ffffff;
}

/* Responsive documentation tables: wrap long cells instead of forcing a
 * horizontal scrollbar across the whole table. */
.rst-content table.am-table {
  width: 100%;
}

.rst-content table.am-table td,
.rst-content table.am-table th {
  white-space: normal;
}

/* fit-table tables are meant to stay inside the article column; wrapping
 * cells keeps them from opening an inner horizontal scrollbar. */
.rst-content table.fit-table td {
  white-space: normal;
}

.wy-menu-vertical li.current > a,
.wy-menu-vertical li.on a {
  color: #ffffff;
}

/* Documentation pages share the marketing heading hierarchy: same H1/H2/H3
 * scale and the gold rule under section headings. */
.am-docs .rst-content h1 {
  font-size: 2.15rem;
}

.am-docs .rst-content h2 {
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--am-gold);
  font-size: 1.6rem;
}

.am-docs .rst-content h3 {
  font-size: 1.25rem;
}

/* ------------------------------------------------------------------ */
/* Wide documentation layout                                           */
/* ------------------------------------------------------------------ */

/* Once the sidebar would otherwise drift away from the article, centre the
 * pair and keep the article at a readable measure. */
@media (min-width: 1500px) {
  body.am-docs {
    --am-docs-sidebar: 300px;
    --am-docs-content: 900px;
    --am-docs-gap: 1.5rem;
    --am-docs-shell: calc(
      var(--am-docs-sidebar) + var(--am-docs-gap) + var(--am-docs-content)
    );
    --am-docs-left: max(0px, calc((100vw - var(--am-docs-shell)) / 2));
    background: var(--am-surface);
  }

  .am-docs .wy-nav-side {
    left: var(--am-docs-left);
    width: var(--am-docs-sidebar);
  }

  .am-docs .wy-nav-content-wrap {
    margin-left: calc(var(--am-docs-left) + var(--am-docs-sidebar));
  }

  /* The theme also pads .wy-nav-content by 3.236em; the gap is now owned
   * by .rst-content so the sidebar and article stay visually connected. */
  .am-docs .wy-nav-content {
    padding-left: 0;
    padding-right: 0;
  }

  .am-docs .rst-content {
    max-width: var(--am-docs-content);
    margin-left: var(--am-docs-gap);
    margin-right: 0;
  }

  .am-docs .wy-menu-vertical a {
    font-size: 0.9rem;
  }

  .am-docs [itemprop="articleBody"] p,
  .am-docs [itemprop="articleBody"] blockquote {
    max-width: var(--am-prose);
  }

  /* The fixed sidebar must not sit on top of footer content. Anchor the
   * footer columns to the article, not to the wide docs shell. */
  .am-docs .am-footer {
    margin-left: 0;
  }

  .am-docs .am-footer-inner,
  .am-docs .am-footer-bottom {
    max-width: var(--am-docs-content);
    margin-left: calc(
      var(--am-docs-left) + var(--am-docs-sidebar) +
      var(--am-docs-gap) - 1.5rem
    );
    margin-right: auto;
  }
}

@media (min-width: 1900px) {
  body.am-docs {
    --am-docs-sidebar: 320px;
    --am-docs-content: 940px;
  }
}

@media (min-width: 2400px) {
  body.am-docs {
    --am-docs-sidebar: 340px;
    --am-docs-content: 980px;
  }
}

@media (min-width: 3200px) {
  body.am-docs {
    --am-docs-sidebar: 360px;
    --am-docs-content: 1000px;
    --am-docs-gap: 1.75rem;
  }
}

/* Accessible focus ring for interactive elements. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--am-gold-soft);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
