/* ============================================
   Mailbox Internet — Modern Responsive Stylesheet
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,500;0,9..144,700;1,9..144,400&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

/* --- Design Tokens --- */
:root {
  --crimson-deep: #6B0F1A;
  --crimson: #8B1A2B;
  --crimson-bright: #C62828;
  --red-accent: #E53935;
  --red-glow: #ff3d3d;

  --ink: #1a1216;
  --charcoal: #2d2327;
  --warm-gray: #6b5e63;
  --muted: #9a8e92;
  --sand: #f0ebe6;
  --cream: #f8f5f1;
  --white: #ffffff;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 3px rgba(107, 15, 26, 0.08);
  --shadow-md: 0 4px 20px rgba(107, 15, 26, 0.1);
  --shadow-lg: 0 12px 40px rgba(107, 15, 26, 0.15);
  --shadow-glow: 0 0 30px rgba(229, 57, 53, 0.15);

  --max-width: 1140px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--cream);
  overflow-x: hidden;
}

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

a {
  color: var(--crimson);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--red-accent);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.2;
  color: var(--ink);
}

ul {
  list-style: none;
}

/* --- Utility --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Grain Overlay --- */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 245, 241, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(107, 15, 26, 0.08);
  transition: box-shadow var(--transition);
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem var(--space-md);
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.logo img {
  height: auto;
  width: 180px;
  background: var(--crimson-deep);
  padding: 8px 18px 14px;
  border-radius: var(--radius-md);
  object-fit: contain;
  object-position: center;
  display: block;
}

/* Desktop Nav */
.main-nav ul {
  display: flex;
  gap: var(--space-xs);
  align-items: center;
}

.main-nav a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--charcoal);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  letter-spacing: 0.01em;
}

.main-nav a:hover {
  color: var(--crimson);
  background: rgba(107, 15, 26, 0.06);
}

.main-nav .nav-btn {
  color: var(--crimson);
  padding: 0.5rem 1.25rem;
  border: 2px solid var(--crimson);
}

.main-nav .nav-btn:hover {
  background: var(--crimson);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.main-nav .nav-cta {
  background: var(--crimson);
  color: var(--white) !important;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-sm);
}

.main-nav .nav-cta:hover {
  background: var(--crimson-bright);
  color: var(--white) !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}


/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 110;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  margin: 6px 0;
  border-radius: 2px;
  transition: all var(--transition);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    max-width: 320px;
    height: 100vh;
    background: var(--cream);
    padding: 5rem var(--space-lg) var(--space-lg);
    transition: right var(--transition);
    box-shadow: -10px 0 40px rgba(0,0,0,0.15);
    z-index: 105;
  }

  .main-nav.open {
    right: 0;
  }

  .main-nav ul {
    flex-direction: column;
    gap: var(--space-xs);
  }

  .main-nav a {
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
  }

  .nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(26, 18, 22, 0.4);
    z-index: 102;
  }

  .nav-overlay.active {
    display: block;
  }
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  background: linear-gradient(145deg, var(--crimson-deep) 0%, var(--crimson) 40%, #4a0a12 100%);
  padding: var(--space-2xl) 0;
  overflow: hidden;
  color: var(--white);
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(229, 57, 53, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 61, 61, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  color: var(--white);
  margin-bottom: 0.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero .hero-tagline {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.75rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.hero p {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: var(--space-md);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* Domain Search */
.domain-search {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  max-width: 560px;
  margin: 0 auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.domain-search label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: var(--space-xs);
  text-align: left;
}

.domain-search .search-row {
  display: flex;
  gap: 0.5rem;
}

.domain-search input[type="text"] {
  flex: 1;
  padding: 0.9rem 1.25rem;
  font-size: 1.1rem;
  font-family: var(--font-body);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  outline: none;
  transition: all var(--transition);
}

.domain-search input[type="text"]:focus {
  border-color: var(--red-accent);
  box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.25);
}

.domain-search input[type="text"]::placeholder {
  color: var(--muted);
}

.domain-search button,
.btn-primary {
  padding: 0.9rem 1.75rem;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-body);
  color: var(--white);
  background: var(--red-accent);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.domain-search button:hover,
.btn-primary:hover {
  background: var(--red-glow);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(229, 57, 53, 0.35);
}

.btn-static,
.btn-static:hover {
  display: inline-block;
  padding: 0.9rem 1.75rem;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-body);
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  text-decoration: none;
  letter-spacing: 0.02em;
  cursor: pointer;
}

@media (max-width: 520px) {
  .domain-search .search-row {
    flex-direction: column;
  }
}

/* ============================================
   SERVICES / FEATURES
   ============================================ */
.services {
  padding: var(--space-2xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section-header h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  margin-bottom: var(--space-xs);
  letter-spacing: -0.02em;
}

.section-header p {
  color: var(--warm-gray);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto;
}

.section-divider {
  width: 48px;
  height: 3px;
  background: var(--crimson);
  border-radius: 2px;
  margin: var(--space-sm) auto var(--space-md);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-md);
}

.service-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  border: 1px solid rgba(107, 15, 26, 0.06);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--crimson), var(--red-accent));
  opacity: 0;
  transition: opacity var(--transition);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.service-card:hover::before {
  opacity: 1;
}

.service-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(107, 15, 26, 0.08), rgba(229, 57, 53, 0.06));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  font-size: 1.5rem;
}

.service-card h3 {
  font-size: 1.2rem;
  margin-bottom: var(--space-sm);
  font-weight: 500;
}

.service-card ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.service-card li {
  font-size: 0.92rem;
  color: var(--warm-gray);
  line-height: 1.5;
  padding-left: 1.25rem;
  position: relative;
}

.service-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--crimson);
  opacity: 0.5;
}

/* ============================================
   CTA BANNER
   ============================================ */
.cta-banner {
  background: linear-gradient(135deg, var(--crimson-deep), var(--crimson));
  padding: var(--space-xl) 0;
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 20px,
    rgba(255,255,255,0.02) 20px,
    rgba(255,255,255,0.02) 40px
  );
}

.cta-banner .container {
  position: relative;
  z-index: 1;
}

.cta-banner h2 {
  color: var(--white);
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  margin-bottom: var(--space-sm);
}

.cta-banner p {
  color: rgba(255,255,255,0.8);
  margin-bottom: var(--space-md);
}

.btn-light {
  display: inline-block;
  padding: 0.85rem 2rem;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-body);
  color: var(--crimson);
  background: var(--white);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.btn-light:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
  color: var(--crimson);
}

/* ============================================
   PAGE CONTENT (support, login, status, privacy)
   ============================================ */
.page-hero {
  background: linear-gradient(145deg, var(--crimson-deep) 0%, var(--crimson) 60%, #4a0a12 100%);
  padding: var(--space-xl) 0 var(--space-lg);
  color: var(--white);
  text-align: center;
}

.page-hero h1 {
  color: var(--white);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: var(--space-xs);
}

.page-hero p {
  color: rgba(255,255,255,0.75);
  font-size: 1.1rem;
  max-width: 520px;
  margin: 0 auto;
}

.page-content {
  padding: var(--space-xl) 0 var(--space-2xl);
}

/* Contact Cards */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.contact-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  border: 1px solid rgba(107, 15, 26, 0.06);
  text-align: center;
  transition: all var(--transition);
}

.contact-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.contact-card .contact-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(107, 15, 26, 0.08), rgba(229, 57, 53, 0.06));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-sm);
  font-size: 1.5rem;
}

.contact-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.contact-card .contact-link {
  display: inline-block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--crimson);
  margin-bottom: 0.75rem;
  word-break: break-all;
}

.contact-card p {
  font-size: 0.9rem;
  color: var(--warm-gray);
  line-height: 1.6;
}

/* Hours / Info Boxes */
.info-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  border: 1px solid rgba(107, 15, 26, 0.06);
  margin-bottom: var(--space-md);
}

.info-box h2 {
  font-size: 1.3rem;
  margin-bottom: var(--space-sm);
}

.info-box p {
  color: var(--warm-gray);
  line-height: 1.7;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--crimson);
  margin: 0;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.3); }
}

/* Login cards */
.login-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.login-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  border: 1px solid rgba(107, 15, 26, 0.06);
  text-align: center;
  transition: all var(--transition);
}

.login-card:hover {
  box-shadow: var(--shadow-md);
}

.login-card h2 {
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
}

.login-card p {
  color: var(--warm-gray);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.btn-outline {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font-body);
  color: var(--crimson);
  background: transparent;
  border: 2px solid var(--crimson);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-outline:hover {
  background: var(--crimson);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Status iframe */
.status-frame {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  border: 1px solid rgba(107, 15, 26, 0.06);
  overflow: hidden;
}

.status-frame iframe {
  width: 100%;
  height: 70vh;
  min-height: 300px;
  max-height: 600px;
  border: none;
  border-radius: var(--radius-md);
}

/* Privacy / long-form text */
.prose {
  max-width: 720px;
  margin: 0 auto;
}

.prose h2 {
  font-size: 1.4rem;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.prose p {
  color: var(--warm-gray);
  margin-bottom: var(--space-md);
  line-height: 1.8;
}

.prose a {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.5);
  padding: var(--space-lg) 0;
  font-size: 0.85rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
}

.footer-inner a {
  color: rgba(255, 255, 255, 0.65);
  transition: color var(--transition);
}

.footer-inner a:hover {
  color: var(--white);
}

.footer-links {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.footer-legal {
  text-align: center;
  margin-top: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.35);
}

@media (max-width: 640px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.animate-in:nth-child(1) { animation-delay: 0.1s; }
.animate-in:nth-child(2) { animation-delay: 0.2s; }
.animate-in:nth-child(3) { animation-delay: 0.3s; }
.animate-in:nth-child(4) { animation-delay: 0.4s; }

.hero-content > * {
  opacity: 0;
  animation: fadeInUp 0.7s ease forwards;
}
.hero-content > *:nth-child(1) { animation-delay: 0.15s; }
.hero-content > *:nth-child(2) { animation-delay: 0.3s; }
.hero-content > *:nth-child(3) { animation-delay: 0.45s; }

/* ============================================
   SMALL SCREEN ADJUSTMENTS
   ============================================ */
@media (max-width: 480px) {
  .hero {
    padding: var(--space-xl) 0;
  }

  .domain-search {
    padding: var(--space-sm);
  }

  .service-card {
    padding: var(--space-md);
  }

  .login-options {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .site-header,
  .nav-toggle,
  .nav-overlay,
  .hero::before,
  .hero::after,
  .cta-banner,
  body::before {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }

  .hero {
    background: #fff !important;
    color: #000;
    padding: 1rem 0;
  }

  .hero h1,
  .hero .hero-tagline,
  .hero p {
    color: #000;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  .service-card,
  .contact-card,
  .login-card,
  .info-box {
    border: 1px solid #ccc;
    box-shadow: none;
  }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
