/* Achora Trust CU — fictional demo bank template. One stylesheet, five presets.
   Presets are applied by a data-preset attribute on <html> (see assets/js/main.js).
   No external assets: system fonts only. Animations use transform/opacity only. */

* { box-sizing: border-box; }
:root,
[data-preset="modern-blue"] {
  --bg: #f4f8fb;
  --surface: #ffffff;
  --text: #10233a;
  --muted: #5b6d80;
  --primary: #0b63ce;
  --primary-dark: #084c9f;
  --accent: #35a2ff;
  --header-bg: rgba(255, 255, 255, 0.78);
  --header-text: #10233a;
  --footer-bg: #0b2540;
  --footer-text: #d7e4f2;
  --glass-bg: rgba(255, 255, 255, 0.68);
  --card-border: rgba(16, 35, 58, 0.10);
  --btn-radius: 999px;
  --hero-grad: linear-gradient(135deg, #0b63ce, #35a2ff);
}
[data-preset="classic-red-gold"] {
  --bg: #faf7f1;
  --surface: #fffdf8;
  --text: #2a1218;
  --muted: #6d5a55;
  --primary: #8f1d33;
  --primary-dark: #6d1425;
  --accent: #c9a227;
  --header-bg: rgba(255, 253, 248, 0.85);
  --header-text: #2a1218;
  --footer-bg: #2a0d13;
  --footer-text: #f3e6c8;
  --glass-bg: rgba(255, 253, 248, 0.72);
  --card-border: rgba(42, 18, 24, 0.12);
  --btn-radius: 6px;
  --hero-grad: linear-gradient(135deg, #8f1d33, #b98a1f);
}
[data-preset="deep-navy"] {
  --bg: #f2f5f8;
  --surface: #ffffff;
  --text: #12263f;
  --muted: #5a6d82;
  --primary: #16365f;
  --primary-dark: #0e2543;
  --accent: #7fa8d7;
  --header-bg: rgba(16, 35, 63, 0.86);
  --header-text: #ffffff;
  --footer-bg: #0a182c;
  --footer-text: #cfdeee;
  --glass-bg: rgba(255, 255, 255, 0.70);
  --card-border: rgba(18, 38, 63, 0.10);
  --btn-radius: 10px;
  --hero-grad: linear-gradient(135deg, #16365f, #2f5f8f);
}
[data-preset="sky-teal"] {
  --bg: #f2faf9;
  --surface: #ffffff;
  --text: #0c2e33;
  --muted: #54727a;
  --primary: #0e7c86;
  --primary-dark: #0a5c64;
  --accent: #3ec6c6;
  --header-bg: rgba(255, 255, 255, 0.80);
  --header-text: #0c2e33;
  --footer-bg: #0b3f47;
  --footer-text: #d5f0ee;
  --glass-bg: rgba(255, 255, 255, 0.70);
  --card-border: rgba(12, 46, 51, 0.10);
  --btn-radius: 999px;
  --hero-grad: linear-gradient(135deg, #0e7c86, #3ec6c6);
}
[data-preset="forest-gold"] {
  --bg: #f4f8f3;
  --surface: #ffffff;
  --text: #14291d;
  --muted: #55695c;
  --primary: #1d4a33;
  --primary-dark: #143626;
  --accent: #c9a227;
  --header-bg: rgba(18, 46, 30, 0.88);
  --header-text: #ffffff;
  --footer-bg: #10271a;
  --footer-text: #e2ecd9;
  --glass-bg: rgba(255, 255, 255, 0.70);
  --card-border: rgba(20, 41, 29, 0.10);
  --btn-radius: 4px;
  --hero-grad: linear-gradient(135deg, #1d4a33, #3d7a4f);
}

html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
section[id] { scroll-margin-top: 96px; }

/* ---------- Glass sticky header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid var(--card-border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 72px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--header-text); }
.brand img { width: 44px; height: 44px; border-radius: 10px; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.15rem; }
.brand-text small { font-size: 0.8rem; opacity: 0.75; }
.main-nav { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.main-nav > a, .dropbtn {
  position: relative;
  color: var(--header-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px 0;
  font-family: inherit;
}
.main-nav > a::after, .dropbtn::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 2px;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.main-nav > a:hover::after, .main-nav > a.active::after,
.dropbtn:hover::after, .dropdown.open .dropbtn::after { transform: scaleX(1); }
.main-nav > a.active { color: var(--primary); }
[data-preset="deep-navy"] .main-nav > a.active,
[data-preset="forest-gold"] .main-nav > a.active { color: var(--accent); }
.dropdown { position: relative; }
.dropmenu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 220px;
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(16, 35, 58, 0.16);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s linear 0.22s;
  z-index: 120;
}
.dropdown:hover .dropmenu, .dropdown:focus-within .dropmenu, .dropdown.open .dropmenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s linear 0s;
}
.dropmenu a {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}
.dropmenu a:hover { background: var(--bg); color: var(--primary); }
.header-cta { display: flex; align-items: center; gap: 10px; }
.menu-toggle {
  display: none;
  background: var(--primary);
  color: #fff;
  border: 0;
  border-radius: var(--btn-radius);
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
}
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: min(320px, 86vw);
  height: 100vh;
  background: #ffffff;
  color: var(--text);
  z-index: 200;
  padding: 20px;
  overflow-y: auto;
  box-shadow: -16px 0 40px rgba(0, 0, 0, 0.2);
  transform: translateX(100%);
  transition: transform 0.3s ease;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu a { color: var(--text); text-decoration: none; font-weight: 600; display: block; padding: 10px 0; }
.mobile-menu .m-sub { padding-left: 16px; }
.mobile-menu .m-sub a { font-weight: 500; color: var(--muted); }
.mobile-menu .m-group > button {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  font: inherit;
  font-weight: 700;
  padding: 10px 0;
  cursor: pointer;
}
.mobile-menu .m-group .m-sub { display: none; }
.mobile-menu .m-group.open .m-sub { display: block; }
.menu-close {
  background: none;
  border: 0;
  font-size: 1.6rem;
  cursor: pointer;
  float: right;
  line-height: 1;
}
.menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 35, 0.45);
  z-index: 150;
}
body.menu-open .menu-overlay { display: block; }
body.menu-open { overflow: hidden; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--btn-radius);
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(16, 35, 58, 0.18); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-outline { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-light { background: #ffffff; color: var(--primary); }
.btn-light:hover { background: #f0f5fa; color: var(--primary-dark); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.85); color: #ffffff; background: transparent; }
.btn-ghost:hover { background: #ffffff; color: var(--primary); }
.btn-large { padding: 16px 32px; font-size: 1.1rem; }
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  pointer-events: none;
}

/* ---------- Hero, sections, cards ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--hero-grad);
  color: #fff;
  border-radius: 20px;
  margin: 28px 0;
  padding: 56px 40px;
}
.hero::after {
  content: "";
  position: absolute;
  top: -30%;
  bottom: -30%;
  width: 34%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  transform: skewX(-18deg) translateX(-160%);
  animation: heroShine 14s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes heroShine {
  from { transform: skewX(-18deg) translateX(-160%); }
  to { transform: skewX(-18deg) translateX(420%); }
}
.hero h1 { font-size: 2.6rem; line-height: 1.15; margin: 0 0 12px; max-width: 640px; }
.hero p { max-width: 620px; font-size: 1.1rem; opacity: 0.94; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.hero.has-image { background: #0b1c33; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; transition: opacity .8s ease; }
.hero-img.fading { opacity: 0; }
.hero.has-image::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6,18,38,.72), rgba(6,18,38,.38) 60%, rgba(6,18,38,.15)); z-index: 1; }
.hero::after { z-index: 1; }
.hero .wrap { position: relative; z-index: 2; }
.section { padding: 36px 0; }
.section h2 { font-size: 1.9rem; margin: 0 0 8px; }
.lead { color: var(--muted); max-width: 720px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 22px; }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(16, 35, 58, 0.12); }
.card h3 { margin-top: 0; }
.card .icon { font-size: 1.8rem; }
.section-img { display: block; width: 100%; height: 260px; object-fit: cover; border-radius: 16px; margin-bottom: 20px; }
.product-card { padding: 0; overflow: hidden; }
.product-card .product-body { padding: 24px; }
.product-img { display: block; width: 100%; height: 180px; object-fit: cover; }
.product-img-placeholder { display: flex; align-items: center; justify-content: center; width: 100%; height: 180px; background: var(--hero-grad); color: #fff; font-size: 3rem; font-weight: 700; }
@media (max-width: 640px) { .section-img { height: 180px; } }
.glass-panel {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 28px;
}
.rates-note, .notice {
  background: #fff8e1;
  border: 1px solid #f0d98c;
  border-radius: 12px;
  padding: 14px 18px;
  margin: 18px 0;
}
.notice.warn { background: #fdf0ef; border-color: #e8a9a4; }
.stats { display: flex; gap: 32px; flex-wrap: wrap; margin-top: 20px; }
.stat b { font-size: 2.1rem; display: block; color: var(--primary); line-height: 1.1; }
.stat span { color: var(--muted); }
.cta-band {
  background: var(--hero-grad);
  color: #fff;
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  margin: 36px 0;
}
.cta-band h2 { margin-top: 0; }
.legal-text { white-space: pre-line; }
.dest { font-size: 0.9rem; color: var(--muted); word-break: break-all; }
.center { text-align: center; }
.narrow { max-width: 680px; margin: 0 auto; }

/* ---------- Forms ---------- */
form label { display: block; font-weight: 600; margin: 14px 0 6px; }
form input[type="text"], form input[type="email"], form input[type="url"],
form textarea, form select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  font: inherit;
  background: #fff;
  color: var(--text);
}
form textarea { min-height: 140px; resize: vertical; }
form small, .help { color: var(--muted); font-size: 0.88rem; display: block; margin-top: 4px; }
.hp { display: none !important; }
.form-status { margin-top: 16px; padding: 14px 18px; border-radius: 12px; display: none; }
.form-status.show { display: block; }
.form-status.success { background: #e6f4ea; border: 1px solid #a3d9b1; }
.form-status.error { background: #fdf0ef; border: 1px solid #e8a9a4; }

/* ---------- Footer / back to top ---------- */
.site-footer { background: var(--footer-bg); color: var(--footer-text); margin-top: 48px; padding: 44px 0 24px; }
.site-footer a { color: var(--footer-text); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.site-footer h4 { margin: 0 0 10px; color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 6px 0; }
.demo-notice {
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  margin-top: 28px;
  padding-top: 18px;
  font-size: 0.9rem;
  opacity: 0.9;
}
.copyright { font-size: 0.88rem; opacity: 0.75; }
#toTop {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 130;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 0;
  background: var(--primary);
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(16, 35, 58, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
}
#toTop.show { opacity: 1; visibility: visible; transform: translateY(0); transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0s; }

/* ---------- Admin ---------- */
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.admin-card { background: var(--surface); border: 1px solid var(--card-border); border-radius: 16px; padding: 24px; }
.admin-card h3 { margin-top: 0; }
.preset-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  margin: 8px 0;
  border: 2px solid var(--card-border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.preset-option:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(16, 35, 58, 0.12); }
.preset-option.selected { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(11, 99, 206, 0.15); }
.swatches { display: flex; gap: 5px; }
.swatches i { width: 20px; height: 20px; border-radius: 50%; display: inline-block; border: 1px solid rgba(0, 0, 0, 0.15); }
.logo-preview { max-width: 120px; max-height: 120px; display: block; margin: 10px 0; border-radius: 10px; }
.admin-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* ---------- Motion: entrance, reveal, page fade ---------- */
.js body { animation: pageFade 0.35s ease both; }
@keyframes pageFade { from { opacity: 0; } to { opacity: 1; } }
.js .hero-anim { opacity: 0; transform: translateY(16px); }
.js .hero-anim.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: var(--d, 0s);
}
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; transition-delay: var(--d, 0s); }
.js .reveal.visible { opacity: 1; transform: none; }
.js .reveal-group > .reveal:nth-child(2) { --d: 0.08s; }
.js .reveal-group > .reveal:nth-child(3) { --d: 0.16s; }
.js .reveal-group > .reveal:nth-child(4) { --d: 0.24s; }
.js .reveal-group > .reveal:nth-child(5) { --d: 0.32s; }
.js .reveal-group > .reveal:nth-child(6) { --d: 0.40s; }

/* ---------- Reduced motion: everything appears, nothing animates ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js .reveal, .js .hero-anim { opacity: 1 !important; transform: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .main-nav { display: none; }
  .menu-toggle { display: inline-block; }
  .header-cta .btn { display: none; }
  .grid { grid-template-columns: 1fr 1fr; }
  .admin-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
  .hero { padding: 40px 24px; }
}
@media (max-width: 640px) {
  .grid, .grid.two { grid-template-columns: 1fr; }
  .brand-text small { display: none; }
}

/* ---------- Laravel additions: utilities + responsive (1024 / 768 / 480) ---------- */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.rates-table { width: 100%; border-collapse: collapse; background: var(--surface); }
.rates-table th, .rates-table td { text-align: left; padding: 12px; border-bottom: 1px solid var(--card-border); }
.alert { border-radius: 12px; padding: 14px 18px; margin: 18px 0; }
.alert-success { background: #e6f4ea; border: 1px solid #a3d9b1; }
.alert-error { background: #fdf0ef; border: 1px solid #e8a9a4; }
.alert ul { margin: 6px 0 0; }
.menu-list { list-style: none; padding: 0; }
.menu-list li { margin: 10px 0; }
.menu-list a { font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
.brand-mark { width: 44px; height: 44px; border-radius: 10px; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.3rem; flex: none; }
.brand-logo { width: 44px; height: 44px; border-radius: 10px; object-fit: contain; }
.dest { word-break: break-all; }

/* Touch targets: nav links, buttons, dropdown items, footer links >= 44px tall */
.main-nav > a, .dropbtn, .dropmenu a, .mobile-menu a, .mobile-menu .m-group > button,
.site-footer a, .btn { min-height: 44px; }
.main-nav > a, .dropbtn { display: inline-flex; align-items: center; }
.dropmenu a { min-height: 44px; display: flex; align-items: center; }

@media (max-width: 1024px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 2.3rem; }
  .header-inner { gap: 16px; }
}
@media (max-width: 768px) {
  .grid, .grid.two { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 36px 20px; margin: 16px 0; }
  .hero h1 { font-size: 1.8rem; }
  .hero p { font-size: 1rem; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .section { padding: 24px 0; }
  .section h2 { font-size: 1.5rem; }
  .stats { gap: 20px; }
  form input[type="text"], form input[type="email"], form input[type="url"],
  form input[type="password"], form textarea, form select { font-size: 16px; padding: 14px; }
  .cta-band { padding: 28px 20px; }
  #toTop { right: 16px; bottom: 16px; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 1.5rem; }
  .brand-text small { display: none; }
  .wrap { padding: 0 16px; }
  .card { padding: 18px; }
  .site-footer { padding: 32px 0 20px; }
}
