/* ==========================================================================
   Cretova LLC — Global Stylesheet
   ========================================================================== */

/* --- Reset & Base --- */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0A0A0A;
  --text: #F5F5F0;
  --accent: #C9A961;
  --muted: #888880;
  --border: #1F1F1F;
  --font-heading: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --max-width: 1200px;
  --max-reading: 680px;
  --section-spacing: 120px;
  --section-spacing-mobile: 80px;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

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

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

/* --- Utility --- */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.container--narrow {
  max-width: var(--max-reading);
}

.section {
  padding: var(--section-spacing-mobile) 0;
}

/* Fade-in on scroll */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Typography --- */

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
}

h1 {
  font-size: 42px;
}

h2 {
  font-size: 32px;
}

h3 {
  font-size: 24px;
}

h4 {
  font-size: 20px;
}

p {
  margin-bottom: 1em;
}

p:last-child {
  margin-bottom: 0;
}

/* --- Eyebrow --- */

.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 20px;
}

/* --- Gold rule accent --- */

.rule {
  width: 40px;
  height: 2px;
  background-color: var(--accent);
  border: none;
  margin-bottom: 24px;
}

/* --- Buttons --- */

.btn {
  display: inline-block;
  padding: 18px 36px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.2s ease;
  border-radius: 2px;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn--primary {
  background-color: var(--accent);
  color: var(--bg);
}

.btn--primary:hover {
  filter: brightness(1.12);
}

.link--secondary {
  color: var(--accent);
  font-size: 15px;
  font-weight: 500;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
  transition: opacity 0.2s ease;
}

.link--secondary:hover {
  opacity: 0.8;
}

.link--secondary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Arrow link used in service cards */
.link--arrow {
  color: var(--accent);
  font-size: 15px;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.link--arrow:hover {
  opacity: 0.8;
}

.link--arrow:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* --- Navigation --- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 0;
  transition: background-color 0.3s ease, backdrop-filter 0.3s ease;
}

.nav.is-scrolled {
  background-color: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.nav__logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  text-decoration: none;
}

.nav__logo:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.nav__links {
  display: flex;
  gap: 36px;
  align-items: center;
}

.nav__links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s ease;
  letter-spacing: 0.01em;
}

.nav__links a:hover,
.nav__links a.is-active {
  color: var(--text);
}

.nav__links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  z-index: 110;
}

.nav__hamburger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.nav__hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav__hamburger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__hamburger.is-open span:nth-child(2) {
  opacity: 0;
}

.nav__hamburger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile overlay */
.nav__overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: var(--bg);
  z-index: 105;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.nav__overlay.is-open {
  display: flex;
}

.nav__overlay a {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  transition: color 0.2s ease;
}

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

.nav__overlay a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* --- Hero --- */

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
}

.hero__content {
  max-width: 720px;
}

.hero h1 {
  margin-bottom: 24px;
}

.hero__sub {
  max-width: 600px;
  margin: 0 auto 40px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.hero__cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* --- Page Header (interior pages) --- */

.page-header {
  padding: 160px 0 var(--section-spacing-mobile);
  text-align: left;
}

.page-header .eyebrow {
  margin-bottom: 16px;
}

.page-header h1 {
  margin-bottom: 16px;
}

.page-header__sub {
  color: var(--muted);
  font-size: 17px;
  max-width: 600px;
}

/* --- Services Grid (3-column) --- */

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background-color: var(--border);
  border: 1px solid var(--border);
}

.services-grid__item {
  background-color: var(--bg);
  padding: 40px;
}

.services-grid__item h3 {
  margin-bottom: 16px;
}

.services-grid__item p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
  margin-bottom: 24px;
}

/* --- Why Blocks (alternating) --- */

.why-block {
  padding: 60px 0;
  border-top: 1px solid var(--border);
}

.why-block:last-child {
  border-bottom: 1px solid var(--border);
}

.why-block h3 {
  margin-bottom: 16px;
}

.why-block p {
  color: var(--muted);
  max-width: var(--max-reading);
  font-size: 16px;
  line-height: 1.7;
}

/* --- Bottom CTA --- */

.bottom-cta {
  text-align: center;
  padding: var(--section-spacing-mobile) 0;
}

.bottom-cta h2 {
  margin-bottom: 20px;
}

.bottom-cta p {
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 32px;
  font-size: 16px;
  line-height: 1.7;
}

/* --- Service Detail Sections --- */

.service-section {
  padding: var(--section-spacing-mobile) 0;
  border-top: 1px solid var(--border);
}

.service-section__header {
  margin-bottom: 48px;
}

.service-section__header h2 {
  margin-bottom: 16px;
}

.service-section__header p {
  color: var(--muted);
  max-width: var(--max-reading);
  font-size: 16px;
  line-height: 1.7;
}

/* Sub-service cards */
.sub-service {
  border: 1px solid var(--border);
  padding: 40px;
  margin-bottom: 24px;
}

.sub-service h4 {
  margin-bottom: 16px;
}

.sub-service > p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 20px;
}

.sub-service__details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.sub-service__detail {
  font-size: 15px;
  line-height: 1.6;
}

.sub-service__detail strong {
  color: var(--text);
}

.sub-service__detail span {
  color: var(--muted);
}

/* Channel grid (2x2) */
.channel-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 40px;
}

.channel-card {
  border: 1px solid var(--border);
  padding: 40px;
}

.channel-card h4 {
  margin-bottom: 12px;
}

.channel-card p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.channel-pricing {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  max-width: var(--max-reading);
}

/* --- Case Study --- */

.case-study {
  border: 1px solid var(--border);
  padding: 40px;
  margin-bottom: 40px;
}

.case-study__tag {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 8px;
}

.case-study__client {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 24px;
}

.case-study h3 {
  margin-bottom: 24px;
}

.case-study h4 {
  margin-bottom: 8px;
  font-size: 18px;
}

.case-study__block {
  margin-bottom: 24px;
}

.case-study__block:last-child {
  margin-bottom: 0;
}

.case-study__block p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

/* --- Contact Form --- */

.contact-form {
  max-width: 560px;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  background-color: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  border-radius: 2px;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #555;
}

.form-group select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%23888880' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
}

.form-group select option {
  background-color: var(--bg);
  color: var(--text);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

/* Contact info block */
.contact-info {
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  font-size: 15px;
  color: var(--muted);
  line-height: 1.8;
}

.contact-info a {
  color: var(--accent);
  transition: opacity 0.2s ease;
}

.contact-info a:hover {
  opacity: 0.8;
}

/* --- About sections --- */

.about-section {
  margin-bottom: 64px;
}

.about-section h2 {
  margin-bottom: 20px;
}

.about-section p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.about-lead {
  font-size: 19px;
  line-height: 1.7;
  color: var(--text);
}

/* --- Footer --- */

.footer {
  border-top: 1px solid var(--border);
  padding: 64px 0 40px;
  font-size: 14px;
}

.footer__top {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-bottom: 48px;
}

.footer__brand {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.footer__tagline {
  color: var(--muted);
  font-size: 14px;
}

.footer__nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer__nav a {
  color: var(--muted);
  font-size: 14px;
  transition: color 0.2s ease;
}

.footer__nav a:hover {
  color: var(--text);
}

.footer__nav a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.footer__email a {
  color: var(--accent);
  font-size: 14px;
  transition: opacity 0.2s ease;
}

.footer__email a:hover {
  opacity: 0.8;
}

.footer__bottom {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}

/* ==========================================================================
   Responsive — Tablet (768px+)
   ========================================================================== */

@media (min-width: 768px) {
  .section {
    padding: var(--section-spacing) 0;
  }

  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .channel-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__top {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }

  .footer__nav {
    flex-direction: row;
    gap: 32px;
  }

  .footer__bottom {
    flex-direction: row;
  }

  .service-section {
    padding: var(--section-spacing) 0;
  }

  .bottom-cta {
    padding: var(--section-spacing) 0;
  }

  .page-header {
    padding: 180px 0 var(--section-spacing);
  }
}

/* ==========================================================================
   Responsive — Desktop (1200px+)
   ========================================================================== */

@media (min-width: 1200px) {
  h1 {
    font-size: 72px;
  }

  h2 {
    font-size: 42px;
  }

  h3 {
    font-size: 28px;
  }

  .why-block {
    display: flex;
    gap: 80px;
    align-items: flex-start;
  }

  .why-block h3 {
    min-width: 240px;
    flex-shrink: 0;
  }
}

/* ==========================================================================
   Responsive — Mobile (<768px)
   ========================================================================== */

@media (max-width: 767px) {
  body {
    font-size: 16px;
  }

  .nav__links {
    display: none;
  }

  .nav__hamburger {
    display: flex;
  }

  .hero {
    padding: 120px 24px 60px;
    min-height: 100svh;
  }

  .hero__sub {
    font-size: 16px;
  }

  .case-study {
    padding: 28px;
  }

  .sub-service {
    padding: 28px;
  }

  .services-grid__item {
    padding: 28px;
  }

  .channel-card {
    padding: 28px;
  }
}
