/* ============================================================
   TARFONLINE – stylesheet
   ============================================================ */

:root {
  --bg:           #0D1117;
  --bg-soft:      #131920;
  --bg-card:      #161D26;
  --bg-elevated:  #1A2230;
  --text:         #E6EDF5;
  --text-soft:    rgba(230, 237, 245, 0.72);
  --text-mute:    rgba(230, 237, 245, 0.45);
  --text-whisper: rgba(230, 237, 245, 0.25);
  --accent:       #6E8FBF;
  --accent-soft:  rgba(110, 143, 191, 0.3);
  --accent-line:  rgba(110, 143, 191, 0.18);
  --hairline:     rgba(230, 237, 245, 0.07);
  --serif:        'DM Serif Display', Georgia, serif;
  --sans:         'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --pad-x:        clamp(1.5rem, 5vw, 5rem);
  --section-y:    clamp(5rem, 10vw, 8.5rem);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}

::selection { background: var(--accent-soft); color: var(--text); }

/* Film grain overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.italic { font-style: italic; }

/* ---------- Utility ---------- */
.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-number {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section-heading {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 1.2rem;
}

.section-intro {
  font-size: 1.05rem;
  color: var(--text-soft);
  max-width: 540px;
  line-height: 1.7;
}

.section-label {
  margin-bottom: 3.5rem;
}

.text-link {
  color: var(--accent);
  border-bottom: 1px solid var(--accent-line);
  transition: border-color 0.3s ease;
}
.text-link:hover {
  border-bottom-color: var(--accent);
}

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 0.9rem 2.2rem;
  border: 1px solid var(--accent);
  color: var(--text);
  border-radius: 2px;
  transition: background 0.35s ease, color 0.35s ease;
}
.btn:hover {
  background: var(--accent);
  color: var(--bg);
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.5rem var(--pad-x);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(13, 17, 23, 0);
  transition: background 0.5s ease, padding 0.4s ease, border-color 0.5s ease;
  border-bottom: 0.5px solid transparent;
}

.nav.scrolled {
  background: rgba(13, 17, 23, 0.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 1rem var(--pad-x);
  border-bottom-color: var(--hairline);
}

.wordmark {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text);
  text-transform: lowercase;
  display: flex;
  align-items: center;
}

.nav-logo {
  height: 28px;
  width: auto;
}

.footer-logo {
  height: 24px;
  width: auto;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 2.4rem;
}

.nav-menu a {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--text-soft);
  transition: color 0.3s ease;
  text-transform: lowercase;
}
.nav-menu a:hover { color: var(--text); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-soft);
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.1em;
  cursor: pointer;
  text-transform: lowercase;
}

/* Mobile overlay */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(13, 17, 23, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.nav-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.nav-overlay ul {
  list-style: none;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.nav-overlay a {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  color: var(--text);
  transition: color 0.3s ease;
}
.nav-overlay a:hover { color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem var(--pad-x) 6rem;
  position: relative;
  overflow: hidden;
}

/* Gradient mesh orbs */
.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  max-width: 800px;
  max-height: 800px;
  background: radial-gradient(
    circle at 40% 40%,
    rgba(110, 143, 191, 0.12) 0%,
    rgba(110, 143, 191, 0.04) 40%,
    transparent 70%
  );
  filter: blur(60px);
  pointer-events: none;
  animation: orb-drift 20s ease-in-out infinite alternate;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -10%;
  left: -15%;
  width: 50vw;
  height: 50vw;
  max-width: 650px;
  max-height: 650px;
  background: radial-gradient(
    circle at 60% 60%,
    rgba(110, 143, 191, 0.08) 0%,
    rgba(80, 120, 180, 0.03) 45%,
    transparent 70%
  );
  filter: blur(80px);
  pointer-events: none;
  animation: orb-drift 25s ease-in-out infinite alternate-reverse;
}

@keyframes orb-drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(30px, -20px) scale(1.05); }
  100% { transform: translate(-20px, 15px) scale(0.97); }
}

.hero-content {
  max-width: 820px;
}

.hero .eyebrow {
  margin-bottom: 2rem;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 6.5vw, 5.5rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 1.8rem;
}

.hero-sub {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--text-soft);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 2.8rem;
}

/* ---------- Services ---------- */
.services {
  padding: var(--section-y) var(--pad-x);
  border-top: 0.5px solid var(--hairline);
  position: relative;
  overflow: hidden;
}

.services::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70vw;
  height: 50vh;
  background: radial-gradient(
    ellipse at center,
    rgba(110, 143, 191, 0.06) 0%,
    transparent 65%
  );
  filter: blur(40px);
  pointer-events: none;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.service-card {
  background: var(--bg-card);
  border: 0.5px solid var(--hairline);
  border-radius: 3px;
  padding: 2.5rem;
  transition: border-color 0.4s ease, background 0.4s ease, box-shadow 0.4s ease;
  position: relative;
}
.service-card:hover {
  border-color: var(--accent-line);
  background: var(--bg-elevated);
  box-shadow: 0 0 40px rgba(110, 143, 191, 0.06);
}

/* Accent glow line on top of card */
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 2rem;
  right: 2rem;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--accent-line) 50%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
}
.service-card:hover::before {
  opacity: 1;
}

.service-number {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 1.4rem;
}

.service-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 0.8rem;
}

.service-text {
  font-size: 0.95rem;
  color: var(--text-soft);
  line-height: 1.7;
}

/* ---------- Process ---------- */
.process {
  padding: var(--section-y) var(--pad-x);
  border-top: 0.5px solid var(--hairline);
  position: relative;
  background-image: radial-gradient(circle, var(--text-whisper) 0.5px, transparent 0.5px);
  background-size: 32px 32px;
  background-position: center;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.process-step {
  position: relative;
  padding-top: 2rem;
}
.process-step::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 32px;
  height: 1px;
  background: var(--accent);
}

.step-number {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 1rem;
}

.step-title {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 400;
  margin-bottom: 0.7rem;
}

.step-text {
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.7;
}

/* ---------- About ---------- */
.about {
  padding: var(--section-y) var(--pad-x);
  border-top: 0.5px solid var(--hairline);
  position: relative;
  overflow: hidden;
}

.about::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle,
    rgba(110, 143, 191, 0.07) 0%,
    transparent 60%
  );
  filter: blur(50px);
  pointer-events: none;
}

.about-content {
  max-width: 640px;
}

.about-text {
  font-size: 1.05rem;
  color: var(--text-soft);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}
.about-text:last-child {
  margin-bottom: 0;
}

/* ---------- Contact ---------- */
.contact {
  padding: var(--section-y) var(--pad-x);
  border-top: 0.5px solid var(--hairline);
}

.contact-inner {
  max-width: 800px;
}

.contact-intro {
  margin-bottom: 3rem;
}

.contact-intro .section-heading {
  font-size: clamp(2rem, 4vw, 3rem);
}

.contact-copy {
  font-size: 1.05rem;
  color: var(--text-soft);
  max-width: 480px;
  line-height: 1.7;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-row-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-row label {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: var(--text-mute);
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  background: var(--bg-card);
  border: 0.5px solid var(--hairline);
  border-radius: 2px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 300;
  padding: 0.85rem 1rem;
  transition: border-color 0.3s ease;
  -webkit-appearance: none;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent-line);
}
.form-row input::placeholder,
.form-row textarea::placeholder {
  color: var(--text-whisper);
}

.form-row select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='rgba(230,237,245,0.35)'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}
.form-row select option {
  background: var(--bg-card);
  color: var(--text);
}

.form-row textarea {
  resize: vertical;
  min-height: 160px;
  line-height: 1.6;
}

.form-submit {
  align-self: flex-start;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 0.9rem 2.4rem;
  background: var(--accent);
  color: var(--bg);
  border: 1px solid var(--accent);
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.35s ease, color 0.35s ease;
}
.form-submit:hover {
  background: transparent;
  color: var(--text);
}
.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-success {
  display: none;
  text-align: center;
  padding: 3rem 0;
}
.form-success.shown {
  display: block;
}
.form-success p {
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--text-soft);
  line-height: 1.6;
}

/* ---------- Footer ---------- */
footer {
  border-top: 0.5px solid var(--hairline);
  padding: 2.5rem var(--pad-x);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-left {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
}

.footer-note {
  font-size: 12px;
  color: var(--text-mute);
  letter-spacing: 0.06em;
}

.footer-links {
  display: flex;
  gap: 2rem;
}
.footer-links a {
  font-size: 13px;
  color: var(--text-mute);
  letter-spacing: 0.04em;
  text-transform: lowercase;
  transition: color 0.3s ease;
}
.footer-links a:hover { color: var(--text); }

.footer-right span {
  font-size: 12px;
  color: var(--text-mute);
  letter-spacing: 0.04em;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .hero {
    min-height: 90vh;
    padding: 7rem var(--pad-x) 4rem;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 8vw, 3.2rem);
  }

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

  .form-row-split {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .footer-left {
    flex-direction: column;
    gap: 0.4rem;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 1.2rem;
  }
}
