/* ==========================================================================
   Faria Ventures — Minimalist Editorial Stylesheet
   ========================================================================== */

:root {
  /* Palette — Archival Paper & Obsidian Ink */
  --bg: #F7F5F0;
  --bg-subtle: #EFECE5;
  --ink: #141413;
  --ink-secondary: #4A4843;
  --ink-muted: #76726A;
  --accent: #1F4736;
  --rule: rgba(20, 20, 19, 0.14);
  --rule-strong: rgba(20, 20, 19, 0.34);

  /* Typography */
  --font-serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype",
    "Book Antiqua", Georgia, serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue",
    Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", ui-monospace, Menlo,
    Consolas, monospace;

  /* Motion */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout */
  --container: 1140px;
}

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

html {
  color-scheme: light;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100svh;
  background-color: var(--bg);
  color: var(--ink);
  font-feature-settings: "kern" 1, "liga" 1;
  overflow-x: hidden;
}

::selection {
  background-color: var(--ink);
  color: var(--bg);
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

:focus-visible {
  outline: 1.5px solid var(--ink);
  outline-offset: 4px;
}

/* Subtle archival paper texture */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* Screen-reader utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Page Frame
   ========================================================================== */

.page {
  min-height: 100svh;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 4rem);
  display: flex;
  flex-direction: column;
}

/* Hairline architectural rules */
.rule {
  width: 100%;
  height: 1px;
  background-color: var(--rule);
  transform-origin: left center;
  animation: drawRule 0.9s var(--ease-out-expo) both;
}

.rule-top {
  animation-delay: 40ms;
}

.rule-mid {
  animation-delay: 140ms;
}

.rule-bottom {
  animation-delay: 260ms;
}

/* ==========================================================================
   Masthead
   ========================================================================== */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(1.35rem, 3.2vh, 2.25rem) 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--ink);
  transition: opacity 0.25s ease;
}

.brand:hover {
  opacity: 0.78;
}

.brand-mark {
  display: block;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  transition: transform 0.35s var(--ease-out-expo);
}

.brand:hover .brand-mark {
  transform: scale(1.03);
}

.brand-name {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1;
}

/* ==========================================================================
   Main Editorial Stage
   ========================================================================== */

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2.5rem, 7vh, 5.25rem) 0;
}

.hero {
  padding-bottom: clamp(2.25rem, 5.5vh, 3.75rem);
}

.headline {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.75rem, 6.4vw, 5.5rem);
  line-height: 1.03;
  letter-spacing: -0.02em;
  color: var(--ink);
  max-width: 14.5em;
  text-wrap: balance;
}

.headline em {
  font-style: italic;
  font-weight: 400;
}

/* ==========================================================================
   Asymmetric Editorial Split (Thesis + Contact)
   ========================================================================== */

.editorial-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.95fr);
  align-items: start;
}

.thesis-col {
  padding-top: clamp(2rem, 4.2vh, 3rem);
  padding-right: clamp(2rem, 4.5vw, 4.5rem);
  padding-bottom: 0.5rem;
  border-right: 1px solid var(--rule);
}

.thesis {
  font-size: clamp(1rem, 1.25vw, 1.125rem);
  line-height: 1.65;
  color: var(--ink-secondary);
  max-width: 48ch;
  text-wrap: pretty;
}

.thesis strong {
  color: var(--ink);
  font-weight: 500;
}

.scope-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, max-content));
  gap: 0.65rem clamp(1.75rem, 3.5vw, 3.25rem);
  margin-top: clamp(1.65rem, 3.2vh, 2.25rem);
  padding-top: 1.35rem;
  border-top: 1px solid var(--rule);
  max-width: 48ch;
}

.scope-list li {
  display: inline-flex;
  align-items: baseline;
  gap: 0.6rem;
  font-size: 0.875rem;
  color: var(--ink);
  letter-spacing: -0.005em;
}

.scope-idx {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

/* Contact Column */
.contact-col {
  padding-top: clamp(2rem, 4.2vh, 3rem);
  padding-left: clamp(2rem, 4.5vw, 4.5rem);
  padding-bottom: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.71875rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.9rem;
}

.contact-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
  padding-bottom: 0.25rem;
  font-family: var(--font-serif);
  font-size: clamp(1.55rem, 2.5vw, 2.35rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
  transition: color 0.25s ease;
}

.contact-email {
  overflow-wrap: anywhere;
}

.contact-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background-color: var(--rule-strong);
  transition: background-color 0.25s ease;
}

.contact-link::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background-color: var(--ink);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.4s var(--ease-out-expo);
  z-index: 1;
}

.contact-link:hover {
  color: var(--accent);
}

.contact-link:hover::before {
  transform: scaleX(1);
  background-color: var(--accent);
}

.arrow-icon {
  flex-shrink: 0;
  margin-top: 0.1rem;
  transition: transform 0.35s var(--ease-out-expo);
}

.contact-link:hover .arrow-icon {
  transform: translate(3px, -3px);
}

.contact-actions {
  margin-top: 1.1rem;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.78rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 0.71875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-secondary);
  background-color: transparent;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.copy-btn:hover {
  border-color: var(--rule-strong);
  background-color: var(--bg-subtle);
  color: var(--ink);
}

.copy-btn.is-copied {
  border-color: var(--accent);
  color: var(--accent);
  background-color: rgba(31, 71, 54, 0.05);
}

.copy-icon {
  display: block;
  flex-shrink: 0;
}

.copy-btn .icon-check {
  display: none;
}

.copy-btn.is-copied .icon-copy {
  display: none;
}

.copy-btn.is-copied .icon-check {
  display: block;
}

.contact-note {
  margin-top: 1.35rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 34ch;
  text-wrap: pretty;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(1.15rem, 2.6vh, 1.75rem) 0;
  font-family: var(--font-mono);
  font-size: 0.71875rem;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

.domain-mark {
  text-transform: lowercase;
}

/* ==========================================================================
   Entrance Animations
   ========================================================================== */

.reveal {
  animation: fadeSlideUp 0.8s var(--ease-out-expo) both;
  animation-delay: var(--delay, 0ms);
}

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

@keyframes drawRule {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 820px) {
  .editorial-grid {
    grid-template-columns: 1fr;
  }

  .thesis-col {
    padding-right: 0;
    padding-bottom: 2rem;
    border-right: none;
    border-bottom: 1px solid var(--rule);
  }

  .contact-col {
    padding-left: 0;
    padding-top: 2rem;
  }
}

@media (max-width: 520px) {
  .headline {
    font-size: clamp(2.35rem, 11.5vw, 3.1rem);
  }

  .scope-list {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

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

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .rule {
    animation: none !important;
  }

  .brand,
  .brand-mark,
  .contact-link,
  .contact-link::before,
  .contact-link::after,
  .arrow-icon,
  .copy-btn {
    transition: none !important;
  }
}

/* Print Stylesheet */
@media print {
  .grain,
  .copy-btn {
    display: none;
  }

  body {
    background: #ffffff;
    color: #000000;
  }
}
