/* ═══════════════════════════════════════════════
   ROYAL MARINE INSURANCE — Shared Stylesheet
   Fonts: Playfair Display + Barlow + Barlow Condensed
   ═══════════════════════════════════════════════ */

@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=Barlow:wght@300;400;500;600&family=Barlow+Condensed:wght@400;600;700&display=swap");

/* ─── TOKENS ─── */
:root {
  --green: #1a6b2f;
  --green-dark: #0f4a1f;
  --green-light: #2a8a40;
  --green-pale: #e8f4ec;
  --black: #111;
  --gray: #555;
  --light: #f7f9f7;
  --white: #fff;
  --gold: #c9a84c;
  --gold-hover: #e0b85a;
  --radius: 2px;
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* ─── RESET ─── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: "Barlow", sans-serif;
  color: var(--black);
  background: var(--white);
  overflow-x: hidden;
}
a {
  text-decoration: none;
  color: inherit;
}
img {
  display: block;
  max-width: 100%;
}

/* ─── TOP BAR ─── */
.top-bar {
  background: var(--green-dark);
  color: #cde8d4;
  font-size: 0.78rem;
  font-family: "Barlow Condensed", sans-serif;
  letter-spacing: 0.06em;
  padding: 8px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.top-bar a {
  color: #cde8d4;
  margin-left: 24px;
  transition: color 0.2s;
}
.top-bar a:hover {
  color: var(--white);
}
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}
.top-bar .btn-login {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #cde8d4;
  padding: 4px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.07em;
  transition: all 0.2s;
}
.top-bar .btn-login:hover {
  background: rgba(255, 255, 255, 0.12);
}
.top-bar .btn-started {
  background: var(--gold);
  color: #111;
  border: none;
  padding: 5px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.2s;
}
.top-bar .btn-started:hover {
  background: var(--gold-hover);
}

/* ─── NAVBAR ─── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid #e0e9e2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 72px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s;
}
nav.scrolled {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}
.nav-logo {
  display: flex;
  align-items: center;
}
.nav-logo img {
  height: 48px;
  object-fit: contain;
}
.nav-logo-text {
  font-family: "Playfair Display", serif;
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--green);
}
.nav-logo-sub {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 600;
  vertical-align: middle;
}
.nav-links {
  display: flex;
  list-style: none;
  gap: 36px;
}
.nav-links a {
  color: var(--black);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  position: relative;
  padding-bottom: 4px;
  transition: color 0.2s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--green);
  transition: width 0.25s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--green);
}
.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.hamburger span {
  width: 26px;
  height: 2px;
  background: var(--black);
  display: block;
  border-radius: 2px;
  transition: all 0.3s;
}

/* ─── MOBILE MENU ─── */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--white);
  z-index: 200;
  flex-direction: column;
  padding: 30px 40px;
}
.mobile-nav.open {
  display: flex;
}
.mobile-nav-close {
  align-self: flex-end;
  font-size: 1.6rem;
  background: none;
  border: none;
  cursor: pointer;
  margin-bottom: 30px;
  color: var(--black);
}
.mobile-nav a {
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--black);
  padding: 12px 0;
  border-bottom: 1px solid #eee;
  transition: color 0.2s;
}
.mobile-nav a:hover {
  color: var(--green);
}

/* ─── SHARED BUTTONS ─── */
.btn-primary {
  display: inline-block;
  background: var(--green);
  color: #fff;
  padding: 14px 32px;
  border: none;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.92rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  cursor: pointer;
  border-radius: var(--radius);
  transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover {
  background: var(--green-light);
  transform: translateY(-2px);
}
.btn-outline {
  display: inline-block;
  background: transparent;
  color: #fff;
  padding: 13px 30px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.92rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius);
  transition: all 0.2s;
}
.btn-outline:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

/* ─── SHARED SECTION LABELS ─── */
.section-label {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 12px;
}
.section-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700;
  color: var(--black);
  margin-bottom: 14px;
}
.section-sub {
  font-size: 1rem;
  color: var(--gray);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 54px;
  font-weight: 300;
}

/* ─── FOOTER ─── */
footer {
  background: var(--black);
  color: rgba(255, 255, 255, 0.65);
  padding: 60px 80px 32px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-logo-name {
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 4px;
}
.footer-logo-sub {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-tagline {
  font-size: 0.88rem;
  line-height: 1.7;
  font-weight: 300;
  max-width: 240px;
}
.footer-col h5 {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.88rem;
  font-weight: 300;
  margin-bottom: 10px;
  transition: color 0.2s;
}
.footer-col a:hover {
  color: var(--white);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  font-size: 0.78rem;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom a {
  color: rgba(255, 255, 255, 0.45);
  margin-left: 20px;
}
.footer-bottom a:hover {
  color: rgba(255, 255, 255, 0.8);
}

/* ══════════════════════════════════════════════
      VERIFY PAGE — verify-split-page
      ══════════════════════════════════════════════ */

body.verify-split-page {
  background: var(--light);
}

/* Page wrapper: two columns */
.verify-container {
  min-height: calc(100vh - 72px - 38px);
  display: flex;
  flex-direction: row-reverse;
  align-items: stretch;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 40px;
  gap: 60px;
}

/* ── LEFT COLUMN: info ── */
.verify-info {
  flex: 1;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  animation: slideup 0.7s 0.1s both ease-out;
}

/* Eyebrow */
.vi-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
.vi-line {
  display: block;
  width: 32px;
  height: 2px;
  background: var(--green);
  flex-shrink: 0;
}
.vi-tag {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 600;
}

/* Heading */
.vi-heading {
  font-family: "Playfair Display", serif;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 900;
  line-height: 1.1;
  color: var(--black);
  margin-bottom: 22px;
}

/* Description */
.vi-desc {
  font-size: 0.97rem;
  color: var(--gray);
  line-height: 1.8;
  font-weight: 300;
  max-width: 420px;
  margin-bottom: 40px;
}

/* Feature rows */
.vi-features {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-bottom: 36px;
}
.vi-feature {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}
.vi-feature-icon {
  width: 40px;
  height: 40px;
  background: var(--green-pale);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  font-size: 0.9rem;
  flex-shrink: 0;
  margin-top: 1px;
  transition: background 0.2s, color 0.2s;
}
.vi-feature:hover .vi-feature-icon {
  background: var(--green);
  color: #fff;
}
.vi-feature-body h4 {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 4px;
}
.vi-feature-body p {
  font-size: 0.85rem;
  color: var(--gray);
  line-height: 1.6;
  font-weight: 300;
}

/* Divider */
.vi-divider {
  width: 48px;
  height: 1px;
  background: #d5e5d8;
  margin-bottom: 22px;
}

/* Footnote */
.vi-footnote {
  font-size: 0.78rem;
  color: #9aada0;
  font-weight: 300;
  line-height: 1.6;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 380px;
}
.vi-footnote i {
  color: var(--green);
  margin-top: 2px;
  font-size: 0.8rem;
  flex-shrink: 0;
  opacity: 0.6;
}

/* ── RIGHT COLUMN: scanner panel ── */
.verify-form-area {
  flex: 1;
  min-width: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: slideup 0.7s 0.25s both ease-out;
}

/* Dark terminal panel */
.scanner-panel {
  width: 100%;
  max-width: 440px;
  background: #0d1f12;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(26, 107, 47, 0.4), 0 24px 60px rgba(0, 0, 0, 0.35),
    0 0 40px rgba(26, 107, 47, 0.08);
}

/* Header bar */
.scanner-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: #0a160d;
  border-bottom: 1px solid rgba(26, 107, 47, 0.25);
}
.scanner-header-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.scanner-header-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}
.scanner-header-label {
  flex: 1;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.3);
  text-transform: uppercase;
  text-align: center;
}
.scanner-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
  transition: background 0.4s, box-shadow 0.4s;
}
.scanner-status-dot.checking {
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
  animation: blink 0.7s infinite alternate;
}
.scanner-status-dot.valid {
  background: #4ade80;
  box-shadow: 0 0 10px #4ade80;
}
.scanner-status-dot.invalid {
  background: #f87171;
  box-shadow: 0 0 10px #f87171;
}
@keyframes blink {
  from {
    opacity: 1;
  }
  to {
    opacity: 0.3;
  }
}

/* Body */
.scanner-body {
  padding: 40px 36px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* Shield icon */
.scanner-icon-wrap {
  position: relative;
  width: 80px;
  height: 90px;
  margin-bottom: 24px;
  flex-shrink: 0;
}
.scanner-shield {
  width: 100%;
  height: 100%;
}
.scan-line {
  position: absolute;
  left: 6px;
  right: 6px;
  top: 10px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--green), transparent);
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.2s;
}
.scan-line.active {
  opacity: 1;
  animation: scanDown 1.4s ease-in-out infinite;
}
@keyframes scanDown {
  0% {
    top: 10px;
  }
  50% {
    top: 74px;
  }
  100% {
    top: 10px;
  }
}

.scanner-prompt {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 28px;
  text-align: center;
}

/* Certificate input group */
.cert-input-group {
  display: flex;
  align-items: stretch;
  width: 100%;
  border: 1px solid rgba(26, 107, 47, 0.5);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #0a160d;
}
.cert-input-group:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(26, 107, 47, 0.2), 0 0 20px rgba(26, 107, 47, 0.1);
}
.cert-prefix {
  padding: 0 16px;
  background: rgba(26, 107, 47, 0.2);
  border-right: 1px solid rgba(26, 107, 47, 0.4);
  color: var(--green);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  user-select: none;
}
.cert-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 16px 18px;
  color: #e0f2e6;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.15rem;
  letter-spacing: 0.12em;
  caret-color: var(--green);
}
.cert-input::placeholder {
  color: rgba(255, 255, 255, 0.18);
}

.cert-hint {
  align-self: flex-start;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.22);
  font-weight: 300;
  margin-top: 8px;
  margin-bottom: 28px;
  line-height: 1.5;
}

/* Authenticate button */
.scan-btn {
  width: 100%;
  background: var(--green);
  border: none;
  border-radius: 4px;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  transition: background 0.2s;
}
.scan-btn:hover {
  background: var(--green-light);
}
.scan-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}
.scan-btn-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 24px;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.88rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: #fff;
}
/* Shimmer sweep on hover */
.scan-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.12) 50%,
    transparent 60%
  );
  transform: translateX(-100%);
  transition: transform 0.45s ease;
}
.scan-btn:hover::after {
  transform: translateX(100%);
}
.scan-btn.loading .scan-btn-inner i {
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Result */
.result-message {
  display: none;
  width: 100%;
  margin-top: 20px;
  border-radius: 4px;
  overflow: hidden;
  animation: fadeSlideUp 0.35s ease;
}
.result-message.show {
  display: flex;
}
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.result-message.valid {
  background: rgba(74, 222, 128, 0.07);
  border: 1px solid rgba(74, 222, 128, 0.25);
}
.result-message.invalid {
  background: rgba(248, 113, 113, 0.07);
  border: 1px solid rgba(248, 113, 113, 0.2);
}
.result-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 20px;
  flex-shrink: 0;
  font-size: 1.1rem;
}
.result-icon-wrap.valid {
  color: #4ade80;
}
.result-icon-wrap.invalid {
  color: #f87171;
}
.result-text {
  padding: 14px 16px 14px 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.result-text strong {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 700;
}
.result-text span {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.5;
  font-weight: 300;
}
.result-text em {
  font-style: normal;
  color: rgba(255, 255, 255, 0.6);
}

/* Footer strip */
.scanner-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px;
  background: #0a160d;
  border-top: 1px solid rgba(26, 107, 47, 0.18);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.2);
  text-transform: uppercase;
}

/* ─── ANIMATIONS ─── */
@keyframes slideup {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .nav-links {
    display: none;
  }
  .hamburger {
    display: flex;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
  footer {
    padding: 50px 30px 24px;
  }
}
@media (max-width: 768px) {
  .verify-container {
    flex-direction: column;
    padding: 48px 24px;
    gap: 40px;
  }
  .verify-info h1 {
    font-size: 2.4rem;
  }
}
@media (max-width: 600px) {
  .top-bar {
    display: none;
  }
  nav {
    padding: 0 20px;
  }
  .footer-top {
    grid-template-columns: 1fr;
  }
  footer {
    padding: 40px 20px 20px;
  }
  .form-card {
    padding: 32px 22px;
  }
}

/* Allow the result box to grow and animate smoothly */
.result-message.show {
  display: block !important;
  animation: slideUp 0.4s ease forwards;
  margin-top: 25px;
  text-align: left; /* Align text left for the PDF layout */
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Specific styling for the PDF container */
.pdf-preview-container {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
  position: relative;
}

/* Responsive tweak for mobile */
@media (max-width: 480px) {
  .pdf-preview-container {
    height: 200px;
  }
  .result-actions {
    flex-direction: column;
  }
}
