:root {
  --cream: #FFF7EE;
  --cream-2: #FBF1E4;
  --blue: #0048FF;
  --ink: #14161f;
  --line: rgba(0,72,255,0.25);
  --serif: 'Playfair Display', Georgia, serif;
  --mono: 'IBM Plex Mono', 'Courier New', monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--blue);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.6;
}

.italic { font-family: var(--serif); font-style: italic; }

a { color: var(--blue); }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  margin: 0 0 8px;
  opacity: 0.85;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--blue);
  margin: 0 0 16px;
}

h1 { font-size: clamp(32px, 5vw, 56px); line-height: 1.15; font-weight: 500; }
h2 { font-size: clamp(26px, 3.5vw, 38px); font-weight: 500; }
h3 { font-size: 26px; font-weight: 500; }
h4 { font-size: 18px; font-weight: 600; }

p { margin: 0 0 14px; max-width: 60ch; }

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 5vw;
  position: sticky;
  top: 0;
  background: rgba(255,247,238,0.92);
  backdrop-filter: blur(6px);
  z-index: 50;
  border-bottom: 1px solid var(--line);
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo img {
  height: 30px;
  width: auto;
  display: block;
}

.main-nav {
  display: flex;
  gap: 28px;
  align-items: center;
  font-size: 13px;
}

.main-nav a { text-decoration: none; }
.main-nav a:hover { text-decoration: underline; }

.nav-cta {
  border: 1px solid var(--blue);
  padding: 8px 16px;
  border-radius: 999px;
}

/* Hero */
.hero {
  padding: 90px 5vw 70px;
  max-width: 900px;
}

.hero-sub { max-width: 65ch; font-size: 15px; }

.btn-primary {
  display: inline-block;
  background: var(--blue);
  color: var(--cream);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  padding: 14px 30px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  letter-spacing: 0.02em;
}

.btn-primary:hover { opacity: 0.85; }

/* About */
.about { padding: 60px 5vw 90px; border-top: 1px solid var(--line); }

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

.about-img img {
  width: 100%;
  max-width: 380px;
  display: block;
  margin: 0 auto;
}

.text-link { font-size: 13px; text-decoration: none; border-bottom: 1px solid var(--blue); }

/* Prints / gallery */
.prints { padding: 60px 5vw 40px; border-top: 1px solid var(--line); }

.section-head { max-width: 750px; margin-bottom: 40px; }

.collection-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 20px;
  font-size: 13px;
}

.collection-nav a {
  text-decoration: none;
  border: 1px solid var(--line);
  padding: 6px 14px;
  border-radius: 999px;
}

.collection-nav a:hover { border-color: var(--blue); }

.collection { padding: 50px 0; border-top: 1px dashed var(--line); scroll-margin-top: 100px; }
.collection:first-of-type { border-top: none; }

.collection-head { margin-bottom: 28px; }
.collection-head p { max-width: 60ch; opacity: 0.9; font-size: 14px; }

/* Justified row layout: every framed photo shares the same height,
   landscape and portrait cards line up evenly, width follows aspect ratio. */
.grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 28px;
}

.card {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 0 0 auto;
  width: auto;
}

.card img {
  height: clamp(240px, 28vw, 420px);
  width: auto;
  max-width: 100%;
  display: block;
  background: #fff;
}

.card figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  gap: 8px;
  flex-wrap: wrap;
}

.card-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card .name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 16px;
  color: var(--blue);
}

.card .ref { opacity: 0.6; font-size: 11px; }

.order-btn {
  background: transparent;
  border: 1px solid var(--blue);
  color: var(--blue);
  font-family: var(--mono);
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.order-btn:hover { background: var(--blue); color: var(--cream); }

/* Precios */
.precios { padding: 60px 5vw 90px; border-top: 1px solid var(--line); }

.sizes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 36px;
}

.size-card {
  border: 1px solid var(--blue);
  border-radius: 18px;
  padding: 26px 22px;
}

.size-card h4 { display: flex; justify-content: space-between; align-items: baseline; }
.size-card h4 span { font-family: var(--mono); font-size: 13px; font-weight: 400; opacity: 0.8; }
.size-card p { font-size: 13px; opacity: 0.9; min-height: 40px; }

.price-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.price-row.muted {
  opacity: 0.55;
  font-style: italic;
}

.frames-note {
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.disclaimer { font-size: 12px; opacity: 0.7; }

/* Contact */
.contacto { padding: 60px 5vw 100px; border-top: 1px solid var(--line); }

.order-form {
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row.two-col { flex-direction: row; gap: 18px; }
.form-row.two-col > div { flex: 1; display: flex; flex-direction: column; gap: 6px; }

label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.85; }

input, select, textarea {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--blue);
}

.order-form .btn-primary { align-self: flex-start; margin-top: 6px; }

.form-note { font-size: 12px; opacity: 0.75; max-width: 55ch; }

/* Footer */
.site-footer {
  padding: 50px 5vw 60px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-logo img {
  height: 40px;
  width: auto;
  display: block;
}

.footer-links {
  display: flex;
  gap: 22px;
  font-size: 13px;
}

.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .grid { gap: 20px; }
  .card img { height: clamp(200px, 34vw, 380px); }
}

@media (max-width: 780px) {
  .site-header { padding: 18px 6vw; }
  .main-nav { gap: 14px; font-size: 12px; }
  .about-grid { grid-template-columns: 1fr; gap: 30px; }
  .form-row.two-col { flex-direction: column; }
  .hero { padding: 60px 6vw 50px; }
  .about, .prints, .precios, .contacto { padding-left: 6vw; padding-right: 6vw; }
}

@media (max-width: 640px) {
  body { font-size: 14px; }

  .site-header {
    flex-wrap: wrap;
    row-gap: 14px;
    padding: 16px 6vw;
  }

  .logo img { height: 24px; }

  .main-nav {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px 16px;
    font-size: 12px;
    order: 3;
  }

  .nav-cta { padding: 7px 14px; }

  .hero { padding: 40px 6vw 40px; }
  .hero-sub { font-size: 14px; }
  .btn-primary { width: 100%; text-align: center; }

  .about-img img { max-width: 280px; }

  .section-head { margin-bottom: 28px; }

  .collection-nav { gap: 10px; font-size: 12px; }
  .collection-nav a { padding: 5px 12px; }

  .collection { padding: 36px 0; }

  .grid { gap: 14px; }
  .card img { height: clamp(150px, 42vw, 300px); }

  .card figcaption {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .order-btn { width: 100%; text-align: center; }

  .sizes-grid { grid-template-columns: 1fr; gap: 16px; }

  .size-card { padding: 20px 18px; }
  .size-card p { min-height: 0; }

  .order-form { max-width: 100%; }

  input, select, textarea { font-size: 16px; } /* prevents iOS zoom-on-focus */

  .site-footer {
    padding: 36px 6vw 44px;
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
  }

  .footer-links { flex-wrap: wrap; gap: 14px 20px; }
}

@media (max-width: 420px) {
  .grid { justify-content: center; }
  .card img { height: clamp(160px, 60vw, 260px); }
}
