/*
 * Kinetic Trust design system — SecurBank EDS site
 */
@import url('../design/tokens.css');
@import url('../design/components.css');

/* EDS boilerplate semantic aliases — maps design tokens to the names EDS boilerplate expects */
:root {
  --background-color:  var(--color-obsidian);
  --surface-color:     var(--color-surface);
  --text-color:        var(--color-on-surface);
  --text-muted-color:  var(--color-on-surface-variant);
  --link-color:        var(--color-primary);
  --link-hover-color:  var(--color-primary-fixed);
  --border-color:      var(--color-outline-variant);

  /* EDS layout tokens — project-specific, not shared with the dashboard */
  --container-max:  1280px;
  --margin-mobile:  20px;
  --margin-desktop: 64px;
  --nav-height:     80px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  display: none;
  margin: 0;
  background-color: var(--background-color);
  color: var(--text-color);
  font-family: var(--body-font-family);
  font-size: var(--body-font-size-m);
  line-height: 1.6;
}

body.appear {
  display: block;
}

header {
  height: var(--nav-height);
}

header .header,
footer .footer {
  visibility: hidden;
}

header .header[data-block-status="loaded"],
footer .footer[data-block-status="loaded"] {
  visibility: visible;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-top: 0.8em;
  margin-bottom: 0.35em;
  font-family: var(--heading-font-family);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  scroll-margin: 96px;
}

h1 {
  font-size: var(--heading-font-size-xxl);
  font-weight: 900;
  letter-spacing: -0.03em;
}
h2 { font-size: var(--heading-font-size-xl); }
h3 { font-size: var(--heading-font-size-l); }
h4 { font-size: var(--heading-font-size-m); }
h5 { font-size: var(--heading-font-size-s); }
h6 { font-size: var(--heading-font-size-xs); }

/* highlighted / accent text inside headings, e.g. <em>Financial</em> */
h1 em,
h2 em {
  color: var(--color-primary);
  font-style: normal;
  text-shadow: 0 0 20px rgb(0 219 233 / 45%);
}

p,
dl,
ol,
ul,
pre,
blockquote {
  margin-top: 0.8em;
  margin-bottom: 0.35em;
  color: var(--text-muted-color);
}

code,
pre {
  font-family: var(--mono-font-family);
  font-size: var(--body-font-size-s);
}

pre {
  padding: 16px;
  border-radius: var(--radius-lg);
  background-color: var(--color-surface-container-low);
  overflow-x: auto;
  white-space: pre;
}

main > div {
  margin: 40px 16px;
}

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

/* links */
a:any-link {
  color: var(--link-color);
  text-decoration: none;
  overflow-wrap: break-word;
}

a:hover {
  color: var(--link-hover-color);
  text-decoration: underline;
}

a:not(.button):focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 2px;
}

/* buttons — authored via **bold link** (primary), *italic link* (secondary),
   ***bold+italic link*** (accent). See scripts/scripts.js decorateButtons(). */
p.button-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 16px 0;
}

a.button:any-link,
button.button {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
  margin: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  padding: 0.85em 1.8em;
  font-family: var(--body-font-family);
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: box-shadow 0.25s ease, transform 0.15s ease, background-color 0.25s ease;
}

a.button:active,
button.button:active {
  transform: scale(0.96);
}

@media (prefers-reduced-motion: reduce) {
  a.button:any-link,
  button.button {
    transition: none;
  }

  a.button:active,
  button.button:active {
    transform: none;
  }
}

a.button.primary:any-link,
button.button.primary {
  background-color: var(--color-primary-container);
  color: var(--color-on-primary);
}

a.button.primary:hover,
a.button.primary:focus-visible,
button.button.primary:hover {
  box-shadow: var(--cyan-aura-hover);
}

a.button.secondary:any-link,
button.button.secondary {
  border-color: var(--border-color);
  background-color: transparent;
  color: var(--text-color);
}

a.button.secondary:hover {
  background-color: rgb(255 255 255 / 5%);
  text-decoration: none;
}

a.button.secondary:focus-visible {
  background-color: rgb(255 255 255 / 5%);
  box-shadow: 0 0 0 2px var(--color-primary);
  text-decoration: none;
}

a.button.accent:any-link,
button.button.accent {
  background-color: var(--color-on-surface);
  color: var(--color-obsidian);
}

a.button.accent:hover {
  background-color: var(--color-primary-container);
  color: var(--color-on-primary);
  text-decoration: none;
}

main img {
  max-width: 100%;
  width: auto;
  height: auto;
}

.icon {
  display: inline-block;
  height: 24px;
  width: 24px;
}

.icon img {
  height: 100%;
  width: 100%;
}

/* .glass-card and .eyebrow are now in design/components.css */

/* sections */
main > .section {
  margin: 0;
  padding: 64px 0;
}

main > .section > div {
  max-width: var(--container-max);
  margin: auto;
  padding: 0 var(--margin-mobile);
}

main > .section:first-of-type {
  margin-top: 0;
  padding-top: 0;
}

@media (width >= 900px) {
  main > .section > div {
    padding: 0 var(--margin-desktop);
  }
}

/* section metadata: authors can mark a section "surface" or "lowest" for tonal layering */
main .section.surface {
  background-color: var(--color-surface);
}

main .section.lowest {
  background-color: var(--color-surface-container-lowest);
}

main .section.divider {
  border-top: 1px solid var(--border-color);
}

/* Metadata block must never render as visible content */
main > .section.metadata {
  display: none;
}

/* Collapse padding on sections whose only visible child is a still-loading widget */
main > .section:has(> div > .nextjs-widget.block > .nextjs-widget-mount[hidden]:only-child) {
  padding: 0;
}

/* "Popular offers" heading cyan underline accent (lower specificity — must come first) */
.section.offers-intro h2 {
  position: relative;
  padding-bottom: 16px;
}

.section.offers-intro h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 48px;
  height: 3px;
  background: var(--color-primary);
  border-radius: 2px;
}

/* accent-heading: violet left-bar accent on h2 */
.section.accent-heading .default-content-wrapper h2 {
  position: relative;
  padding-left: 20px;
}

.section.accent-heading .default-content-wrapper h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.1em;
  width: 4px;
  height: 0.85em;
  background: var(--color-secondary);
  border-radius: 2px;
}

/* "Popular offers" section: heading and description side by side at desktop */
@media (width >= 900px) {
  .section.offers-intro > div:first-child > div {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    column-gap: 64px;
    margin-bottom: 40px;
  }

  .section.offers-intro > div:first-child > div h2 {
    margin: 0;
  }

  .section.offers-intro > div:first-child > div p {
    margin: 0;
    font-size: var(--body-font-size-s);
  }
}

/* Compare page: hero intro heading at display scale */
@media (width >= 900px) {
  .section.compare-hero h1 {
    font-size: clamp(72px, 10vw, 120px);
    letter-spacing: -0.04em;
    line-height: 0.9;
  }
}


/* ---- Section width modifiers ---- */

/* full-bleed: horizontal constraints removed; background still extends edge-to-edge */
main > .section.full-bleed > div {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

/* hero-full: ALL padding removed; the block manages its own spacing */
main > .section.hero-full {
  padding: 0;
}

main > .section.hero-full > div {
  max-width: none;
  padding: 0;
}

/* narrow: reduced content width for editorial / focused sections */
main > .section.narrow > div {
  max-width: 720px;
}

/* "We made it simple" + CTA side by side at desktop */
@media (width >= 900px) {
  .section.features-cta {
    display: grid;
    grid-template-columns: 1fr 380px;
    align-items: start;
    gap: 40px 64px;

    /* Section stays full-width (background extends edge-to-edge) but content
       is clamped to --container-max, matching every other section's inner div. */
    padding-inline: max(
      var(--margin-desktop),
      calc((100% - var(--container-max)) / 2 + var(--margin-desktop))
    );
  }

  .section.features-cta > div {
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .section.features-cta > div:first-child {
    grid-column: 1 / -1;
  }

  /* Features stack vertically inside the left column */
  .section.features-cta .feature-list {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* text-center: center the intro copy of a section and make the h2/h3 cyan.
   Placed last so it outranks the general > div rules above without fighting them.
   Uses modern :not() list notation (Selectors 4). */
main .section.text-center > div:not(.feature-list-wrapper, .cta-wrapper) {
  text-align: center;
}

main .section.text-center > div:not(.feature-list-wrapper, .cta-wrapper) h2,
main .section.text-center > div:not(.feature-list-wrapper, .cta-wrapper) h3 {
  color: var(--color-primary);
}
