/* =====================================================================
   Northcrest Bank — Template stylesheet
   ---------------------------------------------------------------------
   Written in plain CSS (no build step required) so it can be edited
   directly. Tailwind utility classes handle layout; this file holds the
   design tokens, reusable components and motion.

   1.  Design tokens
   2.  Base
   3.  Typography helpers
   4.  Buttons
   5.  Forms
   6.  Cards & surfaces
   7.  Navigation
   8.  Decorative
   9.  Scroll reveal & motion
   10. Utilities
   11. Print
   ===================================================================== */

/* ------------------------------------------------------------------
   1. Design tokens
   ------------------------------------------------------------------ */
:root {
  --nc-navy-900: #0a2540;
  --nc-navy-800: #132e4e;
  --nc-navy-700: #1d3f67;
  --nc-navy-600: #2b5280;
  --nc-navy-100: #deeaf5;
  --nc-navy-50: #f1f6fb;

  --nc-gold-300: #e7c47d;
  --nc-gold-400: #daac55;
  --nc-gold-500: #c8963a;
  --nc-gold-600: #ac7a2e;

  --nc-sea-500: #14ab89;
  --nc-danger: #d64545;

  --nc-ink: #0f172a;
  --nc-muted: #5b6b80;
  --nc-line: #e3e9f0;
  --nc-bg: #ffffff;

  --nc-radius: 14px;
  --nc-radius-lg: 22px;
  --nc-header-h: 78px;

  --nc-ease: cubic-bezier(0.16, 0.84, 0.44, 1);
}

/* ------------------------------------------------------------------
   2. Base
   ------------------------------------------------------------------ */
* {
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nc-header-h) + 24px);
}

body {
  background: var(--nc-bg);
  color: var(--nc-ink);
  /* Scroll-reveal transforms and the decorative glows can momentarily extend
     past the viewport on narrow screens. `clip` suppresses the sideways
     scrollbar without creating a scroll container, so the sticky header and
     sticky sidebars keep working (which `overflow-x: hidden` would break). */
  overflow-x: clip;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'ss01';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Fallback for browsers without `overflow: clip` (Safari < 16) */
@supports not (overflow: clip) {
  body {
    overflow-x: hidden;
  }
}

/* Prevent layout shift when Alpine locks scrolling for modals/drawers */
body.nc-lock {
  overflow: hidden;
}

::selection {
  background: var(--nc-gold-300);
  color: var(--nc-navy-900);
}

:focus-visible {
  outline: 2px solid var(--nc-gold-500);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Custom scrollbar (WebKit) */
::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}
::-webkit-scrollbar-track {
  background: var(--nc-navy-50);
}
::-webkit-scrollbar-thumb {
  background: #b7c6d8;
  border-radius: 99px;
  border: 3px solid var(--nc-navy-50);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--nc-navy-600);
}

/* Alpine: hide un-initialised elements to stop content flashing */
[x-cloak] {
  display: none !important;
}

/* ------------------------------------------------------------------
   3. Typography helpers
   ------------------------------------------------------------------ */
.nc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--nc-gold-600);
}
.nc-eyebrow::before {
  content: '';
  width: 26px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}
.nc-eyebrow--light {
  color: var(--nc-gold-300);
}
.nc-eyebrow--center::before {
  display: none;
}

.nc-title {
  font-family: 'Plus Jakarta Sans', Inter, sans-serif;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--nc-navy-900);
}
.nc-title--light {
  color: #fff;
}

/* Gold underline flourish used under key headings */
.nc-underline {
  position: relative;
  display: inline-block;
}
.nc-underline::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 8px;
  background: linear-gradient(90deg, var(--nc-gold-400), rgba(218, 172, 85, 0));
  border-radius: 8px;
}

.nc-lead {
  color: var(--nc-muted);
  font-size: 1.0625rem;
  line-height: 1.75;
}

/* Long-form article body (blog single, legal pages) */
.nc-prose {
  color: #33404f;
  font-size: 1.0625rem;
  line-height: 1.8;
}
.nc-prose > * + * {
  margin-top: 1.35em;
}
.nc-prose h2 {
  font-family: 'Plus Jakarta Sans', Inter, sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--nc-navy-900);
  margin-top: 2.2em;
}
.nc-prose h3 {
  font-family: 'Plus Jakarta Sans', Inter, sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--nc-navy-900);
  margin-top: 1.8em;
}
.nc-prose a {
  color: var(--nc-navy-600);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.nc-prose a:hover {
  color: var(--nc-gold-600);
}
.nc-prose ul,
.nc-prose ol {
  padding-left: 1.3em;
}
.nc-prose ul {
  list-style: disc;
}
.nc-prose ol {
  list-style: decimal;
}
.nc-prose li + li {
  margin-top: 0.5em;
}
.nc-prose blockquote {
  border-left: 3px solid var(--nc-gold-400);
  background: var(--nc-navy-50);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--nc-radius) var(--nc-radius) 0;
  font-size: 1.15rem;
  line-height: 1.6;
  font-weight: 500;
  color: var(--nc-navy-800);
}
.nc-prose img {
  border-radius: var(--nc-radius-lg);
}
.nc-prose figcaption {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--nc-muted);
  text-align: center;
}

/* ------------------------------------------------------------------
   4. Buttons
   ------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.8rem 1.5rem;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--nc-ease), box-shadow 0.25s var(--nc-ease),
    background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:active {
  transform: translateY(1px);
}
.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.btn-primary {
  background: var(--nc-navy-900);
  color: #fff;
}
.btn-primary:hover {
  background: var(--nc-navy-700);
  box-shadow: 0 14px 30px -14px rgba(10, 37, 64, 0.75);
  transform: translateY(-2px);
}

.btn-gold {
  background: linear-gradient(135deg, var(--nc-gold-400), var(--nc-gold-600));
  color: #21160a;
}
.btn-gold:hover {
  box-shadow: 0 16px 34px -14px rgba(200, 150, 58, 0.85);
  transform: translateY(-2px);
}

.btn-outline {
  border-color: var(--nc-line);
  background: #fff;
  color: var(--nc-navy-900);
}
.btn-outline:hover {
  border-color: var(--nc-navy-900);
  background: var(--nc-navy-900);
  color: #fff;
  transform: translateY(-2px);
}

.btn-ghost-light {
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
}
.btn-ghost-light:hover {
  background: #fff;
  color: var(--nc-navy-900);
  border-color: #fff;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.6rem 1.05rem;
  font-size: 0.8125rem;
  border-radius: 9px;
}

/* Keep the header account CTA out of compact/mobile layouts. */
.nc-header-open-account {
  display: none !important;
}
@media (min-width: 1024px) {
  .nc-header-open-account {
    display: inline-flex !important;
  }
}

.btn-lg {
  padding: 1rem 1.9rem;
  font-size: 1rem;
  border-radius: 12px;
}
.btn-block {
  width: 100%;
}

/* Text link with sliding arrow */
.nc-arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--nc-navy-700);
  transition: color 0.2s ease, gap 0.25s var(--nc-ease);
}
.nc-arrow-link:hover {
  color: var(--nc-gold-600);
  gap: 0.85rem;
}
.nc-arrow-link svg {
  width: 16px;
  height: 16px;
}

/* ------------------------------------------------------------------
   5. Forms
   ------------------------------------------------------------------ */
.nc-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--nc-navy-800);
  margin-bottom: 0.45rem;
}
.nc-input,
.nc-select,
.nc-textarea {
  width: 100%;
  border: 1px solid var(--nc-line);
  background: #fff;
  border-radius: 10px;
  padding: 0.8rem 1rem;
  font-size: 0.9375rem;
  color: var(--nc-ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.nc-input::placeholder,
.nc-textarea::placeholder {
  color: #98a6b8;
}
.nc-input:focus,
.nc-select:focus,
.nc-textarea:focus {
  outline: none;
  border-color: var(--nc-navy-600);
  box-shadow: 0 0 0 4px rgba(43, 82, 128, 0.12);
}
.nc-textarea {
  min-height: 140px;
  resize: vertical;
}
.nc-select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%235b6b80' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.95rem center;
  padding-right: 2.5rem;
}

/* Inputs shown on the dark navy panels */
.nc-input-dark {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
}
.nc-input-dark::placeholder {
  color: rgba(255, 255, 255, 0.5);
}
.nc-input-dark:focus {
  border-color: var(--nc-gold-400);
  box-shadow: 0 0 0 4px rgba(218, 172, 85, 0.16);
  background: rgba(255, 255, 255, 0.1);
}

/* Custom check / radio */
.nc-check {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 5px;
  border: 1.5px solid #c3cede;
  accent-color: var(--nc-navy-900);
  flex: none;
}

/* Range slider used by the calculators */
.nc-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 99px;
  background: var(--nc-navy-100);
  outline: none;
}
.nc-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 5px solid var(--nc-gold-500);
  cursor: grab;
  box-shadow: 0 3px 10px rgba(10, 37, 64, 0.25);
  transition: transform 0.15s ease;
}
.nc-range::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.12);
}
.nc-range::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 5px solid var(--nc-gold-500);
  cursor: grab;
  box-shadow: 0 3px 10px rgba(10, 37, 64, 0.25);
}

/* Validation + fake-submit states */
.nc-field-error {
  border-color: var(--nc-danger) !important;
  box-shadow: 0 0 0 4px rgba(214, 69, 69, 0.1) !important;
}
.nc-error-text {
  color: var(--nc-danger);
  font-size: 0.78rem;
  margin-top: 0.35rem;
  font-weight: 500;
}

/* ------------------------------------------------------------------
   6. Cards & surfaces
   ------------------------------------------------------------------ */
.nc-card {
  background: #fff;
  border: 1px solid var(--nc-line);
  border-radius: var(--nc-radius-lg);
  transition: transform 0.35s var(--nc-ease), box-shadow 0.35s var(--nc-ease),
    border-color 0.35s ease;
}
.nc-card-hover:hover {
  transform: translateY(-6px);
  border-color: transparent;
  box-shadow: 0 26px 60px -28px rgba(10, 37, 64, 0.4);
}

/* Icon chip used across feature grids */
.nc-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 15px;
  background: var(--nc-navy-50);
  color: var(--nc-navy-700);
  transition: background 0.3s ease, color 0.3s ease, transform 0.35s var(--nc-ease);
}
.nc-icon svg {
  width: 26px;
  height: 26px;
}
.nc-card-hover:hover .nc-icon {
  background: var(--nc-navy-900);
  color: var(--nc-gold-300);
  transform: rotate(-6deg);
}
.nc-icon--gold {
  background: #fdf4e3;
  color: var(--nc-gold-600);
}
.nc-icon--dark {
  background: rgba(255, 255, 255, 0.08);
  color: var(--nc-gold-300);
}

/* Glass panel over photography / navy */
.nc-glass {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* Media frame with the signature gold corner rule */
.nc-frame {
  position: relative;
  border-radius: var(--nc-radius-lg);
  overflow: hidden;
}
.nc-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--nc-ease);
}
.nc-frame:hover img {
  transform: scale(1.05);
}

/* Table styling for rates / fees */
.nc-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9375rem;
}
.nc-table thead th {
  background: var(--nc-navy-900);
  color: #fff;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0.95rem 1.15rem;
  text-align: left;
  white-space: nowrap;
}
.nc-table thead th:first-child {
  border-radius: 12px 0 0 0;
}
.nc-table thead th:last-child {
  border-radius: 0 12px 0 0;
}
.nc-table tbody td {
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--nc-line);
  color: #33404f;
  vertical-align: middle;
}
.nc-table tbody tr:hover td {
  background: var(--nc-navy-50);
}
.nc-table tbody tr:last-child td {
  border-bottom: 0;
}

/* ------------------------------------------------------------------
   7. Navigation
   ------------------------------------------------------------------ */
.nc-header {
  transition: box-shadow 0.3s ease, background-color 0.3s ease, transform 0.35s var(--nc-ease);
}
.nc-header--stuck {
  box-shadow: 0 6px 28px -14px rgba(10, 37, 64, 0.45);
  backdrop-filter: blur(10px);
}

.nc-navlink {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--nc-navy-800);
  transition: color 0.2s ease;
}
.nc-navlink::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  height: 2px;
  width: 0;
  background: var(--nc-gold-500);
  border-radius: 2px;
  transition: width 0.3s var(--nc-ease);
}
.nc-navlink:hover,
.nc-navlink[data-active='true'] {
  color: var(--nc-navy-900);
}
.nc-navlink:hover::after,
.nc-navlink[data-active='true']::after {
  width: 100%;
}

/* Mega-menu / dropdown panel */
.nc-menu-panel {
  border: 1px solid var(--nc-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 30px 70px -30px rgba(10, 37, 64, 0.45);
}
.nc-menu-item {
  display: flex;
  gap: 0.85rem;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  transition: background 0.2s ease, transform 0.25s var(--nc-ease);
}
.nc-menu-item:hover {
  background: var(--nc-navy-50);
  transform: translateX(3px);
}

/* Mobile drawer accordion trigger */
.nc-drawer-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.9rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--nc-navy-900);
  border-bottom: 1px solid var(--nc-line);
}

/* Breadcrumb */
.nc-crumb a {
  color: rgba(255, 255, 255, 0.72);
  transition: color 0.2s ease;
}
.nc-crumb a:hover {
  color: var(--nc-gold-300);
}

/* ------------------------------------------------------------------
   8. Decorative
   ------------------------------------------------------------------ */
/* Fine grid overlay used on navy hero sections */
.nc-grid-overlay {
  background-image: linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 58px 58px;
}

/* Soft radial brand glow */
.nc-glow-gold {
  background: radial-gradient(circle at center, rgba(218, 172, 85, 0.4), transparent 68%);
}
.nc-glow-navy {
  background: radial-gradient(circle at center, rgba(43, 82, 128, 0.55), transparent 70%);
}

/* Diagonal navy gradient used on CTA / stat bands */
.nc-navy-gradient {
  background: linear-gradient(135deg, #05162a 0%, #0a2540 45%, #1d3f67 100%);
}

/* Logo marquee */
.nc-marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.nc-marquee__track {
  display: flex;
  width: max-content;
  animation: nc-marquee 34s linear infinite;
}
.nc-marquee:hover .nc-marquee__track {
  animation-play-state: paused;
}
@keyframes nc-marquee {
  to {
    transform: translateX(-50%);
  }
}

/* Vertical connector for timelines / process steps */
.nc-step::before {
  content: '';
  position: absolute;
  left: 27px;
  top: 56px;
  bottom: -34px;
  width: 2px;
  background: linear-gradient(var(--nc-navy-100), transparent);
}
.nc-step:last-child::before {
  display: none;
}

/* Ratio boxes for maps and embeds */
.nc-ratio {
  position: relative;
  width: 100%;
}
.nc-ratio > iframe,
.nc-ratio > img,
.nc-ratio > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.nc-ratio--map {
  padding-top: 62%;
}
.nc-ratio--video {
  padding-top: 56.25%;
}

/* Greyscale map skin so the embed matches the palette */
.nc-map-skin iframe {
  filter: grayscale(0.55) contrast(1.05);
  transition: filter 0.5s ease;
}
.nc-map-skin:hover iframe {
  filter: grayscale(0) contrast(1);
}

/* ------------------------------------------------------------------
   9. Scroll reveal & motion
   ------------------------------------------------------------------ */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.75s var(--nc-ease), transform 0.75s var(--nc-ease);
  will-change: opacity, transform;
}
[data-reveal='left'] {
  transform: translateX(-32px);
}
[data-reveal='right'] {
  transform: translateX(32px);
}
[data-reveal='zoom'] {
  transform: scale(0.94);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* Skeleton shimmer for lazily-loaded imagery */
.nc-skeleton {
  background: linear-gradient(90deg, #eef2f7 25%, #f7fafc 37%, #eef2f7 63%);
  background-size: 500px 100%;
  animation: nc-shimmer 1.6s linear infinite;
}
@keyframes nc-shimmer {
  to {
    background-position: 500px 0;
  }
}

@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;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* ------------------------------------------------------------------
   10. Utilities
   ------------------------------------------------------------------ */
.nc-hide-scrollbar::-webkit-scrollbar {
  display: none;
}
.nc-hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.nc-balance {
  text-wrap: balance;
}

.nc-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--nc-line), transparent);
}

/* Skip-to-content link for keyboard users */
.nc-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 0.85rem 1.4rem;
  background: var(--nc-navy-900);
  color: #fff;
  font-weight: 600;
  border-radius: 0 0 10px 0;
}
.nc-skip:focus {
  left: 0;
}

/* ------------------------------------------------------------------
   11. Print
   ------------------------------------------------------------------ */
@media print {
  .nc-header,
  footer,
  .nc-no-print {
    display: none !important;
  }
  body {
    color: #000;
  }
  a[href^='http']::after {
    content: ' (' attr(href) ')';
    font-size: 0.75em;
    color: #555;
  }
}
