/* styles/global.css */

/* ===============================
   DESIGN TOKENS
================================= */
:root {
  --mobile-page-gutter: 16px;

  --page-max-width: 1200px;
  --page-max-width-wide: 1320px;
  --page-gutter: clamp(16px, 4vw, 48px);

  --section-spacing-desktop: clamp(56px, 7vw, 88px);
  --section-spacing-tablet: clamp(48px, 6vw, 68px);
  --section-spacing-mobile: 44px;
  --mobile-section-spacing: var(--section-spacing-mobile);

  --font-primary: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  --color-bg: #0b0b0c;
  --color-bg-soft: #111113;
  --color-surface: #171719;
  --color-surface-light: #1d1d20;

  --color-text: #f6f1e8;
  --color-text-muted: rgba(246, 241, 232, 0.76);
  --color-text-soft: rgba(246, 241, 232, 0.62);

  --color-gold: #d4af37;
  --color-gold-light: #f2d675;
  --color-gold-soft: rgba(212, 175, 55, 0.16);
  --color-border: rgba(212, 175, 55, 0.18);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --shadow-card: 0 18px 46px rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.22);
}

/* ===============================
   FORM STRUCTURE RESET
================================= */
fieldset {
  border: none;
  margin: 0;
  padding: 0;
  min-width: 0;
}

legend {
  padding: 0;
}

/* ===============================
   ACCESSIBILITY HELPERS
================================= */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.site-container {
  width: min(var(--page-max-width), calc(100% - (var(--page-gutter) * 2)));
  margin-inline: auto;
}

.site-container-wide {
  width: min(var(--page-max-width-wide), calc(100% - (var(--page-gutter) * 2)));
  margin-inline: auto;
}

/* ===============================
   GLOBAL BASE + OVERFLOW GUARDS
================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  background:
    radial-gradient(circle at top left, rgba(212, 175, 55, 0.08), transparent 32%),
    linear-gradient(180deg, #111113 0%, #0b0b0c 48%, #090909 100%);
  color: var(--color-text);
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  overflow-x: hidden;
}

body {
  padding-left: 0;
  padding-right: 0;
  position: relative;
}

h1,
h2,
h3,
h4,
h5,
h6,
button,
input,
select,
textarea {
  font-family: inherit;
}

h1,
h2,
h3 {
  letter-spacing: -0.035em;
}

p {
  color: var(--color-text-muted);
}

a,
a:visited {
  color: inherit;
}

img,
video,
canvas,
svg {
  max-width: 100%;
  height: auto;
}

#header,
#hero,
#about-us,
#contact-us,
#footer {
  max-width: 100%;
  overflow-x: clip;
}

.hero-wrapper,
#interactive-cards {
  max-width: 100%;
  overflow: visible;
}

/* ===============================
   BUTTON STYLES
================================= */
.primary-cta,
.secondary-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.92rem;
  line-height: 1;
  cursor: pointer;
  text-align: center;
  max-width: 100%;
  width: auto;
  text-decoration: none;
  appearance: none;
  -webkit-appearance: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  transition:
    background 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.2s ease;
}

.primary-cta {
  background: linear-gradient(135deg, #f7e29c 0%, #d4af37 52%, #b89224 100%);
  color: #070707;
  padding: 14px 24px;
  border: 1px solid rgba(247, 226, 156, 0.65);
  box-shadow:
    0 12px 26px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 248, 220, 0.34);
}

.primary-cta:hover,
.primary-cta:focus-visible {
  background: linear-gradient(135deg, #ffeaa4 0%, #e2bd46 52%, #c49b29 100%);
  color: #050505;
  border-color: rgba(247, 226, 156, 0.9);
  box-shadow:
    0 16px 32px rgba(0, 0, 0, 0.34),
    0 0 18px rgba(212, 175, 55, 0.18);
  transform: translateY(-1px);
}

.primary-cta:focus-visible,
.secondary-cta:focus-visible {
  outline: 2px solid rgba(212, 175, 55, 0.82);
  outline-offset: 3px;
}

.primary-cta,
.primary-cta:link,
.primary-cta:visited,
.primary-cta:hover,
.primary-cta:focus,
.primary-cta:active,
.secondary-cta,
.secondary-cta:link,
.secondary-cta:visited,
.secondary-cta:hover,
.secondary-cta:focus,
.secondary-cta:active {
  text-decoration: none;
}

.secondary-cta {
  background: rgba(255, 255, 255, 0.035);
  color: var(--color-gold-light);
  border: 1px solid rgba(212, 175, 55, 0.36);
  padding: 14px 24px;
}

.secondary-cta:hover,
.secondary-cta:focus-visible {
  background: rgba(212, 175, 55, 0.12);
  color: #fff4cc;
  border-color: rgba(212, 175, 55, 0.72);
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.1);
}

/* ===============================
   REFINED INLINE LINK STYLES
================================= */
.about-us p a,
.about-us li a,
.footer-founder a {
  position: relative;
  color: var(--color-gold-light);
  text-decoration: none;
  transition:
    color 0.25s ease,
    opacity 0.25s ease;
}

.about-us p a:visited,
.about-us li a:visited,
.footer-founder a:visited {
  color: var(--color-gold-light);
}

.about-us p a::after,
.about-us li a::after,
.footer-founder a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.12em;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(247, 226, 156, 0.95) 0%, #d4af37 100%);
  transform: scaleX(0.38);
  transform-origin: left center;
  opacity: 0.7;
  transition:
    transform 0.25s ease,
    opacity 0.25s ease,
    box-shadow 0.25s ease;
}

.about-us p a:hover,
.about-us p a:focus-visible,
.about-us li a:hover,
.about-us li a:focus-visible,
.footer-founder a:hover,
.footer-founder a:focus-visible {
  color: #fff4cc;
}

.about-us p a:hover::after,
.about-us p a:focus-visible::after,
.about-us li a:hover::after,
.about-us li a:focus-visible::after,
.footer-founder a:hover::after,
.footer-founder a:focus-visible::after {
  transform: scaleX(1);
  opacity: 1;
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.28);
}

/* ===============================
   FEATURED TOOL SECTION
================================= */
.featured-tool-section {
  padding-block: var(--section-spacing-desktop);
  padding-inline: var(--page-gutter);
}

.featured-tool-container {
  width: min(var(--page-max-width), 100%);
  margin: 0 auto;
}

.featured-tool-heading {
  max-width: 820px;
  margin: 0 auto clamp(1.75rem, 3vw, 2.5rem);
  text-align: center;
}

.featured-tool-eyebrow {
  margin: 0 0 0.75rem;
  color: var(--color-gold-light);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.featured-tool-heading h2 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
}

.featured-tool-intro {
  margin: 0 auto;
  color: var(--color-text-muted);
  max-width: 68ch;
  line-height: 1.72;
}

.featured-tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(1rem, 2.5vw, 1.5rem);
  align-items: stretch;
}

.featured-tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
  background:
    radial-gradient(circle at top right, rgba(212, 175, 55, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
    var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 2.6vw, 2rem);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.featured-tool-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    135deg,
    rgba(242, 214, 117, 0.1),
    transparent 34%
  );
  opacity: 0.72;
}

.featured-tool-card:hover,
.featured-tool-card:focus-within {
  transform: translateY(-3px);
  border-color: rgba(212, 175, 55, 0.34);
  box-shadow:
    0 22px 54px rgba(0, 0, 0, 0.34),
    0 0 22px rgba(212, 175, 55, 0.08);
}

.featured-tool-card-reference {
  background:
    radial-gradient(circle at top right, rgba(242, 214, 117, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025)),
    var(--color-surface);
}

.featured-tool-card-content,
.featured-tool-actions {
  position: relative;
  z-index: 1;
}

.featured-tool-card h3 {
  margin: 0 0 0.85rem;
  color: var(--color-text);
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.featured-tool-card p {
  margin: 0;
  color: var(--color-text-muted);
  line-height: 1.72;
}

.featured-tool-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.6rem;
}

.featured-tool-actions a,
.featured-tool-actions a:link,
.featured-tool-actions a:visited,
.featured-tool-actions a:hover,
.featured-tool-actions a:focus,
.featured-tool-actions a:active {
  text-decoration: none;
}

/* ===============================
   UNIVERSAL MODAL STYLES
================================= */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 24px;
}

.modal.show {
  display: flex;
}

.modal-container {
  background: var(--color-surface);
  color: var(--color-text);
  width: min(600px, calc(100vw - 48px));
  height: 75vh;
  max-height: 75vh;
  padding: 0;
  border-radius: 25px;
  position: relative;
  border: 1px solid rgba(212, 175, 55, 0.2);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.42);
  text-align: left;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

#aboutModal .modal-container {
  width: min(1000px, calc(100vw - 48px));
}

.modal-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  z-index: 8;
  pointer-events: none;
  background:
    linear-gradient(
      to bottom,
      rgba(23, 23, 25, 0.98) 0%,
      rgba(23, 23, 25, 0.94) 68%,
      rgba(23, 23, 25, 0.78) 100%
    );
}

.modal-inner {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 88px 40px 40px;
  padding-right: 32px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--color-gold) rgba(255, 215, 0, 0.1);
  position: relative;
  z-index: 1;
}

.modal-inner .modal-content {
  max-width: 720px;
  margin: 0 auto;
}

.modal-inner h2,
.modal-inner h3 {
  margin: 0 0 18px 0;
}

.modal-inner h4 {
  margin: 28px 0 12px 0;
}

.modal-inner p {
  margin: 0 0 18px 0;
  line-height: 1.7;
}

.modal-inner ul {
  margin: 14px 0 18px 0;
  padding-left: 22px;
}

.modal-inner li {
  margin-bottom: 12px;
  line-height: 1.7;
}

.modal .close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  font-size: 28px;
  line-height: 1;
  color: var(--color-gold-light);
  background: rgba(9, 9, 9, 0.9);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 999px;
  cursor: pointer;
  transition:
    color 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease,
    transform 0.2s ease;
  z-index: 10;
}

.modal .close:hover,
.modal .close:focus-visible {
  color: #fff4cc;
  background: rgba(23, 23, 25, 0.98);
  border-color: rgba(212, 175, 55, 0.7);
  transform: scale(1.04);
}

.modal-inner::-webkit-scrollbar {
  width: 8px;
  border-radius: 25px;
}

.modal-inner::-webkit-scrollbar-track {
  background: rgba(255, 215, 0, 0.1);
  border-radius: 25px;
  margin: 5px;
}

.modal-inner::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #d4af37, #a88627);
  border-radius: 25px;
  border: 2px solid rgba(255, 215, 0, 0.3);
}

.modal-inner::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #a88627, #80651b);
  border: 2px solid #d4af37;
}

/* ===============================
   CONTACT FORM SUCCESS PANEL
================================= */
.contact-success-panel {
  display: none;
  text-align: center;
  padding: 40px 30px;
  border-radius: 16px;
  background: rgba(17, 17, 19, 0.92);
  border: 1px solid rgba(212, 175, 55, 0.45);
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.16);
  max-width: 520px;
  margin: 0 auto;
  animation: fadeIn 0.5s ease forwards;
}

.contact-success-panel.show {
  display: block;
}

.contact-success-panel h3 {
  color: var(--color-gold-light);
  font-size: 28px;
  margin-bottom: 16px;
}

.contact-success-panel p {
  font-size: 18px;
  line-height: 1.6;
  max-width: 420px;
  margin: 0 auto;
}

.contact-success-icon {
  font-size: 34px;
  color: var(--color-gold-light);
  margin-top: 20px;
}

/* ==========================================
   FOOTER
========================================== */
.site-footer {
  margin-top: 4rem;
  padding-block: 2.75rem 2rem;
  padding-inline: var(--page-gutter);
  border-top: 1px solid rgba(212, 175, 55, 0.18);
  background:
    radial-gradient(circle at top left, rgba(212, 175, 55, 0.06), transparent 34%),
    #101012;
}

.footer-inner {
  width: min(var(--page-max-width), 100%);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2.25rem;
}

.footer-brand {
  max-width: 420px;
}

.footer-logo {
  display: inline-block;
  font-family: inherit;
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-gold-light);
  text-decoration: none;
  margin-bottom: 0.6rem;
  transition: color 0.25s ease;
}

.footer-logo:visited {
  color: var(--color-gold-light);
}

.footer-logo:hover,
.footer-logo:focus {
  color: #ffffff;
}

.footer-tagline,
.footer-founder {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--color-text-muted);
}

.footer-founder {
  margin-top: 0.7rem;
}

.footer-links-group {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 2rem 3rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.6rem;
  align-items: center;
}

.footer-nav a,
.footer-tools-nav a {
  position: relative;
  font-size: 0.95rem;
  color: var(--color-gold-light);
  text-decoration: none;
  transition: color 0.25s ease;
}

.footer-nav a:visited,
.footer-tools-nav a:visited {
  color: var(--color-gold-light);
}

.footer-nav a:hover,
.footer-nav a:focus,
.footer-tools-nav a:hover,
.footer-tools-nav a:focus {
  color: #ffffff;
}

.footer-nav a::after,
.footer-tools-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 1px;
  background: var(--color-gold);
  transition: width 0.25s ease;
}

.footer-nav a:hover::after,
.footer-nav a:focus::after,
.footer-tools-nav a:hover::after,
.footer-tools-nav a:focus::after {
  width: 100%;
}

.footer-tools-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

.footer-nav-heading {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(212, 175, 55, 0.78);
  margin-bottom: 0.15rem;
}

.footer-meta {
  min-width: 220px;
}

.footer-meta p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--color-text-soft);
}

.footer-legal-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.footer-legal-nav a {
  color: var(--color-gold-light);
  text-decoration: none;
  transition: color 0.25s ease;
}

.footer-legal-nav a:visited {
  color: var(--color-gold-light);
}

.footer-legal-nav a:hover,
.footer-legal-nav a:focus-visible {
  color: #ffffff;
}

.footer-separator {
  margin: 0 0.4rem;
  color: rgba(212, 175, 55, 0.6);
}

/* ===============================
   MOBILE VIEWPORT RULES
================================= */
@media (max-width: 768px) {
  .modal-container,
  #aboutModal .modal-container {
    width: min(94vw, 100%);
    height: 82vh;
    max-height: 82vh;
  }

  .modal-container::before {
    height: 82px;
  }

  .modal-inner {
    padding: 98px 26px 26px;
    padding-right: 20px;
  }

  .modal-inner .modal-content {
    max-width: 100%;
  }

  .modal .close {
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    font-size: 26px;
  }

  .contact-success-panel {
    padding: 32px 22px;
  }

  .contact-success-panel h3 {
    font-size: 24px;
  }

  .contact-success-panel p {
    font-size: 16px;
  }
}
