/* RIGCERT IKE - rigcert.gr */

@font-face {
  font-family: "Lora";
  src: url("fonts/lora-var.woff") format("woff");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-400.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-500.woff") format("woff");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-600.woff") format("woff");
  font-weight: 600;
  font-display: swap;
}

:root {
  /* Brand colours taken from the RIGCERT logo: navy #18305B, yellow #FCDB00 */
  --ink: #14223f;
  --muted: #4a5670;
  --paper: #f5f6f9;
  --surface: #ffffff;
  --seal: #18305b;
  --seal-dark: #0f2042;
  --seal-soft: #e6eaf2;
  --gold: #fcdb00;
  --rule: #d5dae3;
  --footer: #0f2042;

  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --wrap: 1120px;
  --gutter: 24px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--seal); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--seal-dark); }

:focus-visible { outline: 3px solid var(--seal); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--surface); padding: 8px 14px; z-index: 10;
}
.skip-link:focus { left: 8px; }

/* Header */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: 72px;
}
.site-header .wrap { min-height: 80px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--seal); }
.brand img { width: 54px; height: 56px; }
.brand-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.06em;
}
.brand:hover { color: var(--seal); }
.nav { display: flex; gap: 28px; font-size: 0.95rem; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.nav a:hover { color: var(--seal); text-decoration: underline; }

/* Hero */

.hero { padding: 72px 0 88px; background: var(--surface); }
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 64px; align-items: center;
}
.hero-photo { margin: 0; position: relative; }
.hero-photo::before {
  content: ""; position: absolute; inset: 22px -22px -22px 22px;
  background: var(--gold); border-radius: 4px;
}
.hero-photo img {
  position: relative; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: 4px;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  max-width: 17ch;
  margin-bottom: 24px;
}
.lead { font-size: 1.15rem; color: var(--muted); max-width: 54ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid var(--seal);
}
.btn-primary { background: var(--seal); color: #fff; }
.btn-primary:hover { background: var(--seal-dark); border-color: var(--seal-dark); color: #fff; }
.btn-secondary { background: transparent; color: var(--seal); }
.btn-secondary:hover { background: var(--seal-soft); color: var(--seal-dark); }

/* Accreditation panel */

.accreditation-band { background: var(--seal-soft); padding: 64px 0; border-top: 4px solid var(--gold); }
.accreditation-band .wrap {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 56px; align-items: start;
}
.acc-intro h2 { margin-bottom: 24px; }
.marks { display: flex; flex-wrap: wrap; gap: 16px; }
.marks img {
  width: 100%; max-width: 360px; height: auto;
  background: #fff; padding: 10px; border-radius: 4px; border: 1px solid var(--rule);
}
.accreditation dl { margin: 0; border-bottom: 1px solid #c3cbda; }
.accreditation .row {
  display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 16px;
  padding: 14px 0; border-top: 1px solid #c3cbda;
}
.accreditation dt { color: var(--muted); font-size: 0.9rem; }
.accreditation dd { margin: 0; font-weight: 500; }
.accreditation .more { margin-top: 16px; font-size: 0.95rem; }

/* Sections */

.section { padding: 88px 0; }
.section + .section { border-top: 1px solid var(--rule); }
.section-head { max-width: 62ch; margin-bottom: 48px; }
.section-head h2 { margin-bottom: 16px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }

/* About */

.about .wrap {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 56px;
}
.about-text { max-width: 64ch; font-size: 1.05rem; }
.about-photo {
  margin-top: 28px; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 4px;
}

/* Standards register */

.register {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 40px;
}
.register li {
  border-top: 1px solid var(--rule);
  padding: 22px 0 30px;
}
.std-prefix { font-size: 0.85rem; color: var(--muted); font-weight: 500; }
.std-number {
  display: block;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.4rem, 4vw, 3.1rem);
  line-height: 1;
  color: var(--seal);
  margin: 2px 0 14px;
  font-variant-numeric: lining-nums;
}
.register h3 { font-family: var(--sans); font-size: 1.02rem; font-weight: 600; margin-bottom: 6px; }
.register p { color: var(--muted); font-size: 0.95rem; }
.register-note { margin-top: 24px; color: var(--muted); font-size: 0.95rem; max-width: 70ch; }

/* Process */

.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px;
  counter-reset: step;
}
.steps li { counter-increment: step; position: relative; padding-top: 56px; }
.steps li::before {
  content: counter(step);
  position: absolute; top: 0; left: 0;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); border: 2px solid var(--seal); color: var(--seal);
  font-family: var(--serif); font-weight: 600; font-size: 1.1rem;
}
.steps li::after {
  content: ""; position: absolute; top: 20px; left: 52px; right: -20px;
  border-top: 2px solid var(--rule);
}
.steps li:last-child::after { display: none; }
.steps h3 { margin-bottom: 8px; }
.steps p { color: var(--muted); font-size: 0.97rem; }
.aside-note {
  margin-top: 48px; padding: 20px 24px;
  background: var(--surface); border-left: 4px solid var(--seal);
  max-width: 78ch; font-size: 0.98rem;
}

/* Rules and verification */

.rules .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; }
.rules .section-head { margin-bottom: 24px; }
.rules-text p { color: var(--ink); max-width: 60ch; }
.doc-list { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--rule); }
.doc-list li { border-top: 1px solid var(--rule); }
.doc-list a {
  display: block; padding: 16px 0; text-decoration: none; color: var(--ink);
}
.doc-list a:hover .doc-title { color: var(--seal); text-decoration: underline; }
.doc-title { display: block; font-weight: 600; }
.doc-desc { display: block; color: var(--muted); font-size: 0.92rem; }

/* Contact */

.contact { background: var(--surface); }
.contact .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 56px; }
.contact-card { border-top: 4px solid var(--seal); padding-top: 24px; }
.contact-card .row { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.contact-card .label { display: block; color: var(--muted); font-size: 0.9rem; margin-bottom: 2px; }
.contact-card address { font-style: normal; font-weight: 500; }
.email-btn {
  font: inherit; font-weight: 600; color: var(--seal);
  background: var(--seal-soft); border: 1px solid transparent; border-radius: 4px;
  padding: 8px 14px; cursor: pointer;
}
.email-btn:hover { background: #d7e2f0; }
.email-link { font-weight: 600; }
.noscript-note { color: var(--muted); font-size: 0.95rem; }

/* Footer */

.site-footer { background: var(--footer); color: #c9d3e0; padding: 56px 0 28px; font-size: 0.95rem; }
.site-footer a { color: #ffffff; }
.site-footer a:hover { color: #c9d9ee; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; }
.site-footer h2 {
  font-family: var(--sans); font-size: 0.95rem; font-weight: 600; color: #ffffff;
  margin-bottom: 12px; letter-spacing: 0;
}
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.footer-brand img { width: 40px; height: 42px; }
.footer-name { font-family: var(--serif); font-size: 1.3rem; font-weight: 700; color: #fff; letter-spacing: 0.04em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li + li { margin-top: 6px; }
/* Financial statements: text at half the footer size (0.95rem -> 0.475rem) */
.site-footer .financial-title { font-size: 0.475rem; margin-bottom: 6px; }
.financial-link {
  display: inline-block; padding: 5px 8px; border: 1px solid var(--gold); border-radius: 3px;
  text-decoration: none; font-weight: 600; font-size: 0.475rem;
}
.financial-link:hover { background: var(--gold); color: var(--seal-dark); }
.footer-bottom {
  margin-top: 40px; padding-top: 20px; border-top: 1px solid #2a3b55;
  color: #9fb0c6; font-size: 0.88rem;
}

/* Responsive */

@media (max-width: 960px) {
  .hero .wrap, .about .wrap, .rules .wrap, .contact .wrap, .accreditation-band .wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero-photo { max-width: 520px; }
  .register { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .steps li::after { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  :root { --gutter: 16px; }
  .nav a:not(.nav-contact) { display: none; }
  .hero { padding: 48px 0 56px; }
  .section { padding: 64px 0; }
  .register { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .hero-photo::before { inset: 12px -10px -12px 12px; }
  .accreditation-band { padding: 48px 0; }
  .accreditation .row { grid-template-columns: 1fr; gap: 2px; }
  .brand img { width: 44px; height: 46px; }
  .brand-name { font-size: 1.2rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}
