/* =========================================================
   Revanta Polymers — static rebuild
   Design tokens ported 1:1 from the original Horizons export
   ========================================================= */

:root {
  --background: 44 36% 92%;
  --foreground: 230 22% 9%;
  --card: 44 42% 95%;
  --primary: 232 68% 35%;
  --primary-foreground: 44 42% 95%;
  --muted-foreground: 230 10% 38%;
  --destructive: 0 72% 44%;

  --color-background: hsl(var(--background));
  --color-foreground: hsl(var(--foreground));
  --color-card: hsl(var(--card));
  --color-primary: hsl(var(--primary));
  --color-primary-foreground: hsl(var(--primary-foreground));
  --color-muted-foreground: hsl(var(--muted-foreground));
  --color-destructive: hsl(var(--destructive));

  --max-width: 72rem; /* max-w-6xl */
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  background-color: var(--color-background);
  color: var(--color-foreground);
  overflow-x: clip;
  min-height: 100dvh;
}

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

.min-h-screen {
  min-height: 100dvh;
}

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

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.font-display {
  font-family: "Archivo", "Arial Narrow", sans-serif;
  font-stretch: 122%;
}

/* Quiet paper grain over the whole page */
.grain-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Vertical caption rail carrying metadata beside content */
.caption-rail {
  position: absolute;
  top: 6rem;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 0.22em;
  font-size: 10px;
  text-transform: uppercase;
  display: none;
}

@media (min-width: 1024px) {
  .caption-rail {
    display: block;
  }
}

.caption-rail--left {
  left: 1rem;
}

.caption-rail--right {
  right: 1rem;
}

/* Framed media window */
.frame-window {
  border: 1px solid var(--color-foreground);
  background: var(--color-card);
  padding: 0.5rem;
}

/* Broken frame — intentionally rotated, borderless window */
.frame-broken {
  transform: rotate(-2.5deg);
  border: none;
  background: transparent;
  padding: 0;
}

@media (prefers-reduced-motion: reduce) {
  .frame-broken {
    transform: none;
  }
}

.container {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  border: 1px solid var(--color-foreground);
  padding: 0 1.25rem;
  font-family: "Archivo", "Arial Narrow", sans-serif;
  font-stretch: 122%;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  transition: transform 0.15s ease;
  background: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  border-color: var(--color-foreground);
  background: var(--color-primary);
  color: var(--color-primary-foreground);
}

.btn-outline {
  border-color: var(--color-primary-foreground);
  background: var(--color-background);
  color: var(--color-foreground);
}

.btn-outline:hover,
.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* ---------------- Header ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(21, 21, 33, 0.2);
  background: hsl(44 36% 92% / 0.95);
  backdrop-filter: blur(4px);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.site-header .brand {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.site-header .brand-name {
  font-size: 1.125rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.site-header .brand-tag {
  display: none;
  font-size: 0.75rem;
  font-style: italic;
  color: var(--color-muted-foreground);
}

@media (min-width: 640px) {
  .site-header .brand-tag {
    display: inline;
  }
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-header .nav-link {
  display: none;
  font-family: "Archivo", "Arial Narrow", sans-serif;
  font-stretch: 122%;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: hsl(230 22% 9% / 0.8);
  transition: color 0.15s ease;
}

.site-header .nav-link:hover {
  color: var(--color-primary);
}

@media (min-width: 640px) {
  .site-header .nav-link {
    display: inline;
  }
}

/* ---------------- Hero ---------------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--color-primary);
  color: var(--color-primary-foreground);
}

.hero .container {
  padding-top: 4rem;
  padding-bottom: 6rem;
}

@media (min-width: 768px) {
  .hero .container {
    padding-top: 6rem;
  }
}

.hero .kicker {
  font-size: 0.875rem;
  font-style: italic;
  color: hsl(44 42% 95% / 0.7);
}

.hero h1 {
  margin: 1rem 0 0;
  font-size: 13vw;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.92;
  letter-spacing: -0.01em;
}

@media (min-width: 768px) {
  .hero h1 {
    font-size: 7.5rem;
  }
}

.hero h1 .muted {
  color: hsl(44 42% 95% / 0.9);
}

.hero .collage {
  position: relative;
  margin-top: 3.5rem;
}

@media (min-width: 768px) {
  .hero .collage {
    margin-top: 5rem;
  }
}

.hero .collage .frame-window {
  position: relative;
  z-index: 10;
  margin-left: auto;
  width: 100%;
  border-color: hsl(44 42% 95% / 0.4);
  background: var(--color-primary);
}

@media (min-width: 768px) {
  .hero .collage .frame-window {
    width: 75%;
  }
}

.hero .collage img.port {
  aspect-ratio: 16 / 9;
  width: 100%;
  object-fit: cover;
}

.hero .collage figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.25rem 0;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: hsl(44 42% 95% / 0.7);
}

.hero .collage .frame-broken {
  position: absolute;
  bottom: -2.5rem;
  left: 0;
  z-index: 20;
  width: 50%;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.35);
}

@media (min-width: 768px) {
  .hero .collage .frame-broken {
    bottom: -4rem;
    width: 40%;
  }
}

.hero .collage img.pellets {
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: cover;
}

.hero .cta-row {
  margin-top: 6rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .hero .cta-row {
    margin-top: 7rem;
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

.hero .cta-row p {
  max-width: 28rem;
  font-size: 1.125rem;
  line-height: 1.7;
  color: hsl(44 42% 95% / 0.85);
  margin: 0;
}

/* ---------------- Products ---------------- */

.products {
  position: relative;
  background: var(--color-background);
  padding: 6rem 0;
}

.products .section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 2px solid var(--color-foreground);
  padding-bottom: 1.5rem;
}

.products h2,
.heritage h2,
.contact h2 {
  margin: 0;
  font-size: 2.25rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1;
}

@media (min-width: 768px) {
  .products h2 {
    font-size: 3.75rem;
  }
}

.products .section-head .note {
  font-size: 0.875rem;
  font-style: italic;
  color: var(--color-muted-foreground);
  margin: 0;
}

.product-grid {
  margin-top: 3.5rem;
  display: grid;
  gap: 2rem 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 4rem;
  }
}

@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.product-card {
  position: relative;
}

.product-card figure {
  position: relative;
}

.product-card .media {
  position: relative;
  overflow: hidden;
}

.product-card img {
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover img {
  transform: scale(1.03);
}

.product-card .hover-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: hsl(232 68% 35% / 0.85);
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-card:hover .hover-panel {
  opacity: 1;
}

.product-card .hover-panel .label {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: hsl(44 42% 95% / 0.7);
}

.product-card .hover-panel .grades {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--color-primary-foreground);
}

.product-card .hover-panel .packaging {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  font-style: italic;
  color: hsl(44 42% 95% / 0.7);
}

.product-card figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.25rem 0;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-muted-foreground);
}

.product-card .body {
  margin-top: 1.25rem;
}

.product-card .code {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--color-primary);
}

.product-card h3 {
  margin: 0.25rem 0 0;
  font-size: 1.25rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.product-card .full-name {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  font-style: italic;
  color: var(--color-muted-foreground);
}

.product-card .description {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  line-height: 1.7;
  color: hsl(230 22% 9% / 0.8);
}

/* ---------------- Heritage ---------------- */

.heritage {
  position: relative;
  background: var(--color-foreground);
  color: var(--color-background);
  padding: 6rem 0;
}

.heritage .grid {
  display: grid;
  align-items: flex-start;
  gap: 3rem;
}

@media (min-width: 768px) {
  .heritage .grid {
    grid-template-columns: 1fr 1fr;
  }
}

.heritage .media-wrap {
  position: relative;
}

.heritage .frame-window {
  border-color: hsl(44 36% 92% / 0.4);
  background: var(--color-foreground);
}

.heritage img {
  aspect-ratio: 3 / 2;
  width: 100%;
  object-fit: cover;
}

.heritage figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.25rem 0;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: hsl(44 36% 92% / 0.6);
}

.heritage .accent-block {
  position: absolute;
  right: -1rem;
  top: -1.5rem;
  display: none;
  height: 4rem;
  width: 6rem;
  background: var(--color-primary);
  transform: rotate(-2.5deg);
}

@media (min-width: 768px) {
  .heritage .accent-block {
    display: block;
  }
}

.heritage .copy p.kicker {
  font-size: 0.875rem;
  font-style: italic;
  color: hsl(44 36% 92% / 0.6);
  margin: 0;
}

.heritage h2 {
  margin-top: 0.75rem;
  font-size: 2.25rem;
  line-height: 1;
}

@media (min-width: 768px) {
  .heritage h2 {
    font-size: 3rem;
  }
}

.heritage h2 .muted {
  color: hsl(44 36% 92% / 0.7);
}

.heritage .copy p {
  margin-top: 1.5rem;
  line-height: 1.7;
  color: hsl(44 36% 92% / 0.8);
}

.heritage .stats {
  margin: 5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid hsl(44 36% 92% / 0.25);
}

@media (min-width: 768px) {
  .heritage .stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

.heritage .stat {
  border-bottom: 1px solid hsl(44 36% 92% / 0.25);
  border-right: 1px solid hsl(44 36% 92% / 0.25);
  padding: 2rem 1.25rem;
}

.heritage .stat:nth-child(2n) {
  border-right: none;
}

@media (min-width: 768px) {
  .heritage .stat {
    border-bottom: none;
    border-right: 1px solid hsl(44 36% 92% / 0.25);
  }
  .heritage .stat:nth-child(2n) {
    border-right: 1px solid hsl(44 36% 92% / 0.25);
  }
  .heritage .stat:last-child {
    border-right: none;
  }
}

.heritage .stat dd {
  margin: 0;
  font-size: 1.875rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

@media (min-width: 768px) {
  .heritage .stat dd {
    font-size: 2.25rem;
  }
}

.heritage .stat dt {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  font-style: italic;
  color: hsl(44 36% 92% / 0.6);
}

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

.contact {
  position: relative;
  background: var(--color-primary);
  color: var(--color-primary-foreground);
  padding: 6rem 0;
}

.contact .grid {
  display: grid;
  gap: 3.5rem;
}

@media (min-width: 768px) {
  .contact .grid {
    grid-template-columns: 1fr 1.2fr;
  }
}

.contact .kicker {
  font-size: 0.875rem;
  font-style: italic;
  color: hsl(44 42% 95% / 0.7);
  margin: 0;
}

.contact h2 {
  margin-top: 0.75rem;
  font-size: 2.25rem;
  line-height: 1;
}

@media (min-width: 768px) {
  .contact h2 {
    font-size: 3rem;
  }
}

.contact .intro p {
  margin-top: 1.5rem;
  max-width: 24rem;
  line-height: 1.7;
  color: hsl(44 42% 95% / 0.85);
}

.contact dl.details {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid hsl(44 42% 95% / 0.25);
  font-size: 0.875rem;
}

.contact dl.details div + div {
  margin-top: 1rem;
}

.contact dl.details dt {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: hsl(44 42% 95% / 0.6);
}

.contact dl.details dd {
  margin: 0.25rem 0 0;
}

.contact-form-wrap {
  background: var(--color-background);
  color: var(--color-foreground);
  padding: 1.5rem;
  border: 1px solid hsl(44 42% 95% / 0.4);
}

@media (min-width: 768px) {
  .contact-form-wrap {
    padding: 2rem;
  }
}

.contact-form label {
  display: block;
  font-family: "Archivo", "Arial Narrow", sans-serif;
  font-stretch: 122%;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: hsl(230 22% 9% / 0.7);
  margin-bottom: 0.5rem;
}

.contact-form .optional {
  text-transform: none;
  font-style: italic;
  color: var(--color-muted-foreground);
  font-weight: 400;
  letter-spacing: normal;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid hsl(230 22% 9% / 0.4);
  background: var(--color-background);
  padding: 0.75rem 1rem;
  color: var(--color-foreground);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1rem;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: hsl(230 10% 38% / 0.7);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
}

.contact-form .row {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .contact-form .row {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-form .field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.contact-form .row .field {
  margin-bottom: 0;
}

.form-error {
  border: 1px solid hsl(0 72% 44% / 0.5);
  background: hsl(0 72% 44% / 0.1);
  color: var(--color-destructive);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
}

.form-success {
  min-height: 24rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* The [hidden] attribute selector must win over .form-success's own
   display:flex, or the panel stays visible even while "hidden" is set. */
.form-success[hidden] {
  display: none;
}

.form-success p.title {
  font-family: "Archivo", "Arial Narrow", sans-serif;
  font-stretch: 122%;
  font-size: 1.5rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--color-primary);
  margin: 0;
}

.form-success p.detail {
  margin-top: 0.75rem;
  max-width: 24rem;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--color-muted-foreground);
}

.contact-form button[disabled] {
  cursor: not-allowed;
  opacity: 0.6;
}

/* honeypot field — hidden from real visitors */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------------- Footer ---------------- */

.site-footer {
  border-top: 1px solid rgba(21, 21, 33, 0.2);
  background: var(--color-foreground);
  color: var(--color-background);
}

.site-footer .grid {
  display: grid;
  gap: 2.5rem;
  padding: 3.5rem 0;
}

@media (min-width: 768px) {
  .site-footer .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.site-footer .brand {
  font-size: 1.25rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin: 0;
}

.site-footer .tagline {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  font-style: italic;
  color: hsl(44 36% 92% / 0.7);
}

.site-footer h4 {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: hsl(44 36% 92% / 0.6);
}

.site-footer ul {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  font-size: 0.875rem;
}

.site-footer ul li {
  margin-top: 0.25rem;
  color: hsl(44 36% 92% / 0.8);
}

.site-footer ul li a {
  text-underline-offset: 4px;
}

.site-footer ul li a:hover {
  text-decoration: underline;
}

.site-footer .legal {
  border-top: 1px solid hsl(44 36% 92% / 0.15);
}

.site-footer .legal p {
  margin: 0;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding: 1.25rem 1.5rem;
  font-size: 0.75rem;
  color: hsl(44 36% 92% / 0.5);
}
